Skip to content

Commit

Permalink
util: Spoof Ada and later GPUs as Ampere for The Great Circle
Browse files Browse the repository at this point in the history
  • Loading branch information
Saancreed authored and jp7677 committed Dec 6, 2024
1 parent 70b5ce4 commit c29f6f0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/util/util_env.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,23 @@ 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)) {
log::info("Spoofing Ampere for Ada and later due to DLSS version 2.0-2.4");
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;
}

Expand Down

0 comments on commit c29f6f0

Please sign in to comment.