Skip to content

Commit e964d6e

Browse files
Martino Fontanamirkobrombin
authored andcommitted
FSR: only set in Gamescope (remove Wine FSR)
This moves the FSR settings in Gamescope, and removes support for setting FSR in Wine. wine-ge-custom already enables FSR by default, and discourages the user from disabling it (#2636). Since Gamescope is generally more independent and is a micro-compositor with first-class support with FSR, it's safer to only have an option there, and have the runner decide for the user if Gamescope isn't being used. Having two separate FSR enablers is messy, as we need logic to avoid enabling both of them at the same time, which Bottles isn't even doing. The conditions mentioned above aren't communicated at all by having FSR as a standalone setting. Fixes #2755, #2636
1 parent 8ccc934 commit e964d6e

File tree

17 files changed

+35
-240
lines changed

17 files changed

+35
-240
lines changed

bottles/backend/managers/manager.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1096,7 +1096,6 @@ def get_programs(self, config: BottleConfig) -> List[dict]:
10961096
"dxvk": _program.get("dxvk"),
10971097
"vkd3d": _program.get("vkd3d"),
10981098
"dxvk_nvapi": _program.get("dxvk_nvapi"),
1099-
"fsr": _program.get("fsr"),
11001099
"gamescope": _program.get("gamescope"),
11011100
"pulseaudio_latency": _program.get("pulseaudio_latency"),
11021101
"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
@@ -89,8 +89,7 @@ class BottleParams(DictCompatMixIn):
8989
gamescope_custom_options: str = ""
9090
sync: str = "wine"
9191
fsr: bool = False
92-
fsr_sharpening_strength: int = 2
93-
fsr_quality_mode: str = "none"
92+
fsr_sharpening_strength: int = 8
9493
custom_dpi: int = 96
9594
renderer: str = "gl"
9695
discrete_gpu: bool = False

bottles/backend/models/samples.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@ class Samples:
6464
"ENABLE_VKBASALT": ("vkbasalt", True),
6565
"WINEESYNC": ("sync", "esync"),
6666
"WINEFSYNC": ("sync", "fsync"),
67-
"WINE_FULLSCREEN_FSR": ("fsr", True),
68-
"WINE_FULLSCREEN_FSR_STRENGTH": ("fsr_sharpening_strength", 2),
69-
"WINE_FULLSCREEN_FSR_MODE": ("fsr_quality_mode", "none"),
7067
"GAMESCOPE": ("gamescope", False),
7168
"DRI_PRIME": ("discrete_gpu", True),
7269
"__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
@@ -57,7 +57,6 @@ def __init__(
5757
program_dxvk: Optional[bool] = None,
5858
program_vkd3d: Optional[bool] = None,
5959
program_nvapi: Optional[bool] = None,
60-
program_fsr: Optional[bool] = None,
6160
program_gamescope: Optional[bool] = None,
6261
program_virt_desktop: Optional[bool] = None,
6362
program_winebridge: Optional[bool] = None,
@@ -116,16 +115,6 @@ def __init__(
116115
override_nvapi = NVAPIComponent.get_override_keys() + "=b"
117116
env_dll_overrides.append(override_nvapi)
118117

119-
if program_fsr is not None and program_fsr != self.config.Parameters.fsr:
120-
self.environment["WINE_FULLSCREEN_FSR"] = "1" if program_fsr else "0"
121-
self.environment["WINE_FULLSCREEN_FSR_STRENGTH"] = str(
122-
self.config.Parameters.fsr_sharpening_strength
123-
)
124-
if self.config.Parameters.fsr_quality_mode:
125-
self.environment["WINE_FULLSCREEN_FSR_MODE"] = str(
126-
self.config.Parameters.fsr_quality_mode
127-
)
128-
129118
if (
130119
program_gamescope is not None
131120
and program_gamescope != self.config.Parameters.gamescope
@@ -167,7 +156,6 @@ def _resolve(field: str):
167156
program_dxvk=program.get("dxvk"),
168157
program_vkd3d=program.get("vkd3d"),
169158
program_nvapi=program.get("dxvk_nvapi"),
170-
program_fsr=program.get("fsr"),
171159
program_gamescope=program.get("gamescope"),
172160
program_virt_desktop=program.get("virtual_desktop"),
173161
program_winebridge=program.get("winebridge"),

bottles/backend/wine/winecommand.py

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

449-
# FSR
450-
if params.fsr:
451-
env.add("WINE_FULLSCREEN_FSR", "1")
452-
env.add("WINE_FULLSCREEN_FSR_STRENGTH", str(params.fsr_sharpening_strength))
453-
if params.fsr_quality_mode:
454-
env.add("WINE_FULLSCREEN_FSR_MODE", str(params.fsr_quality_mode))
455-
456449
# PulseAudio latency
457450
if params.pulseaudio_latency:
458451
env.add("PULSE_LATENCY_MSEC", "60")
@@ -699,10 +692,8 @@ def _get_gamescope_cmd(self, return_steam_cmd: bool = False) -> str:
699692
gamescope_cmd.append("-S integer")
700693
if params.fsr:
701694
gamescope_cmd.append("-F fsr")
702-
# Upscaling sharpness is from 0 to 20. There are 5 FSR upscaling levels,
703-
# so multiply by 4 to reach 20
704695
gamescope_cmd.append(
705-
f"--fsr-sharpness {params.fsr_sharpening_strength * 4}"
696+
f"--fsr-sharpness {params.fsr_sharpening_strength}"
706697
)
707698
if params.gamescope_fps > 0:
708699
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
@@ -793,7 +793,6 @@ def run_program(self):
793793
program.get("dxvk")
794794
program.get("vkd3d")
795795
program.get("dxvk_nvapi")
796-
program.get("fsr")
797796
program.get("gamescope")
798797
program.get("virtual_desktop")
799798

bottles/frontend/ui/bottles.gresource.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
<file preprocess="xml-stripblanks">dialog-rename.ui</file>
4848
<file preprocess="xml-stripblanks">dialog-gamescope.ui</file>
4949
<file preprocess="xml-stripblanks">dialog-vkbasalt.ui</file>
50-
<file preprocess="xml-stripblanks">dialog-fsr.ui</file>
5150
<file preprocess="xml-stripblanks">dialog-mangohud.ui</file>
5251
<file preprocess="xml-stripblanks">dialog-display.ui</file>
5352
<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)