Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FSR: only set in Gamescope (remove Wine FSR) #2840

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion bottles/backend/managers/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,6 @@ def get_programs(self, config: BottleConfig) -> List[dict]:
"dxvk": _program.get("dxvk"),
"vkd3d": _program.get("vkd3d"),
"dxvk_nvapi": _program.get("dxvk_nvapi"),
"fsr": _program.get("fsr"),
"gamescope": _program.get("gamescope"),
"pulseaudio_latency": _program.get("pulseaudio_latency"),
"virtual_desktop": _program.get("virtual_desktop"),
Expand Down
3 changes: 1 addition & 2 deletions bottles/backend/models/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ class BottleParams(DictCompatMixIn):
gamescope_fullscreen: bool = True
sync: str = "wine"
fsr: bool = False
fsr_sharpening_strength: int = 2
fsr_quality_mode: str = "none"
fsr_sharpening_strength: int = 8
TheEvilSkeleton marked this conversation as resolved.
Show resolved Hide resolved
custom_dpi: int = 96
renderer: str = "gl"
discrete_gpu: bool = False
Expand Down
3 changes: 0 additions & 3 deletions bottles/backend/models/samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ class Samples:
"ENABLE_VKBASALT": ("vkbasalt", True),
"WINEESYNC": ("sync", "esync"),
"WINEFSYNC": ("sync", "fsync"),
"WINE_FULLSCREEN_FSR": ("fsr", True),
"WINE_FULLSCREEN_FSR_STRENGTH": ("fsr_sharpening_strength", 2),
"WINE_FULLSCREEN_FSR_MODE": ("fsr_quality_mode", "none"),
"GAMESCOPE": ("gamescope", False),
"DRI_PRIME": ("discrete_gpu", True),
"__NV_PRIME_RENDER_OFFLOAD": ("discrete_gpu", True),
Expand Down
12 changes: 0 additions & 12 deletions bottles/backend/wine/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ def __init__(
program_dxvk: Optional[bool] = None,
program_vkd3d: Optional[bool] = None,
program_nvapi: Optional[bool] = None,
program_fsr: Optional[bool] = None,
program_gamescope: Optional[bool] = None,
program_virt_desktop: Optional[bool] = None,
):
Expand Down Expand Up @@ -87,16 +86,6 @@ def __init__(
override_nvapi = NVAPIComponent.get_override_keys() + "=b"
env_dll_overrides.append(override_nvapi)

if program_fsr is not None and program_fsr != self.config.Parameters.fsr:
self.environment["WINE_FULLSCREEN_FSR"] = "1" if program_fsr else "0"
self.environment["WINE_FULLSCREEN_FSR_STRENGTH"] = str(
self.config.Parameters.fsr_sharpening_strength
)
if self.config.Parameters.fsr_quality_mode:
self.environment["WINE_FULLSCREEN_FSR_MODE"] = str(
self.config.Parameters.fsr_quality_mode
)

if (
program_gamescope is not None
and program_gamescope != self.config.Parameters.gamescope
Expand Down Expand Up @@ -127,7 +116,6 @@ def run_program(cls, config: BottleConfig, program: dict, terminal: bool = False
program_dxvk=program.get("dxvk"),
program_vkd3d=program.get("vkd3d"),
program_nvapi=program.get("dxvk_nvapi"),
program_fsr=program.get("fsr"),
program_gamescope=program.get("gamescope"),
program_virt_desktop=program.get("virtual_desktop"),
).run()
Expand Down
11 changes: 1 addition & 10 deletions bottles/backend/wine/winecommand.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,13 +383,6 @@ def get_env(
# if params["aco_compiler"]:
# env.add("ACO_COMPILER", "aco")

# FSR
if params.fsr:
env.add("WINE_FULLSCREEN_FSR", "1")
env.add("WINE_FULLSCREEN_FSR_STRENGTH", str(params.fsr_sharpening_strength))
if params.fsr_quality_mode:
env.add("WINE_FULLSCREEN_FSR_MODE", str(params.fsr_quality_mode))

# PulseAudio latency
if params.pulseaudio_latency:
env.add("PULSE_LATENCY_MSEC", "60")
Expand Down Expand Up @@ -622,10 +615,8 @@ def _get_gamescope_cmd(self, return_steam_cmd: bool = False) -> str:
gamescope_cmd.append("-S integer")
if params.fsr:
gamescope_cmd.append("-F fsr")
# Upscaling sharpness is from 0 to 20. There are 5 FSR upscaling levels,
# so multiply by 4 to reach 20
gamescope_cmd.append(
f"--fsr-sharpness {params.fsr_sharpening_strength * 4}"
f"--fsr-sharpness {params.fsr_sharpening_strength}"
)
if params.gamescope_fps > 0:
gamescope_cmd.append(f"-r {params.gamescope_fps}")
Expand Down
1 change: 0 additions & 1 deletion bottles/frontend/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,6 @@ def run_program(self):
program.get("dxvk")
program.get("vkd3d")
program.get("dxvk_nvapi")
program.get("fsr")
program.get("gamescope")
program.get("virtual_desktop")

Expand Down
1 change: 0 additions & 1 deletion bottles/frontend/ui/bottles.gresource.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
<file preprocess="xml-stripblanks">dialog-rename.ui</file>
<file preprocess="xml-stripblanks">dialog-gamescope.ui</file>
<file preprocess="xml-stripblanks">dialog-vkbasalt.ui</file>
<file preprocess="xml-stripblanks">dialog-fsr.ui</file>
<file preprocess="xml-stripblanks">dialog-mangohud.ui</file>
<file preprocess="xml-stripblanks">dialog-display.ui</file>
<file preprocess="xml-stripblanks">dialog-drives.ui</file>
Expand Down
20 changes: 0 additions & 20 deletions bottles/frontend/ui/details-preferences.blp
Original file line number Diff line number Diff line change
Expand Up @@ -98,26 +98,6 @@ template $DetailsPreferences: Adw.PreferencesPage {
}
}

Adw.ActionRow {
activatable-widget: switch_fsr;
title: _("FidelityFX Super Resolution");
subtitle: _("Increase performance at the expense of visuals. Only works on Vulkan.");

Button btn_manage_fsr {
tooltip-text: _("Manage FidelityFX Super Resolution settings");
valign: center;
icon-name: "applications-system-symbolic";

styles [
"flat",
]
}

Switch switch_fsr {
valign: center;
}
}

Adw.ActionRow row_discrete {
visible: false;
activatable-widget: switch_discrete;
Expand Down
63 changes: 0 additions & 63 deletions bottles/frontend/ui/dialog-fsr.blp

This file was deleted.

27 changes: 27 additions & 0 deletions bottles/frontend/ui/dialog-gamescope.blp
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,33 @@ template $GamescopeDialog: Adw.Window {
}
}

Adw.PreferencesGroup {
title: _("FSR");

Adw.ActionRow {
title: _("Enable");
activatable-widget: switch_fsr;

Switch switch_fsr {
valign: center;
}
}

Adw.ActionRow {
title: _("Sharpening Strength");

SpinButton {
numeric: true;
valign: center;

adjustment: Adjustment spin_sharpening_strength {
step-increment: 4;
upper: 20;
};
}
}
}

Adw.PreferencesGroup {
title: _("Miscellaneous");

Expand Down
9 changes: 0 additions & 9 deletions bottles/frontend/ui/dialog-launch-options.blp
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,6 @@ template $LaunchOptionsDialog: Adw.Window {
}
}

Adw.ActionRow action_fsr {
activatable-widget: switch_fsr;
title: "FSR";

Switch switch_fsr {
valign: center;
}
}

Adw.ActionRow action_gamescope {
title: _("Gamescope");
activatable-widget: switch_gamescope;
Expand Down
1 change: 0 additions & 1 deletion bottles/frontend/ui/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ blueprints = custom_target('blueprints',
'dialog-vkbasalt.blp',
'dialog-display.blp',
'dialog-vmtouch.blp',
'dialog-fsr.blp',
'dialog-mangohud.blp',
'dll-override-entry.blp',
'drive-entry.blp',
Expand Down
7 changes: 0 additions & 7 deletions bottles/frontend/views/bottle_preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
from bottles.frontend.windows.drives import DrivesDialog
from bottles.frontend.windows.envvars import EnvVarsDialog
from bottles.frontend.windows.exclusionpatterns import ExclusionPatternsDialog
from bottles.frontend.windows.fsr import FsrDialog
from bottles.frontend.windows.gamescope import GamescopeDialog
from bottles.frontend.windows.mangohud import MangoHudDialog
from bottles.frontend.windows.protonalert import ProtonAlertDialog
Expand All @@ -67,7 +66,6 @@ class PreferencesView(Adw.PreferencesPage):
# region Widgets
btn_manage_gamescope = Gtk.Template.Child()
btn_manage_vkbasalt = Gtk.Template.Child()
btn_manage_fsr = Gtk.Template.Child()
btn_manage_mangohud = Gtk.Template.Child()
btn_manage_sandbox = Gtk.Template.Child()
btn_manage_versioning_patterns = Gtk.Template.Child()
Expand All @@ -89,7 +87,6 @@ class PreferencesView(Adw.PreferencesPage):
switch_mangohud = Gtk.Template.Child()
switch_obsvkc = Gtk.Template.Child()
switch_vkbasalt = Gtk.Template.Child()
switch_fsr = Gtk.Template.Child()
switch_nvapi = Gtk.Template.Child()
switch_gamemode = Gtk.Template.Child()
switch_gamescope = Gtk.Template.Child()
Expand Down Expand Up @@ -227,7 +224,6 @@ def __init__(self, details, config, **kwargs):
self.switch_mangohud.connect("state-set", self.__toggle_feature, "mangohud")
self.switch_obsvkc.connect("state-set", self.__toggle_feature, "obsvkc")
self.switch_vkbasalt.connect("state-set", self.__toggle_feature, "vkbasalt")
self.switch_fsr.connect("state-set", self.__toggle_feature, "fsr")
self.switch_nvapi.connect("state-set", self.__toggle_nvapi)
self.switch_gamemode.connect("state-set", self.__toggle_feature, "gamemode")
self.switch_gamescope.connect("state-set", self.__toggle_feature, "gamescope")
Expand Down Expand Up @@ -407,7 +403,6 @@ def set_config(self, config: BottleConfig):
self.switch_mangohud.handler_block_by_func(self.__toggle_feature)
self.switch_nvapi.handler_block_by_func(self.__toggle_nvapi)
self.switch_vkbasalt.handler_block_by_func(self.__toggle_feature)
self.switch_fsr.handler_block_by_func(self.__toggle_feature)
self.switch_obsvkc.handler_block_by_func(self.__toggle_feature)
self.switch_gamemode.handler_block_by_func(self.__toggle_feature)
self.switch_gamescope.handler_block_by_func(self.__toggle_feature)
Expand All @@ -430,7 +425,6 @@ def set_config(self, config: BottleConfig):
self.switch_mangohud.set_active(parameters.mangohud)
self.switch_obsvkc.set_active(parameters.obsvkc)
self.switch_vkbasalt.set_active(parameters.vkbasalt)
self.switch_fsr.set_active(parameters.fsr)
self.switch_nvapi.set_active(parameters.dxvk_nvapi)
self.switch_gamemode.set_active(parameters.gamemode)
self.switch_gamescope.set_active(parameters.gamescope)
Expand Down Expand Up @@ -541,7 +535,6 @@ def set_config(self, config: BottleConfig):
self.switch_mangohud.handler_unblock_by_func(self.__toggle_feature)
self.switch_nvapi.handler_unblock_by_func(self.__toggle_nvapi)
self.switch_vkbasalt.handler_unblock_by_func(self.__toggle_feature)
self.switch_fsr.handler_unblock_by_func(self.__toggle_feature)
self.switch_obsvkc.handler_unblock_by_func(self.__toggle_feature)
self.switch_gamemode.handler_unblock_by_func(self.__toggle_feature)
self.switch_gamescope.handler_unblock_by_func(self.__toggle_feature)
Expand Down
90 changes: 0 additions & 90 deletions bottles/frontend/windows/fsr.py

This file was deleted.

Loading
Loading