1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-14 04:29:15 +01:00

[d3d11] Add option to force compute shader UAV synchronization

This commit is contained in:
Philip Rebohle 2025-02-26 22:29:38 +01:00 committed by Philip Rebohle
parent 396a4e0235
commit 6b5d595b3e
3 changed files with 9 additions and 0 deletions

View File

@ -15,6 +15,7 @@ namespace dxvk {
D3D11Options::D3D11Options(const Config& config) {
this->zeroInitWorkgroupMemory = config.getOption<bool>("d3d11.zeroInitWorkgroupMemory", false);
this->forceVolatileTgsmAccess = config.getOption<bool>("d3d11.forceVolatileTgsmAccess", false);
this->forceComputeUavBarriers = config.getOption<bool>("d3d11.forceComputeUavBarriers", false);
this->relaxedBarriers = config.getOption<bool>("d3d11.relaxedBarriers", false);
this->relaxedGraphicsBarriers = config.getOption<bool>("d3d11.relaxedGraphicsBarriers", false);
this->maxTessFactor = config.getOption<int32_t>("d3d11.maxTessFactor", 0);

View File

@ -26,6 +26,13 @@ namespace dxvk {
/// without explicit synchronization.
bool forceVolatileTgsmAccess = false;
/// Force UAV synchronization insided compute shaders
///
/// Workaround for compute shaders that access overlapping
/// memory regions within a UAV without proper workgroup
/// synchroniation. Will have a negative performance impact.
bool forceComputeUavBarriers = false;
/// Use relaxed memory barriers
///
/// May improve performance in some games,

View File

@ -35,6 +35,7 @@ namespace dxvk {
invariantPosition = options.invariantPosition;
zeroInitWorkgroupMemory = options.zeroInitWorkgroupMemory;
forceVolatileTgsmAccess = options.forceVolatileTgsmAccess;
forceComputeUavBarriers = options.forceComputeUavBarriers;
disableMsaa = options.disableMsaa;
forceSampleRateShading = options.forceSampleRateShading;
enableSampleShadingInterlock = device->features().extFragmentShaderInterlock.fragmentShaderSampleInterlock;