mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-21 22:54:16 +01:00
[dxbc] Add options to enable/disble early discard and raw ssbo use
This commit is contained in:
parent
524227d21c
commit
4fe5929799
@ -26,11 +26,15 @@ namespace dxvk {
|
|||||||
|
|
||||||
zeroInitWorkgroupMemory = options.zeroInitWorkgroupMemory;
|
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
|
// Disable early discard on Nvidia because it may hurt performance
|
||||||
if (adapter->matchesDriver(DxvkGpuVendor::Amd, VK_DRIVER_ID_MESA_RADV_KHR, 0, 0)
|
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))
|
|| adapter->matchesDriver(DxvkGpuVendor::Nvidia, VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR, 0, 0))
|
||||||
useSubgroupOpsForEarlyDiscard = false;
|
useSubgroupOpsForEarlyDiscard = false;
|
||||||
|
|
||||||
|
// Apply shader-related options
|
||||||
|
applyTristate(useSubgroupOpsForEarlyDiscard, device->config().useEarlyDiscard);
|
||||||
|
applyTristate(useRawSsbo, device->config().useRawSsbo);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -6,6 +6,8 @@ namespace dxvk {
|
|||||||
allowMemoryOvercommit = config.getOption<bool> ("dxvk.allowMemoryOvercommit", false);
|
allowMemoryOvercommit = config.getOption<bool> ("dxvk.allowMemoryOvercommit", false);
|
||||||
enableStateCache = config.getOption<bool> ("dxvk.enableStateCache", true);
|
enableStateCache = config.getOption<bool> ("dxvk.enableStateCache", true);
|
||||||
numCompilerThreads = config.getOption<int32_t> ("dxvk.numCompilerThreads", 0);
|
numCompilerThreads = config.getOption<int32_t> ("dxvk.numCompilerThreads", 0);
|
||||||
|
useRawSsbo = config.getOption<Tristate>("dxvk.useRawSsbo", Tristate::Auto);
|
||||||
|
useEarlyDiscard = config.getOption<Tristate>("dxvk.useEarlyDiscard", Tristate::Auto);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -18,6 +18,10 @@ namespace dxvk {
|
|||||||
/// Number of compiler threads
|
/// Number of compiler threads
|
||||||
/// when using the state cache
|
/// when using the state cache
|
||||||
int32_t numCompilerThreads;
|
int32_t numCompilerThreads;
|
||||||
|
|
||||||
|
/// Shader-related options
|
||||||
|
Tristate useRawSsbo;
|
||||||
|
Tristate useEarlyDiscard;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user