[d3d11] Add option to enable constant buffer range checks

This commit is contained in:
Philip Rebohle 2019-04-05 20:24:08 +02:00
parent 9b99c55a2e
commit 5819a69302
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
3 changed files with 11 additions and 4 deletions

View File

@ -8,6 +8,7 @@ namespace dxvk {
this->allowMapFlagNoWait = config.getOption<bool>("d3d11.allowMapFlagNoWait", false);
this->dcSingleUseMode = config.getOption<bool>("d3d11.dcSingleUseMode", true);
this->strictDivision = config.getOption<bool>("d3d11.strictDivision", false);
this->constantBufferRangeCheck = config.getOption<bool>("d3d11.constantBufferRangeCheck", false);
this->zeroInitWorkgroupMemory = config.getOption<bool>("d3d11.zeroInitWorkgroupMemory", false);
this->relaxedBarriers = config.getOption<bool>("d3d11.relaxedBarriers", false);
this->maxTessFactor = config.getOption<int32_t>("d3d11.maxTessFactor", 0);

View File

@ -30,6 +30,11 @@ namespace dxvk {
/// games may expect correct behaviour.
bool strictDivision;
/// Enables out-of-bounds access check for constant
/// buffers. Workaround for a few broken games that
/// access random data inside their shaders.
bool constantBufferRangeCheck;
/// Zero-initialize workgroup memory
///
/// Workargound for games that don't initialize

View File

@ -29,6 +29,7 @@ namespace dxvk {
= adapter->matchesDriver(DxvkGpuVendor::Nvidia, VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR, 0, 0);
strictDivision = options.strictDivision;
constantBufferRangeCheck = options.constantBufferRangeCheck;
zeroInitWorkgroupMemory = options.zeroInitWorkgroupMemory;
// Disable early discard on RADV due to GPU hangs