From f276bcd0e7dbfeb19d18978cb58ac2e4746f7b58 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Wed, 12 Dec 2018 16:27:01 +0100 Subject: [PATCH] [dxbc] Check for RADV/Nvidia drivers explicitly using the new function This way, only RADV gets locked out of using early discard whereas AMDVLK and -PRO are able to use it. --- src/dxbc/dxbc_options.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/dxbc/dxbc_options.cpp b/src/dxbc/dxbc_options.cpp index ebc6f4e4..ac2e4373 100644 --- a/src/dxbc/dxbc_options.cpp +++ b/src/dxbc/dxbc_options.cpp @@ -10,8 +10,10 @@ namespace dxvk { DxbcOptions::DxbcOptions(const Rc& device, const D3D11Options& options) { + const Rc adapter = device->adapter(); + const DxvkDeviceFeatures& devFeatures = device->features(); - const DxvkDeviceInfo& devInfo = device->adapter()->devicePropertiesExt(); + const DxvkDeviceInfo& devInfo = adapter->devicePropertiesExt(); useStorageImageReadWithoutFormat = devFeatures.core.features.shaderStorageImageReadWithoutFormat; @@ -24,10 +26,8 @@ namespace dxvk { // Disable early discard on AMD due to GPU hangs // Disable early discard on Nvidia because it may hurt performance - auto vendor = DxvkGpuVendor(devInfo.core.properties.vendorID); - - if (vendor == DxvkGpuVendor::Amd - || vendor == DxvkGpuVendor::Nvidia) + if (adapter->matchesDriver(DxvkGpuVendor::Amd, VK_DRIVER_ID_MESA_RADV_KHR, 0, 0) + || adapter->matchesDriver(DxvkGpuVendor::Nvidia, VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR, 0, 0)) useSubgroupOpsForEarlyDiscard = false; }