Skip to content

Commit a1f3965

Browse files
Martino FontanaSuperSamus
authored andcommitted
FSR: only set in Gamescope (remove Wine FSR)
Motivation: #2755
1 parent 0c07176 commit a1f3965

17 files changed

+35
-247
lines changed

bottles/backend/managers/manager.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,6 @@ def get_programs(self, config: BottleConfig) -> List[dict]:
728728
"dxvk": _program.get("dxvk"),
729729
"vkd3d": _program.get("vkd3d"),
730730
"dxvk_nvapi": _program.get("dxvk_nvapi"),
731-
"fsr": _program.get("fsr"),
732731
"gamescope": _program.get("gamescope"),
733732
"pulseaudio_latency": _program.get("pulseaudio_latency"),
734733
"virtual_desktop": _program.get("virtual_desktop"),

bottles/backend/models/config.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ class BottleParams(DictCompatMixIn):
8888
gamescope_fullscreen: bool = True
8989
sync: str = "wine"
9090
fsr: bool = False
91-
fsr_sharpening_strength: int = 2
92-
fsr_quality_mode: str = "none"
91+
fsr_sharpening_strength: int = 8
9392
custom_dpi: int = 96
9493
renderer: str = "gl"
9594
discrete_gpu: bool = False

bottles/backend/models/samples.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ class Samples:
4444
"ENABLE_VKBASALT": ("vkbasalt", True),
4545
"WINEESYNC": ("sync", "esync"),
4646
"WINEFSYNC": ("sync", "fsync"),
47-
"WINE_FULLSCREEN_FSR": ("fsr", True),
48-
"WINE_FULLSCREEN_FSR_STRENGTH": ("fsr_sharpening_strength", 2),
49-
"WINE_FULLSCREEN_FSR_MODE": ("fsr_quality_mode", "none"),
5047
"GAMESCOPE": ("gamescope", False),
5148
"DRI_PRIME": ("discrete_gpu", True),
5249
"__NV_PRIME_RENDER_OFFLOAD": ("discrete_gpu", True),

