1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-18 20:52:10 +01:00

[dxbc] Remove old spec constant code

This commit is contained in:
Philip Rebohle 2019-04-30 21:09:01 +02:00
parent dc3cfc9fa0
commit 04e6479690
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 0 additions and 57 deletions

View File

@ -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<DxbcSpecConstant,
uint32_t(DxvkSpecConstantId::SpecConstantIdMax) -
uint32_t(DxvkSpecConstantId::SpecConstantIdMin) + 1> s_specConstants = {{
{ DxbcScalarType::Uint32, 1, 1, "RasterizerSampleCount" },
}};
return s_specConstants.at(uint32_t(specId) - uint32_t(DxvkSpecConstantId::SpecConstantIdMin));
}
void DxbcCompiler::emitInputSetup() {

View File

@ -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<DxbcRegisterValue,
uint32_t(DxvkSpecConstantId::SpecConstantIdMax) -
uint32_t(DxvkSpecConstantId::SpecConstantIdMin) + 1> 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();