MCPcopy Create free account
hub / github.com/Inori/GPCS4 / newVar

Method newVar

GPCS4/Graphics/SpirV/SpirvModule.cpp:885–898  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

883
884
885 uint32_t SpirvModule::newVar(
886 uint32_t pointerType,
887 spv::StorageClass storageClass) {
888 uint32_t resultId = this->allocateId();
889
890 auto& code = storageClass != spv::StorageClassFunction
891 ? m_variables : m_code;
892
893 code.putIns (spv::OpVariable, 4);
894 code.putWord (pointerType);
895 code.putWord (resultId);
896 code.putWord (storageClass);
897 return resultId;
898 }
899
900
901 uint32_t SpirvModule::newVarInit(

Callers 6

emitVsInitMethod · 0.80
emitDclBufferMethod · 0.80
emitDclTextureMethod · 0.80
emitDclSamplerMethod · 0.80
emitDclGprArrayMethod · 0.80
emitNewVariableMethod · 0.80

Calls 3

allocateIdMethod · 0.95
putInsMethod · 0.80
putWordMethod · 0.80

Tested by

no test coverage detected