diff --git a/src/dxbc/dxbc_compiler.cpp b/src/dxbc/dxbc_compiler.cpp index 2cd766695..ffe861437 100644 --- a/src/dxbc/dxbc_compiler.cpp +++ b/src/dxbc/dxbc_compiler.cpp @@ -44,13 +44,6 @@ namespace dxvk { m_oRegs.at(i) = DxbcRegisterPointer { }; } - // Clear spec constants - for (uint32_t i = 0; i < m_specConstants.size(); i++) { - m_specConstants.at(i) = DxbcRegisterValue { - DxbcVectorType { DxbcScalarType::Uint32, 0 }, - 0 }; - } - this->emitInit(); } @@ -5450,43 +5443,6 @@ namespace dxvk { m_module.setDebugName(id, name); return id; } - - - DxbcRegisterValue DxbcCompiler::getSpecConstant(DxvkSpecConstantId specId) { - const uint32_t specIdOffset = uint32_t(specId) - uint32_t(DxvkSpecConstantId::SpecConstantIdMin); - - // Look up spec constant in the array - DxbcRegisterValue value = m_specConstants.at(specIdOffset); - - if (value.id != 0) - return value; - - // Declare a new specialization constant if needed - DxbcSpecConstant info = getSpecConstantProperties(specId); - - value.type.ctype = info.ctype; - value.type.ccount = info.ccount; - value.id = m_module.specConst32( - getVectorTypeId(value.type), - info.value); - - m_module.decorateSpecId(value.id, uint32_t(specId)); - m_module.setDebugName(value.id, info.name); - - m_specConstants.at(specIdOffset) = value; - return value; - } - - - DxbcSpecConstant DxbcCompiler::getSpecConstantProperties(DxvkSpecConstantId specId) { - static const std::array s_specConstants = {{ - { DxbcScalarType::Uint32, 1, 1, "RasterizerSampleCount" }, - }}; - - return s_specConstants.at(uint32_t(specId) - uint32_t(DxvkSpecConstantId::SpecConstantIdMin)); - } void DxbcCompiler::emitInputSetup() { diff --git a/src/dxbc/dxbc_compiler.h b/src/dxbc/dxbc_compiler.h index bd4256306..e4f9eb0e5 100644 --- a/src/dxbc/dxbc_compiler.h +++ b/src/dxbc/dxbc_compiler.h @@ -471,13 +471,6 @@ namespace dxvk { // to properly end functions in some cases. bool m_insideFunction = false; - /////////////////////////////////////////////// - // Specialization constants. These are defined - // as needed by the getSpecConstant method. - std::array m_specConstants; - /////////////////////////////////////////////////////////// // Array of input values. Since v# registers are indexable // in DXBC, we need to copy them into an array first. @@ -994,12 +987,6 @@ namespace dxvk { uint32_t value, const char* name); - DxbcRegisterValue getSpecConstant( - DxvkSpecConstantId specId); - - DxbcSpecConstant getSpecConstantProperties( - DxvkSpecConstantId specId); - //////////////////////////// // Input/output preparation void emitInputSetup();