From 7beb344f6fc676ca57dff0f30cb92a5cba279036 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Fri, 18 Jun 2021 15:43:24 +0200 Subject: [PATCH] [dxbc] Remove dxvk.useEarlyDiscard option No longer relevant on drivers that support DemoteToHelperInvocation. Closes #2109. --- dxvk.conf | 15 --------------- src/dxbc/dxbc_options.cpp | 5 +---- src/dxso/dxso_options.cpp | 2 -- src/dxvk/dxvk_options.cpp | 1 - src/dxvk/dxvk_options.h | 1 - 5 files changed, 1 insertion(+), 23 deletions(-) diff --git a/dxvk.conf b/dxvk.conf index 332c88c45..efc24bc0f 100644 --- a/dxvk.conf +++ b/dxvk.conf @@ -217,21 +217,6 @@ # dxvk.useRawSsbo = Auto -# Toggles early discard. -# -# Uses subgroup operations to determine whether it is safe to -# discard fragments before the end of a fragment shader. This -# is enabled by default on all drivers except RADV and Nvidia. -# Enabling this may improve or degrade performance depending -# on the game and hardware, or cause other issues. -# -# Supported values: -# - Auto: Don't change the default -# - True, False: Always enable / disable - -# dxvk.useEarlyDiscard = Auto - - # Controls workaround for NVIDIA HVV Heap bug. # # Limits the budget of NVIDIA's HVV (host-visible, diff --git a/src/dxbc/dxbc_options.cpp b/src/dxbc/dxbc_options.cpp index 6960515ed..916d5bbf5 100644 --- a/src/dxbc/dxbc_options.cpp +++ b/src/dxbc/dxbc_options.cpp @@ -43,7 +43,7 @@ namespace dxvk { forceTgsmBarriers = options.forceTgsmBarriers; dynamicIndexedConstantBufferAsSsbo = options.constantBufferRangeCheck; - // Disable early discard on Nvidia because it may hurt performance + // Disable subgroup early discard on Nvidia because it may hurt performance if (adapter->matchesDriver(DxvkGpuVendor::Nvidia, VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR, 0, 0)) useSubgroupOpsForEarlyDiscard = false; @@ -51,9 +51,6 @@ namespace dxvk { 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); - // Figure out float control flags to match D3D11 rules if (options.floatControls) { if (devInfo.khrShaderFloatControls.shaderSignedZeroInfNanPreserveFloat32) diff --git a/src/dxso/dxso_options.cpp b/src/dxso/dxso_options.cpp index 2866ace0e..a06f25b34 100644 --- a/src/dxso/dxso_options.cpp +++ b/src/dxso/dxso_options.cpp @@ -27,8 +27,6 @@ namespace dxvk { useSubgroupOpsForEarlyDiscard = false; // Apply shader-related options - applyTristate(useSubgroupOpsForEarlyDiscard, device->config().useEarlyDiscard); - strictConstantCopies = options.strictConstantCopies; strictPow = options.strictPow; diff --git a/src/dxvk/dxvk_options.cpp b/src/dxvk/dxvk_options.cpp index 9dd589f77..8b62af167 100644 --- a/src/dxvk/dxvk_options.cpp +++ b/src/dxvk/dxvk_options.cpp @@ -8,7 +8,6 @@ namespace dxvk { enableOpenXR = config.getOption ("dxvk.enableOpenXR", true); numCompilerThreads = config.getOption ("dxvk.numCompilerThreads", 0); useRawSsbo = config.getOption("dxvk.useRawSsbo", Tristate::Auto); - useEarlyDiscard = config.getOption("dxvk.useEarlyDiscard", Tristate::Auto); halveNvidiaHVVHeap = config.getOption("dxvk.halveNvidiaHVVHeap", Tristate::Auto); hud = config.getOption("dxvk.hud", ""); } diff --git a/src/dxvk/dxvk_options.h b/src/dxvk/dxvk_options.h index ac5b2c681..343cba0a3 100644 --- a/src/dxvk/dxvk_options.h +++ b/src/dxvk/dxvk_options.h @@ -23,7 +23,6 @@ namespace dxvk { /// Shader-related options Tristate useRawSsbo; - Tristate useEarlyDiscard; /// Workaround for NVIDIA driver /// bug 3114283. Cut usable HVV