From c29f6f0bef8f0d6122ce9346ccc95ec2fb3da701 Mon Sep 17 00:00:00 2001 From: Krzysztof Bogacki Date: Fri, 6 Dec 2024 04:36:45 +0100 Subject: [PATCH] util: Spoof Ada and later GPUs as Ampere for The Great Circle --- src/util/util_env.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/util/util_env.cpp b/src/util/util_env.cpp index 732d0763..ede74fbb 100644 --- a/src/util/util_env.cpp +++ b/src/util/util_env.cpp @@ -117,6 +117,11 @@ namespace dxvk::env { } } + bool isTheGreatCircle() { + static constexpr auto name = std::string_view("TheGreatCircle.exe"); + return getExecutableName() == name; + } + bool needsAmpereSpoofing(NV_GPU_ARCHITECTURE_ID architectureId, void* pReturnAddress) { // Check if we need to workaround NVIDIA Bug 3634851 if (architectureId >= NV_GPU_ARCHITECTURE_AD100 && isDLSSVersion20To24(pReturnAddress)) { @@ -124,6 +129,11 @@ namespace dxvk::env { return true; } + if (architectureId >= NV_GPU_ARCHITECTURE_AD100 && isTheGreatCircle()) { + log::info("Spoofing Ampere for Ada and later due to detecting TheGreatCircle.exe"); + return true; + } + return false; }