1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-20 19:54:19 +01:00

[dxbc] Add options to enable/disble early discard and raw ssbo use

This commit is contained in:
Philip Rebohle 2019-01-08 20:58:18 +01:00
parent 524227d21c
commit 4fe5929799
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
3 changed files with 11 additions and 1 deletions

View File

@ -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);
}
}

View File

@ -6,6 +6,8 @@ namespace dxvk {
allowMemoryOvercommit = config.getOption<bool> ("dxvk.allowMemoryOvercommit", false);
enableStateCache = config.getOption<bool> ("dxvk.enableStateCache", true);
numCompilerThreads = config.getOption<int32_t> ("dxvk.numCompilerThreads", 0);
useRawSsbo = config.getOption<Tristate>("dxvk.useRawSsbo", Tristate::Auto);
useEarlyDiscard = config.getOption<Tristate>("dxvk.useEarlyDiscard", Tristate::Auto);
}
}

View File

@ -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;
};
}