From 27ea1762955a04f6580fd53545f9436bc772170b Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sat, 30 Nov 2019 17:05:03 +0100 Subject: [PATCH] [d3d11] Remove d3d11.strictDivision option --- dxvk.conf | 9 --------- src/d3d11/d3d11_options.cpp | 1 - src/d3d11/d3d11_options.h | 5 ----- src/dxbc/dxbc_compiler.cpp | 15 --------------- src/dxbc/dxbc_options.cpp | 1 - src/dxbc/dxbc_options.h | 3 --- 6 files changed, 34 deletions(-) diff --git a/dxvk.conf b/dxvk.conf index f72a0c36..cff1322b 100644 --- a/dxvk.conf +++ b/dxvk.conf @@ -117,15 +117,6 @@ # d3d11.samplerAnisotropy = -1 -# Enables SM4-compliant division-by-zero behaviour. Enabling may reduce -# performance and / or cause issues in games that expect the default -# behaviour of Windows drivers, which also is not SM4-compliant. -# -# Supported values: True, False - -# d3d11.strictDivision = False - - # Replaces NaN outputs from fragment shaders with zeroes for floating # point render target. Used in some games to prevent artifacting. # diff --git a/src/d3d11/d3d11_options.cpp b/src/d3d11/d3d11_options.cpp index 86c2b523..a8f881e6 100644 --- a/src/d3d11/d3d11_options.cpp +++ b/src/d3d11/d3d11_options.cpp @@ -8,7 +8,6 @@ namespace dxvk { const DxvkDeviceInfo& devInfo = device->properties(); this->dcSingleUseMode = config.getOption("d3d11.dcSingleUseMode", true); - this->strictDivision = config.getOption("d3d11.strictDivision", false); this->enableRtOutputNanFixup = config.getOption("d3d11.enableRtOutputNanFixup", false); this->zeroInitWorkgroupMemory = config.getOption("d3d11.zeroInitWorkgroupMemory", false); this->relaxedBarriers = config.getOption("d3d11.relaxedBarriers", false); diff --git a/src/d3d11/d3d11_options.h b/src/d3d11/d3d11_options.h index e340f25e..d5758d29 100644 --- a/src/d3d11/d3d11_options.h +++ b/src/d3d11/d3d11_options.h @@ -20,11 +20,6 @@ namespace dxvk { /// than once. bool dcSingleUseMode; - /// Enables sm4-compliant division-by-zero behaviour - /// Windows drivers don't normally do this, but some - /// games may expect correct behaviour. - bool strictDivision; - /// Enables workaround to replace NaN render target /// outputs with zero bool enableRtOutputNanFixup; diff --git a/src/dxbc/dxbc_compiler.cpp b/src/dxbc/dxbc_compiler.cpp index 05ec96c3..dabdad39 100644 --- a/src/dxbc/dxbc_compiler.cpp +++ b/src/dxbc/dxbc_compiler.cpp @@ -1566,21 +1566,6 @@ namespace dxvk { break; case DxbcOpcode::Div: - dst.id = m_module.opFDiv(typeId, - src.at(0).id, src.at(1).id); - - if (m_moduleInfo.options.strictDivision) { - uint32_t boolType = dst.type.ccount > 1 - ? m_module.defVectorType(m_module.defBoolType(), dst.type.ccount) - : m_module.defBoolType(); - - dst.id = m_module.opSelect(typeId, - m_module.opFOrdNotEqual(boolType, src.at(1).id, - emitBuildConstVecf32(0.0f, 0.0f, 0.0f, 0.0f, ins.dst[0].mask).id), - dst.id, src.at(0).id); - } - break; - case DxbcOpcode::DDiv: dst.id = m_module.opFDiv(typeId, src.at(0).id, src.at(1).id); diff --git a/src/dxbc/dxbc_options.cpp b/src/dxbc/dxbc_options.cpp index 0e187d71..e60f20bf 100644 --- a/src/dxbc/dxbc_options.cpp +++ b/src/dxbc/dxbc_options.cpp @@ -38,7 +38,6 @@ namespace dxvk { } enableRtOutputNanFixup = options.enableRtOutputNanFixup; - strictDivision = options.strictDivision; zeroInitWorkgroupMemory = options.zeroInitWorkgroupMemory; dynamicIndexedConstantBufferAsSsbo = options.constantBufferRangeCheck; diff --git a/src/dxbc/dxbc_options.h b/src/dxbc/dxbc_options.h index dac8d562..4fb78140 100644 --- a/src/dxbc/dxbc_options.h +++ b/src/dxbc/dxbc_options.h @@ -35,9 +35,6 @@ namespace dxvk { /// Enables NaN fixup for render target outputs bool enableRtOutputNanFixup = false; - /// Enables sm4-compliant division-by-zero behaviour - bool strictDivision = false; - /// Implement dynamically indexed uniform buffers /// with storage buffers for tight bounds checking bool dynamicIndexedConstantBufferAsSsbo = false;