From 58dcf77c0890e54ee4e6995de7815ae7560856ec Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sat, 15 Jun 2019 12:56:29 +0200 Subject: [PATCH] [dxbc] Disable atomic counter optimization on old RADV versions Breaks TressFX in Tomb Raider 2013 for some reason, whereas this works fine on 19.1 with both LLVM 8.0 and 9.0-git. --- src/dxbc/dxbc_options.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/dxbc/dxbc_options.cpp b/src/dxbc/dxbc_options.cpp index b45e06b0..b54cc10d 100644 --- a/src/dxbc/dxbc_options.cpp +++ b/src/dxbc/dxbc_options.cpp @@ -49,6 +49,10 @@ namespace dxvk { || adapter->matchesDriver(DxvkGpuVendor::Nvidia, VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR, 0, 0)) useSubgroupOpsForEarlyDiscard = false; + // Disable atomic counters on older RADV versions + if (adapter->matchesDriver(DxvkGpuVendor::Amd, VK_DRIVER_ID_MESA_RADV_KHR, 0, VK_MAKE_VERSION(19, 1, 0))) + useSubgroupOpsForAtomicCounters = false; + // Apply shader-related options applyTristate(useSubgroupOpsForEarlyDiscard, device->config().useEarlyDiscard); }