bottles/backend/wine/executor.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ def __init__(
3838
program_dxvk: Optional[bool] = None,
3939
program_vkd3d: Optional[bool] = None,
4040
program_nvapi: Optional[bool] = None,
41-
program_fsr: Optional[bool] = None,
4241
program_gamescope: Optional[bool] = None,
4342
program_virt_desktop: Optional[bool] = None,
4443
):
@@ -87,16 +86,6 @@ def __init__(
8786
override_nvapi = NVAPIComponent.get_override_keys() + "=b"
8887
env_dll_overrides.append(override_nvapi)
8988

90-
if program_fsr is not None and program_fsr != self.config.Parameters.fsr:
91-
self.environment["WINE_FULLSCREEN_FSR"] = "1" if program_fsr else "0"
92-
self.environment["WINE_FULLSCREEN_FSR_STRENGTH"] = str(
93-
self.config.Parameters.fsr_sharpening_strength
94-
)
95-
if self.config.Parameters.fsr_quality_mode:
96-
self.environment["WINE_FULLSCREEN_FSR_MODE"] = str(
97-
self.config.Parameters.fsr_quality_mode
98-
)
99-
10089
if (
10190
program_gamescope is not None
10291
and program_gamescope != self.config.Parameters.gamescope
@@ -127,7 +116,6 @@ def run_program(cls, config: BottleConfig, program: dict, terminal: bool = False
127116
program_dxvk=program.get("dxvk"),
128117
program_vkd3d=program.get("vkd3d"),
129118
program_nvapi=program.get("dxvk_nvapi"),
130-
program_fsr=program.get("fsr"),
131119
program_gamescope=program.get("gamescope"),
132120
program_virt_desktop=program.get("virtual_desktop"),
133121
).run()

bottles/backend/wine/winecommand.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -383,13 +383,6 @@ def get_env(
383383
# if params["aco_compiler"]:
384384
# env.add("ACO_COMPILER", "aco")
385385

386-
# FSR
387-
if params.fsr:
388-
env.add("WINE_FULLSCREEN_FSR", "1")
389-
env.add("WINE_FULLSCREEN_FSR_STRENGTH", str(params.fsr_sharpening_strength))
390-
if params.fsr_quality_mode:
391-
env.add("WINE_FULLSCREEN_FSR_MODE", str(params.fsr_quality_mode))
392-
393386
# PulseAudio latency
394387
if params.pulseaudio_latency:
395388
env.add("PULSE_LATENCY_MSEC", "60")
@@ -622,10 +615,8 @@ def _get_gamescope_cmd(self, return_steam_cmd: bool = False) -> str:
622615
gamescope_cmd.append("-S integer")
623616
if params.fsr:
624617
gamescope_cmd.append("-F fsr")
625-
# Upscaling sharpness is from 0 to 20. There are 5 FSR upscaling levels,
626-
# so multiply by 4 to reach 20
627618
gamescope_cmd.append(
628-
f"--fsr-sharpness {params.fsr_sharpening_strength * 4}"
619+
f"--fsr-sharpness {params.fsr_sharpening_strength}"
629620
)
630621
if params.gamescope_fps > 0:
631622
gamescope_cmd.append(f"-r {params.gamescope_fps}")

bottles/frontend/cli/cli.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,6 @@ def run_program(self):
673673
program.get("dxvk")
674674
program.get("vkd3d")
675675
program.get("dxvk_nvapi")
676-
program.get("fsr")
677676
program.get("gamescope")
678677
program.get("virtual_desktop")
679678

bottles/frontend/ui/bottles.gresource.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
<file preprocess="xml-stripblanks">dialog-rename.ui</file>
4141
<file preprocess="xml-stripblanks">dialog-gamescope.ui</file>
4242
<file preprocess="xml-stripblanks">dialog-vkbasalt.ui</file>
43-
<file preprocess="xml-stripblanks">dialog-fsr.ui</file>
4443
<file preprocess="xml-stripblanks">dialog-mangohud.ui</file>
4544
<file preprocess="xml-stripblanks">dialog-display.ui</file>
4645
<file preprocess="xml-stripblanks">dialog-drives.ui</file>

bottles/frontend/ui/details-preferences.blp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -98,26 +98,6 @@ template $DetailsPreferences: Adw.PreferencesPage {
9898
}
9999
}
100100

101-
Adw.ActionRow {
102-
activatable-widget: switch_fsr;
103-
title: _("FidelityFX Super Resolution");
104-
subtitle: _("Increase performance at the expense of visuals. Only works on Vulkan.");
105-
106-
Button btn_manage_fsr {
107-
tooltip-text: _("Manage FidelityFX Super Resolution settings");
108-
valign: center;
109-
icon-name: "applications-system-symbolic";
110-
111-
styles [
112-
"flat",
113-
]
114-
}
115-
116-
Switch switch_fsr {
117-
valign: center;
118-
}
119-
}
120-
121101
Adw.ActionRow row_discrete {
122102
visible: false;
123103
activatable-widget: switch_discrete;

bottles/frontend/ui/dialog-fsr.blp

Lines changed: 0 additions & 63 deletions
This file was deleted.

bottles/frontend/ui/dialog-gamescope.blp

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,33 @@ template $GamescopeDialog: Adw.Window {
107107
}
108108
}
109109

110+
Adw.PreferencesGroup {
111+
title: _("FSR");
112+
113+
Adw.ActionRow {
114+
title: _("Enable");
115+
activatable-widget: switch_fsr;
116+
117+
Switch switch_fsr {
118+
valign: center;
119+
}
120+
}
121+
122+
Adw.ActionRow {
123+
title: _("Sharpening Strength");
124+
125+
SpinButton {
126+
numeric: true;
127+
valign: center;
128+
129+
adjustment: Adjustment spin_sharpening_strength {
130+
step-increment: 4;
131+
upper: 20;
132+
};
133+
}
134+
}
135+
}
136+
110137
Adw.PreferencesGroup {
111138
title: _("Miscellaneous");
112139

0 commit comments

Comments
 (0)