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

Method opPhi

GPCS4/Graphics/SpirV/SpirvModule.cpp:3648–3664  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3646
3647
3648 uint32_t SpirvModule::opPhi(
3649 uint32_t resultType,
3650 uint32_t sourceCount,
3651 const SpirvPhiLabel* sourceLabels) {
3652 uint32_t resultId = this->allocateId();
3653
3654 m_code.putIns (spv::OpPhi, 3 + 2 * sourceCount);
3655 m_code.putWord(resultType);
3656 m_code.putWord(resultId);
3657
3658 for (uint32_t i = 0; i < sourceCount; i++) {
3659 m_code.putWord(sourceLabels[i].varId);
3660 m_code.putWord(sourceLabels[i].labelId);
3661 }
3662
3663 return resultId;
3664 }
3665
3666
3667 void SpirvModule::opReturn() {

Callers 1

emitComputeDivergenceMethod · 0.80

Calls 3

allocateIdMethod · 0.95
putInsMethod · 0.80
putWordMethod · 0.80

Tested by

no test coverage detected