MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / GetShaderDebugOpcode

Method GetShaderDebugOpcode

source/opt/instruction.cpp:695–717  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

693}
694
695NonSemanticShaderDebugInfoInstructions Instruction::GetShaderDebugOpcode()
696 const {
697 if (opcode() != spv::Op::OpExtInst &&
698 opcode() != spv::Op::OpExtInstWithForwardRefsKHR) {
699 return NonSemanticShaderDebugInfoInstructionsMax;
700 }
701
702 if (!context()->get_feature_mgr()->GetExtInstImportId_ShaderDebugInfo()) {
703 return NonSemanticShaderDebugInfoInstructionsMax;
704 }
705
706 if (GetSingleWordInOperand(kExtInstSetIdInIdx) !=
707 context()->get_feature_mgr()->GetExtInstImportId_ShaderDebugInfo()) {
708 return NonSemanticShaderDebugInfoInstructionsMax;
709 }
710
711 uint32_t opcode = GetSingleWordInOperand(kExtInstInstructionInIdx);
712 if (opcode >= NonSemanticShaderDebugInfoInstructionsMax) {
713 return NonSemanticShaderDebugInfoInstructionsMax;
714 }
715
716 return NonSemanticShaderDebugInfoInstructions(opcode);
717}
718
719CommonDebugInfoInstructions Instruction::GetCommonDebugOpcode() const {
720 if (opcode() != spv::Op::OpExtInst &&

Callers 13

ProcessGlobalValuesMethod · 0.80
InlineEntryBlockMethod · 0.80
InlineBasicBlocksMethod · 0.80
RegisterDbgFunctionMethod · 0.80
CreateDebugInlinedAtMethod · 0.80
AnalyzeDebugInstMethod · 0.80
ClearDebugInfoMethod · 0.80
TEST_FFunction · 0.80

Calls 2

get_feature_mgrMethod · 0.45

Tested by 2

TEST_FFunction · 0.64
TESTFunction · 0.64