diff --git a/src/spirv/spirv_module.cpp b/src/spirv/spirv_module.cpp index f8f3e13e..d347bf5d 100644 --- a/src/spirv/spirv_module.cpp +++ b/src/spirv/spirv_module.cpp @@ -576,10 +576,10 @@ namespace dxvk { uint32_t SpirvModule::defPointerType( uint32_t variableType, spv::StorageClass storageClass) { - std::array args = { + std::array args = {{ storageClass, variableType, - }; + }}; return this->defType(spv::OpTypePointer, args.size(), args.data()); @@ -599,18 +599,17 @@ namespace dxvk { uint32_t multisample, uint32_t sampled, spv::ImageFormat format) { - uint32_t resultId = this->allocateId(); + std::array args = {{ + sampledType, + dimensionality, + depth, arrayed, + multisample, + sampled, + format + }}; - m_typeConstDefs.putIns (spv::OpTypeImage, 9); - m_typeConstDefs.putWord(resultId); - m_typeConstDefs.putWord(sampledType); - m_typeConstDefs.putWord(dimensionality); - m_typeConstDefs.putWord(depth); - m_typeConstDefs.putWord(arrayed); - m_typeConstDefs.putWord(multisample); - m_typeConstDefs.putWord(sampled); - m_typeConstDefs.putWord(format); - return resultId; + return this->defType(spv::OpTypeImage, + args.size(), args.data()); } @@ -620,17 +619,6 @@ namespace dxvk { } - void SpirvModule::setImageTypeFormat( - uint32_t imageType, - spv::ImageFormat format) { - for (auto ins : m_typeConstDefs) { - if (ins.arg(1) == imageType - && ins.arg(8) == spv::ImageFormatUnknown) - ins.setArg(8, format); - } - } - - uint32_t SpirvModule::newVar( uint32_t pointerType, spv::StorageClass storageClass) { diff --git a/src/spirv/spirv_module.h b/src/spirv/spirv_module.h index c1528ca5..041b6012 100644 --- a/src/spirv/spirv_module.h +++ b/src/spirv/spirv_module.h @@ -254,10 +254,6 @@ namespace dxvk { uint32_t defSampledImageType( uint32_t imageType); - void setImageTypeFormat( - uint32_t imageType, - spv::ImageFormat format); - uint32_t newVar( uint32_t pointerType, spv::StorageClass storageClass);