diff --git a/src/dxbc/dxbc_options.cpp b/src/dxbc/dxbc_options.cpp index 05f51c089..12f1c39f4 100644 --- a/src/dxbc/dxbc_options.cpp +++ b/src/dxbc/dxbc_options.cpp @@ -26,11 +26,15 @@ namespace dxvk { zeroInitWorkgroupMemory = options.zeroInitWorkgroupMemory; - // Disable early discard on AMD due to GPU hangs + // Disable early discard on RADV due to GPU hangs // Disable early discard on Nvidia because it may hurt performance 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; + + // Apply shader-related options + applyTristate(useSubgroupOpsForEarlyDiscard, device->config().useEarlyDiscard); + applyTristate(useRawSsbo, device->config().useRawSsbo); } } \ No newline at end of file diff --git a/src/dxvk/dxvk_options.cpp b/src/dxvk/dxvk_options.cpp index 6a15abeae..15c60c033 100644 --- a/src/dxvk/dxvk_options.cpp +++ b/src/dxvk/dxvk_options.cpp @@ -6,6 +6,8 @@ namespace dxvk { allowMemoryOvercommit = config.getOption ("dxvk.allowMemoryOvercommit", false); enableStateCache = config.getOption ("dxvk.enableStateCache", true); numCompilerThreads = config.getOption ("dxvk.numCompilerThreads", 0); + useRawSsbo = config.getOption("dxvk.useRawSsbo", Tristate::Auto); + useEarlyDiscard = config.getOption("dxvk.useEarlyDiscard", Tristate::Auto); } } \ No newline at end of file diff --git a/src/dxvk/dxvk_options.h b/src/dxvk/dxvk_options.h index 4e1c39f5f..f29e9fc7c 100644 --- a/src/dxvk/dxvk_options.h +++ b/src/dxvk/dxvk_options.h @@ -18,6 +18,10 @@ namespace dxvk { /// Number of compiler threads /// when using the state cache int32_t numCompilerThreads; + + /// Shader-related options + Tristate useRawSsbo; + Tristate useEarlyDiscard; }; } \ No newline at end of file