proton: use Darktide's native AGS without amdxc64 on AMD-only systems

Warhammer 40,000: Darktide only offers FSR 4.1.1 on RDNA3 with its own
amd_ags_x64.dll and without our amdxc64 FSR4 provider. The reporter
confirmed that neither change alone is enough, and PROTON_FSR4_UPGRADE
doesn't bring it back either.

Default to both for the game, only when every DRM device is AMD, since
native AGS relies on Wine's builtin ADL. PROTON_NATIVE_AGS=0, an amdxc64
entry in WINEDLLOVERRIDES, or the FSR4 upgrade option opt out.

https://github.com/GloriousEggroll/proton-ge-custom/issues/869

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
GloriousEggrollandClaude Opus 5.5 committed 2026-11-02 19:53:07 -07:00
1 parent ce40c340cc
commit cc844aa75b
1 file changed
+30
+30
View File
@@ -213,6 +213,23 @@ def file_exists(s, *, follow_symlinks):
def nonzero(s):
return len(s) > 0 and s != "0"
def host_gpu_vendors():
"""PCI vendor IDs of the host's DRM devices, e.g. {"0x1002"} for AMD."""
vendors = set()
try:
cards = os.listdir("/sys/class/drm")
except OSError:
return vendors
for card in cards:
if not re.fullmatch(r"card[0-9]+", card):
continue
try:
with open("/sys/class/drm/" + card + "/device/vendor", "r") as f:
vendors.add(f.read().strip().lower())
except OSError:
pass
return vendors
def prepend_to_env_str(env, variable, prepend_str, separator):
if variable not in env:
env[variable] = prepend_str
@@ -1950,6 +1967,19 @@ class Session:
if appid == "1702330":
self.env.setdefault("PROTON_STEAM_INPUT_XBOX_PROMPTS", "1")
# Darktide only offers its own FSR 4.1.1 on RDNA3 with its native AGS and
# without our amdxc64 FSR4 provider. Only on AMD-only systems: native AGS
# uses Wine's builtin ADL, which other vendors don't have on Windows.
# PROTON_NATIVE_AGS=0 or an amdxc64 entry in WINEDLLOVERRIDES opts out, and
# PROTON_FSR4_UPGRADE keeps amdxc64. #869
if appid == "1361210" and host_gpu_vendors() == {"0x1002"}: # Warhammer 40,000: Darktide
self.env.setdefault("PROTON_NATIVE_AGS", "1")
if (nonzero(self.env["PROTON_NATIVE_AGS"]) and
"amdxc64" not in self.env.get("WINEDLLOVERRIDES", "") and
"PROTON_FSR4_UPGRADE" not in self.env and
"fsr4" not in self.compat_config):
self.dlloverrides["amdxc64"] = "d"
# Diablo IV supports native DualSense, but does not recognize the Edge PID.
# Winebus leaves Steam Input and the physical audio/haptics identity intact.
if appid == "2344520": # Diablo IV