| 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( |
no test coverage detected