| 693 | } |
| 694 | |
| 695 | NonSemanticShaderDebugInfoInstructions 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 | |
| 719 | CommonDebugInfoInstructions Instruction::GetCommonDebugOpcode() const { |
| 720 | if (opcode() != spv::Op::OpExtInst && |