• Home
  • Raw
  • Download

Lines Matching refs:_

40 uint32_t GetSizeTBitWidth(const ValidationState_t& _) {  in GetSizeTBitWidth()  argument
41 if (_.addressing_model() == SpvAddressingModelPhysical32) return 32; in GetSizeTBitWidth()
43 if (_.addressing_model() == SpvAddressingModelPhysical64) return 64; in GetSizeTBitWidth()
51 ValidationState_t& _, const std::string& operand_name, in ValidateOperandForDebugInfo() argument
54 auto* operand = _.FindDef(inst->word(word_index)); in ValidateOperandForDebugInfo()
57 if (_.grammar().lookupOpcode(expected_opcode, &desc) != SPV_SUCCESS || in ValidateOperandForDebugInfo()
59 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateOperandForDebugInfo()
63 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateOperandForDebugInfo()
73 auto result = ValidateOperandForDebugInfo(_, NAME, opcode, inst, index, \
82 const ValidationState_t& _, in DoesDebugInfoOperandMatchExpectation() argument
86 auto* debug_inst = _.FindDef(inst->word(word_index)); in DoesDebugInfoOperandMatchExpectation()
99 ValidationState_t& _, const std::string& debug_inst_name, in ValidateDebugInfoOperand() argument
106 if (DoesDebugInfoOperandMatchExpectation(_, expectation, inst, word_index)) in ValidateDebugInfoOperand()
110 _.grammar().lookupExtInst(SPV_EXT_INST_TYPE_OPENCL_DEBUGINFO_100, in ValidateDebugInfoOperand()
112 if (_.grammar().lookupExtInst(SPV_EXT_INST_TYPE_OPENCL_DEBUGINFO_100, in ValidateDebugInfoOperand()
115 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateDebugInfoOperand()
119 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateDebugInfoOperand()
127 auto result = ValidateDebugInfoOperand(_, NAME, debug_opcode, inst, index, \
135 ValidationState_t& _, const Instruction* inst, uint32_t word_index, in ValidateOperandBaseType() argument
137 return ValidateDebugInfoOperand(_, "Base Type", in ValidateOperandBaseType()
147 ValidationState_t& _, const std::string& debug_inst_name, in ValidateOperandLexicalScope() argument
157 if (DoesDebugInfoOperandMatchExpectation(_, expectation, inst, word_index)) in ValidateOperandLexicalScope()
160 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateOperandLexicalScope()
170 ValidationState_t& _, const std::string& debug_inst_name, in ValidateOperandDebugType() argument
185 if (DoesDebugInfoOperandMatchExpectation(_, expectation, inst, word_index)) in ValidateOperandDebugType()
188 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateOperandDebugType()
194 bool IsUint32Constant(ValidationState_t& _, uint32_t id) { in IsUint32Constant() argument
195 auto inst = _.FindDef(id); in IsUint32Constant()
200 auto type = _.FindDef(inst->type_id()); in IsUint32Constant()
216 spv_result_t ValidateClspvReflectionKernel(ValidationState_t& _, in ValidateClspvReflectionKernel() argument
219 const auto kernel = _.FindDef(kernel_id); in ValidateClspvReflectionKernel()
221 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionKernel()
226 for (auto entry_point : _.entry_points()) { in ValidateClspvReflectionKernel()
233 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionKernel()
237 const auto* exec_models = _.GetExecutionModels(kernel_id); in ValidateClspvReflectionKernel()
239 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionKernel()
244 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionKernel()
249 auto name = _.FindDef(inst->GetOperandAs<uint32_t>(5)); in ValidateClspvReflectionKernel()
251 return _.diag(SPV_ERROR_INVALID_ID, inst) << "Name must be an OpString"; in ValidateClspvReflectionKernel()
257 for (auto& desc : _.entry_point_descriptions(kernel_id)) { in ValidateClspvReflectionKernel()
264 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionKernel()
271 spv_result_t ValidateClspvReflectionArgumentInfo(ValidationState_t& _, in ValidateClspvReflectionArgumentInfo() argument
274 if (_.GetIdOpcode(inst->GetOperandAs<uint32_t>(4)) != SpvOpString) { in ValidateClspvReflectionArgumentInfo()
275 return _.diag(SPV_ERROR_INVALID_ID, inst) << "Name must be an OpString"; in ValidateClspvReflectionArgumentInfo()
278 if (_.GetIdOpcode(inst->GetOperandAs<uint32_t>(5)) != SpvOpString) { in ValidateClspvReflectionArgumentInfo()
279 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionArgumentInfo()
284 if (!IsUint32Constant(_, inst->GetOperandAs<uint32_t>(6))) { in ValidateClspvReflectionArgumentInfo()
285 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionArgumentInfo()
291 if (!IsUint32Constant(_, inst->GetOperandAs<uint32_t>(7))) { in ValidateClspvReflectionArgumentInfo()
292 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionArgumentInfo()
298 if (!IsUint32Constant(_, inst->GetOperandAs<uint32_t>(8))) { in ValidateClspvReflectionArgumentInfo()
299 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionArgumentInfo()
308 spv_result_t ValidateKernelDecl(ValidationState_t& _, const Instruction* inst) { in ValidateKernelDecl() argument
310 const auto decl = _.FindDef(decl_id); in ValidateKernelDecl()
312 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateKernelDecl()
317 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateKernelDecl()
324 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateKernelDecl()
331 spv_result_t ValidateArgInfo(ValidationState_t& _, const Instruction* inst, in ValidateArgInfo() argument
333 auto info = _.FindDef(inst->GetOperandAs<uint32_t>(info_index)); in ValidateArgInfo()
335 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateArgInfo()
340 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateArgInfo()
346 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateArgInfo()
353 spv_result_t ValidateClspvReflectionArgumentBuffer(ValidationState_t& _, in ValidateClspvReflectionArgumentBuffer() argument
356 if (auto error = ValidateKernelDecl(_, inst)) { in ValidateClspvReflectionArgumentBuffer()
360 if (!IsUint32Constant(_, inst->GetOperandAs<uint32_t>(5))) { in ValidateClspvReflectionArgumentBuffer()
361 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionArgumentBuffer()
365 if (!IsUint32Constant(_, inst->GetOperandAs<uint32_t>(6))) { in ValidateClspvReflectionArgumentBuffer()
366 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionArgumentBuffer()
370 if (!IsUint32Constant(_, inst->GetOperandAs<uint32_t>(7))) { in ValidateClspvReflectionArgumentBuffer()
371 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionArgumentBuffer()
376 if (auto error = ValidateArgInfo(_, inst, 8)) { in ValidateClspvReflectionArgumentBuffer()
384 spv_result_t ValidateClspvReflectionArgumentPodBuffer(ValidationState_t& _, in ValidateClspvReflectionArgumentPodBuffer() argument
387 if (auto error = ValidateKernelDecl(_, inst)) { in ValidateClspvReflectionArgumentPodBuffer()
391 if (!IsUint32Constant(_, inst->GetOperandAs<uint32_t>(5))) { in ValidateClspvReflectionArgumentPodBuffer()
392 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionArgumentPodBuffer()
396 if (!IsUint32Constant(_, inst->GetOperandAs<uint32_t>(6))) { in ValidateClspvReflectionArgumentPodBuffer()
397 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionArgumentPodBuffer()
401 if (!IsUint32Constant(_, inst->GetOperandAs<uint32_t>(7))) { in ValidateClspvReflectionArgumentPodBuffer()
402 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionArgumentPodBuffer()
406 if (!IsUint32Constant(_, inst->GetOperandAs<uint32_t>(8))) { in ValidateClspvReflectionArgumentPodBuffer()
407 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionArgumentPodBuffer()
411 if (!IsUint32Constant(_, inst->GetOperandAs<uint32_t>(9))) { in ValidateClspvReflectionArgumentPodBuffer()
412 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionArgumentPodBuffer()
417 if (auto error = ValidateArgInfo(_, inst, 10)) { in ValidateClspvReflectionArgumentPodBuffer()
426 ValidationState_t& _, const Instruction* inst) { in ValidateClspvReflectionArgumentPodPushConstant() argument
428 if (auto error = ValidateKernelDecl(_, inst)) { in ValidateClspvReflectionArgumentPodPushConstant()
432 if (!IsUint32Constant(_, inst->GetOperandAs<uint32_t>(5))) { in ValidateClspvReflectionArgumentPodPushConstant()
433 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionArgumentPodPushConstant()
437 if (!IsUint32Constant(_, inst->GetOperandAs<uint32_t>(6))) { in ValidateClspvReflectionArgumentPodPushConstant()
438 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionArgumentPodPushConstant()
442 if (!IsUint32Constant(_, inst->GetOperandAs<uint32_t>(7))) { in ValidateClspvReflectionArgumentPodPushConstant()
443 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionArgumentPodPushConstant()
448 if (auto error = ValidateArgInfo(_, inst, 8)) { in ValidateClspvReflectionArgumentPodPushConstant()
456 spv_result_t ValidateClspvReflectionArgumentWorkgroup(ValidationState_t& _, in ValidateClspvReflectionArgumentWorkgroup() argument
459 if (auto error = ValidateKernelDecl(_, inst)) { in ValidateClspvReflectionArgumentWorkgroup()
463 if (!IsUint32Constant(_, inst->GetOperandAs<uint32_t>(5))) { in ValidateClspvReflectionArgumentWorkgroup()
464 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionArgumentWorkgroup()
468 if (!IsUint32Constant(_, inst->GetOperandAs<uint32_t>(6))) { in ValidateClspvReflectionArgumentWorkgroup()
469 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionArgumentWorkgroup()
473 if (!IsUint32Constant(_, inst->GetOperandAs<uint32_t>(7))) { in ValidateClspvReflectionArgumentWorkgroup()
474 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionArgumentWorkgroup()
479 if (auto error = ValidateArgInfo(_, inst, 8)) { in ValidateClspvReflectionArgumentWorkgroup()
488 ValidationState_t& _, const Instruction* inst) { in ValidateClspvReflectionSpecConstantTriple() argument
489 if (!IsUint32Constant(_, inst->GetOperandAs<uint32_t>(4))) { in ValidateClspvReflectionSpecConstantTriple()
490 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionSpecConstantTriple()
494 if (!IsUint32Constant(_, inst->GetOperandAs<uint32_t>(5))) { in ValidateClspvReflectionSpecConstantTriple()
495 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionSpecConstantTriple()
499 if (!IsUint32Constant(_, inst->GetOperandAs<uint32_t>(6))) { in ValidateClspvReflectionSpecConstantTriple()
500 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionSpecConstantTriple()
508 ValidationState_t& _, const Instruction* inst) { in ValidateClspvReflectionSpecConstantWorkDim() argument
509 if (!IsUint32Constant(_, inst->GetOperandAs<uint32_t>(4))) { in ValidateClspvReflectionSpecConstantWorkDim()
510 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionSpecConstantWorkDim()
517 spv_result_t ValidateClspvReflectionPushConstant(ValidationState_t& _, in ValidateClspvReflectionPushConstant() argument
519 if (!IsUint32Constant(_, inst->GetOperandAs<uint32_t>(4))) { in ValidateClspvReflectionPushConstant()
520 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionPushConstant()
524 if (!IsUint32Constant(_, inst->GetOperandAs<uint32_t>(5))) { in ValidateClspvReflectionPushConstant()
525 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionPushConstant()
532 spv_result_t ValidateClspvReflectionConstantData(ValidationState_t& _, in ValidateClspvReflectionConstantData() argument
534 if (!IsUint32Constant(_, inst->GetOperandAs<uint32_t>(4))) { in ValidateClspvReflectionConstantData()
535 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionConstantData()
539 if (!IsUint32Constant(_, inst->GetOperandAs<uint32_t>(5))) { in ValidateClspvReflectionConstantData()
540 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionConstantData()
544 if (_.GetIdOpcode(inst->GetOperandAs<uint32_t>(6)) != SpvOpString) { in ValidateClspvReflectionConstantData()
545 return _.diag(SPV_ERROR_INVALID_ID, inst) << "Data must be an OpString"; in ValidateClspvReflectionConstantData()
551 spv_result_t ValidateClspvReflectionSampler(ValidationState_t& _, in ValidateClspvReflectionSampler() argument
553 if (!IsUint32Constant(_, inst->GetOperandAs<uint32_t>(4))) { in ValidateClspvReflectionSampler()
554 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionSampler()
558 if (!IsUint32Constant(_, inst->GetOperandAs<uint32_t>(5))) { in ValidateClspvReflectionSampler()
559 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionSampler()
563 if (!IsUint32Constant(_, inst->GetOperandAs<uint32_t>(6))) { in ValidateClspvReflectionSampler()
564 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionSampler()
572 ValidationState_t& _, const Instruction* inst) { in ValidateClspvReflectionPropertyRequiredWorkgroupSize() argument
573 if (auto error = ValidateKernelDecl(_, inst)) { in ValidateClspvReflectionPropertyRequiredWorkgroupSize()
577 if (!IsUint32Constant(_, inst->GetOperandAs<uint32_t>(5))) { in ValidateClspvReflectionPropertyRequiredWorkgroupSize()
578 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionPropertyRequiredWorkgroupSize()
582 if (!IsUint32Constant(_, inst->GetOperandAs<uint32_t>(6))) { in ValidateClspvReflectionPropertyRequiredWorkgroupSize()
583 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionPropertyRequiredWorkgroupSize()
587 if (!IsUint32Constant(_, inst->GetOperandAs<uint32_t>(7))) { in ValidateClspvReflectionPropertyRequiredWorkgroupSize()
588 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionPropertyRequiredWorkgroupSize()
595 spv_result_t ValidateClspvReflectionInstruction(ValidationState_t& _, in ValidateClspvReflectionInstruction() argument
598 if (!_.IsVoidType(inst->type_id())) { in ValidateClspvReflectionInstruction()
599 return _.diag(SPV_ERROR_INVALID_ID, inst) in ValidateClspvReflectionInstruction()
606 return ValidateClspvReflectionKernel(_, inst); in ValidateClspvReflectionInstruction()
608 return ValidateClspvReflectionArgumentInfo(_, inst); in ValidateClspvReflectionInstruction()
614 return ValidateClspvReflectionArgumentBuffer(_, inst); in ValidateClspvReflectionInstruction()
617 return ValidateClspvReflectionArgumentPodBuffer(_, inst); in ValidateClspvReflectionInstruction()
619 return ValidateClspvReflectionArgumentPodPushConstant(_, inst); in ValidateClspvReflectionInstruction()
621 return ValidateClspvReflectionArgumentWorkgroup(_, inst); in ValidateClspvReflectionInstruction()
624 return ValidateClspvReflectionSpecConstantTriple(_, inst); in ValidateClspvReflectionInstruction()
626 return ValidateClspvReflectionSpecConstantWorkDim(_, inst); in ValidateClspvReflectionInstruction()
633 return ValidateClspvReflectionPushConstant(_, inst); in ValidateClspvReflectionInstruction()
636 return ValidateClspvReflectionConstantData(_, inst); in ValidateClspvReflectionInstruction()
638 return ValidateClspvReflectionSampler(_, inst); in ValidateClspvReflectionInstruction()
640 return ValidateClspvReflectionPropertyRequiredWorkgroupSize(_, inst); in ValidateClspvReflectionInstruction()
648 bool IsConstIntScalarTypeWith32Or64Bits(ValidationState_t& _, in IsConstIntScalarTypeWith32Or64Bits() argument
651 if (!_.IsIntScalarType(instr->type_id())) return false; in IsConstIntScalarTypeWith32Or64Bits()
652 uint32_t size_in_bits = _.GetBitWidth(instr->type_id()); in IsConstIntScalarTypeWith32Or64Bits()
656 bool IsConstWithIntScalarType(ValidationState_t& _, const Instruction* inst, in IsConstWithIntScalarType() argument
658 auto* int_scalar_const = _.FindDef(inst->word(word_index)); in IsConstWithIntScalarType()
660 _.IsIntScalarType(int_scalar_const->type_id())) { in IsConstWithIntScalarType()
666 bool IsDebugVariableWithIntScalarType(ValidationState_t& _, in IsDebugVariableWithIntScalarType() argument
669 auto* dbg_int_scalar_var = _.FindDef(inst->word(word_index)); in IsDebugVariableWithIntScalarType()
674 auto* dbg_type = _.FindDef(dbg_int_scalar_var->word(6)); in IsDebugVariableWithIntScalarType()
689 spv_result_t ValidateExtension(ValidationState_t& _, const Instruction* inst) { in ValidateExtension() argument
690 if (_.version() < SPV_SPIRV_VERSION_WORD(1, 4)) { in ValidateExtension()
694 return _.diag(SPV_ERROR_WRONG_VERSION, inst) in ValidateExtension()
703 spv_result_t ValidateExtInstImport(ValidationState_t& _, in ValidateExtInstImport() argument
706 if (!_.HasExtension(kSPV_KHR_non_semantic_info)) { in ValidateExtInstImport()
710 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInstImport()
719 spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { in ValidateExtInst() argument
728 auto ext_inst_name = [&_, ext_inst_set, ext_inst_type, ext_inst_index]() { in ValidateExtInst()
730 if (_.grammar().lookupExtInst(ext_inst_type, ext_inst_index, &desc) != in ValidateExtInst()
736 auto* import_inst = _.FindDef(ext_inst_set); in ValidateExtInst()
773 if (!_.IsFloatScalarOrVectorType(result_type)) { in ValidateExtInst()
774 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
781 const uint32_t operand_type = _.GetOperandTypeId(inst, operand_index); in ValidateExtInst()
783 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
803 if (!_.IsIntScalarOrVectorType(result_type)) { in ValidateExtInst()
804 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
809 const uint32_t result_type_bit_width = _.GetBitWidth(result_type); in ValidateExtInst()
810 const uint32_t result_type_dimension = _.GetDimension(result_type); in ValidateExtInst()
814 const uint32_t operand_type = _.GetOperandTypeId(inst, operand_index); in ValidateExtInst()
815 if (!_.IsIntScalarOrVectorType(operand_type)) { in ValidateExtInst()
816 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
821 if (result_type_dimension != _.GetDimension(operand_type)) { in ValidateExtInst()
822 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
828 if (result_type_bit_width != _.GetBitWidth(operand_type)) { in ValidateExtInst()
829 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
838 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
868 if (!_.IsFloatScalarOrVectorType(result_type)) { in ValidateExtInst()
869 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
875 const uint32_t result_type_bit_width = _.GetBitWidth(result_type); in ValidateExtInst()
877 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
885 const uint32_t operand_type = _.GetOperandTypeId(inst, operand_index); in ValidateExtInst()
887 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
897 const uint32_t x_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
902 if (!_.GetMatrixTypeInfo(x_type, &num_rows, &num_cols, &col_type, in ValidateExtInst()
905 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
911 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
924 if (!_.GetMatrixTypeInfo(result_type, &num_rows, &num_cols, &col_type, in ValidateExtInst()
927 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
932 const uint32_t x_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
934 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
942 if (!_.IsFloatScalarOrVectorType(result_type)) { in ValidateExtInst()
943 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
948 const uint32_t x_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
949 const uint32_t i_type = _.GetOperandTypeId(inst, 5); in ValidateExtInst()
952 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
959 if (!_.GetPointerTypeInfo(i_type, &i_data_type, &i_storage_class)) { in ValidateExtInst()
960 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
966 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
976 if (!_.GetStructMemberTypes(result_type, &result_types) || in ValidateExtInst()
978 !_.IsFloatScalarOrVectorType(result_types[0]) || in ValidateExtInst()
980 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
986 const uint32_t x_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
988 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
997 if (!_.IsFloatScalarOrVectorType(result_type)) { in ValidateExtInst()
998 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1003 const uint32_t x_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
1004 const uint32_t exp_type = _.GetOperandTypeId(inst, 5); in ValidateExtInst()
1007 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1014 if (!_.GetPointerTypeInfo(exp_type, &exp_data_type, in ValidateExtInst()
1016 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1021 if (!_.IsIntScalarOrVectorType(exp_data_type) || in ValidateExtInst()
1022 (!_.HasExtension(kSPV_AMD_gpu_shader_int16) && in ValidateExtInst()
1023 _.GetBitWidth(exp_data_type) != 32) || in ValidateExtInst()
1024 (_.HasExtension(kSPV_AMD_gpu_shader_int16) && in ValidateExtInst()
1025 _.GetBitWidth(exp_data_type) != 16 && in ValidateExtInst()
1026 _.GetBitWidth(exp_data_type) != 32)) { in ValidateExtInst()
1027 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1030 << (_.HasExtension(kSPV_AMD_gpu_shader_int16) in ValidateExtInst()
1036 if (_.GetDimension(result_type) != _.GetDimension(exp_data_type)) { in ValidateExtInst()
1037 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1047 if (!_.IsFloatScalarOrVectorType(result_type)) { in ValidateExtInst()
1048 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1053 const uint32_t x_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
1054 const uint32_t exp_type = _.GetOperandTypeId(inst, 5); in ValidateExtInst()
1057 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1062 if (!_.IsIntScalarOrVectorType(exp_type)) { in ValidateExtInst()
1063 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1069 if (_.GetDimension(result_type) != _.GetDimension(exp_type)) { in ValidateExtInst()
1070 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1081 if (!_.GetStructMemberTypes(result_type, &result_types) || in ValidateExtInst()
1083 !_.IsFloatScalarOrVectorType(result_types[0]) || in ValidateExtInst()
1084 !_.IsIntScalarOrVectorType(result_types[1]) || in ValidateExtInst()
1085 (!_.HasExtension(kSPV_AMD_gpu_shader_int16) && in ValidateExtInst()
1086 _.GetBitWidth(result_types[1]) != 32) || in ValidateExtInst()
1087 (_.HasExtension(kSPV_AMD_gpu_shader_int16) && in ValidateExtInst()
1088 _.GetBitWidth(result_types[1]) != 16 && in ValidateExtInst()
1089 _.GetBitWidth(result_types[1]) != 32) || in ValidateExtInst()
1090 _.GetDimension(result_types[0]) != in ValidateExtInst()
1091 _.GetDimension(result_types[1])) { in ValidateExtInst()
1092 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1096 << (_.HasExtension(kSPV_AMD_gpu_shader_int16) in ValidateExtInst()
1103 const uint32_t x_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
1105 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1115 if (!_.IsIntScalarType(result_type) || in ValidateExtInst()
1116 _.GetBitWidth(result_type) != 32) { in ValidateExtInst()
1117 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1122 const uint32_t v_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
1123 if (!_.IsFloatVectorType(v_type) || _.GetDimension(v_type) != 4 || in ValidateExtInst()
1124 _.GetBitWidth(v_type) != 32) { in ValidateExtInst()
1125 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1135 if (!_.IsIntScalarType(result_type) || in ValidateExtInst()
1136 _.GetBitWidth(result_type) != 32) { in ValidateExtInst()
1137 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1142 const uint32_t v_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
1143 if (!_.IsFloatVectorType(v_type) || _.GetDimension(v_type) != 2 || in ValidateExtInst()
1144 _.GetBitWidth(v_type) != 32) { in ValidateExtInst()
1145 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1153 if (!_.IsFloatScalarType(result_type) || in ValidateExtInst()
1154 _.GetBitWidth(result_type) != 64) { in ValidateExtInst()
1155 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1160 const uint32_t v_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
1161 if (!_.IsIntVectorType(v_type) || _.GetDimension(v_type) != 2 || in ValidateExtInst()
1162 _.GetBitWidth(v_type) != 32) { in ValidateExtInst()
1163 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1172 if (!_.IsFloatVectorType(result_type) || in ValidateExtInst()
1173 _.GetDimension(result_type) != 4 || in ValidateExtInst()
1174 _.GetBitWidth(result_type) != 32) { in ValidateExtInst()
1175 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1181 const uint32_t v_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
1182 if (!_.IsIntScalarType(v_type) || _.GetBitWidth(v_type) != 32) { in ValidateExtInst()
1183 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1193 if (!_.IsFloatVectorType(result_type) || in ValidateExtInst()
1194 _.GetDimension(result_type) != 2 || in ValidateExtInst()
1195 _.GetBitWidth(result_type) != 32) { in ValidateExtInst()
1196 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1202 const uint32_t v_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
1203 if (!_.IsIntScalarType(v_type) || _.GetBitWidth(v_type) != 32) { in ValidateExtInst()
1204 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1212 if (!_.IsIntVectorType(result_type) || in ValidateExtInst()
1213 _.GetDimension(result_type) != 2 || in ValidateExtInst()
1214 _.GetBitWidth(result_type) != 32) { in ValidateExtInst()
1215 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1221 const uint32_t v_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
1222 if (!_.IsFloatScalarType(v_type) || _.GetBitWidth(v_type) != 64) { in ValidateExtInst()
1223 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1231 if (!_.IsFloatScalarType(result_type)) { in ValidateExtInst()
1232 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1237 const uint32_t x_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
1238 if (!_.IsFloatScalarOrVectorType(x_type)) { in ValidateExtInst()
1239 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1244 if (result_type != _.GetComponentType(x_type)) { in ValidateExtInst()
1245 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1254 if (!_.IsFloatScalarType(result_type)) { in ValidateExtInst()
1255 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1260 const uint32_t p0_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
1261 if (!_.IsFloatScalarOrVectorType(p0_type)) { in ValidateExtInst()
1262 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1267 if (result_type != _.GetComponentType(p0_type)) { in ValidateExtInst()
1268 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1274 const uint32_t p1_type = _.GetOperandTypeId(inst, 5); in ValidateExtInst()
1275 if (!_.IsFloatScalarOrVectorType(p1_type)) { in ValidateExtInst()
1276 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1281 if (result_type != _.GetComponentType(p1_type)) { in ValidateExtInst()
1282 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1288 if (_.GetDimension(p0_type) != _.GetDimension(p1_type)) { in ValidateExtInst()
1289 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1298 if (!_.IsFloatVectorType(result_type)) { in ValidateExtInst()
1299 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1304 if (_.GetDimension(result_type) != 3) { in ValidateExtInst()
1305 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1310 const uint32_t x_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
1311 const uint32_t y_type = _.GetOperandTypeId(inst, 5); in ValidateExtInst()
1314 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1320 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1328 if (!_.IsFloatScalarOrVectorType(result_type)) { in ValidateExtInst()
1329 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1334 const uint32_t i_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
1335 const uint32_t n_type = _.GetOperandTypeId(inst, 5); in ValidateExtInst()
1336 const uint32_t eta_type = _.GetOperandTypeId(inst, 6); in ValidateExtInst()
1339 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1345 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1350 if (!_.IsFloatScalarType(eta_type)) { in ValidateExtInst()
1351 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1361 if (!_.HasCapability(SpvCapabilityInterpolationFunction)) { in ValidateExtInst()
1362 return _.diag(SPV_ERROR_INVALID_CAPABILITY, inst) in ValidateExtInst()
1367 if (!_.IsFloatScalarOrVectorType(result_type) || in ValidateExtInst()
1368 _.GetBitWidth(result_type) != 32) { in ValidateExtInst()
1369 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1379 auto* interp_inst = _.FindDef(interp_id); in ValidateExtInst()
1380 uint32_t interpolant_type = (_.options()->before_hlsl_legalization && in ValidateExtInst()
1382 ? _.GetOperandTypeId(interp_inst, 2) in ValidateExtInst()
1383 : _.GetOperandTypeId(inst, 4); in ValidateExtInst()
1387 if (!_.GetPointerTypeInfo(interpolant_type, &interpolant_data_type, in ValidateExtInst()
1389 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1395 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1401 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1407 const uint32_t sample_type = _.GetOperandTypeId(inst, 5); in ValidateExtInst()
1408 if (!_.IsIntScalarType(sample_type) || in ValidateExtInst()
1409 _.GetBitWidth(sample_type) != 32) { in ValidateExtInst()
1410 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1417 const uint32_t offset_type = _.GetOperandTypeId(inst, 5); in ValidateExtInst()
1418 if (!_.IsFloatVectorType(offset_type) || in ValidateExtInst()
1419 _.GetDimension(offset_type) != 2 || in ValidateExtInst()
1420 _.GetBitWidth(offset_type) != 32) { in ValidateExtInst()
1421 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1427 _.function(inst->function()->id()) in ValidateExtInst()
1436 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1441 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1547 if (!_.IsFloatScalarOrVectorType(result_type)) { in ValidateExtInst()
1548 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1553 const uint32_t num_components = _.GetDimension(result_type); in ValidateExtInst()
1555 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1563 const uint32_t operand_type = _.GetOperandTypeId(inst, operand_index); in ValidateExtInst()
1565 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1577 if (!_.IsFloatScalarOrVectorType(result_type)) { in ValidateExtInst()
1578 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1583 const uint32_t num_components = _.GetDimension(result_type); in ValidateExtInst()
1585 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1591 const uint32_t x_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
1593 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1598 const uint32_t p_type = _.GetOperandTypeId(inst, 5); in ValidateExtInst()
1601 if (!_.GetPointerTypeInfo(p_type, &p_data_type, &p_storage_class)) { in ValidateExtInst()
1602 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1611 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1618 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1629 if (!_.IsFloatScalarOrVectorType(result_type)) { in ValidateExtInst()
1630 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1635 const uint32_t num_components = _.GetDimension(result_type); in ValidateExtInst()
1637 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1644 const uint32_t x_type = _.GetOperandTypeId(inst, operand_index++); in ValidateExtInst()
1646 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1652 const uint32_t y_type = _.GetOperandTypeId(inst, operand_index++); in ValidateExtInst()
1654 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1660 const uint32_t p_type = _.GetOperandTypeId(inst, operand_index++); in ValidateExtInst()
1663 if (!_.GetPointerTypeInfo(p_type, &p_data_type, &p_storage_class)) { in ValidateExtInst()
1664 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1673 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1679 if (!_.IsIntScalarOrVectorType(p_data_type) || in ValidateExtInst()
1680 _.GetBitWidth(p_data_type) != 32) { in ValidateExtInst()
1681 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1687 if (_.GetDimension(p_data_type) != num_components) { in ValidateExtInst()
1688 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1697 if (!_.IsIntScalarOrVectorType(result_type) || in ValidateExtInst()
1698 _.GetBitWidth(result_type) != 32) { in ValidateExtInst()
1699 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1705 const uint32_t num_components = _.GetDimension(result_type); in ValidateExtInst()
1707 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1713 const uint32_t x_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
1714 if (!_.IsFloatScalarOrVectorType(x_type)) { in ValidateExtInst()
1715 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1720 if (_.GetDimension(x_type) != num_components) { in ValidateExtInst()
1721 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1732 if (!_.IsFloatScalarOrVectorType(result_type)) { in ValidateExtInst()
1733 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1738 const uint32_t num_components = _.GetDimension(result_type); in ValidateExtInst()
1740 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1746 const uint32_t x_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
1748 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1753 const uint32_t exp_type = _.GetOperandTypeId(inst, 5); in ValidateExtInst()
1754 if (!_.IsIntScalarOrVectorType(exp_type) || in ValidateExtInst()
1755 _.GetBitWidth(exp_type) != 32) { in ValidateExtInst()
1756 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1761 if (_.GetDimension(exp_type) != num_components) { in ValidateExtInst()
1762 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1771 if (!_.IsFloatScalarOrVectorType(result_type)) { in ValidateExtInst()
1772 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1777 const uint32_t num_components = _.GetDimension(result_type); in ValidateExtInst()
1779 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1785 const uint32_t nancode_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
1786 if (!_.IsIntScalarOrVectorType(nancode_type)) { in ValidateExtInst()
1787 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1792 if (_.GetDimension(nancode_type) != num_components) { in ValidateExtInst()
1793 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1799 if (_.GetBitWidth(result_type) != _.GetBitWidth(nancode_type)) { in ValidateExtInst()
1800 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1836 if (!_.IsIntScalarOrVectorType(result_type)) { in ValidateExtInst()
1837 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1842 const uint32_t num_components = _.GetDimension(result_type); in ValidateExtInst()
1844 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1852 const uint32_t operand_type = _.GetOperandTypeId(inst, operand_index); in ValidateExtInst()
1854 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1865 if (!_.IsIntScalarOrVectorType(result_type)) { in ValidateExtInst()
1866 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1872 const uint32_t result_num_components = _.GetDimension(result_type); in ValidateExtInst()
1875 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1881 const uint32_t result_bit_width = _.GetBitWidth(result_type); in ValidateExtInst()
1884 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1890 const uint32_t hi_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
1891 const uint32_t lo_type = _.GetOperandTypeId(inst, 5); in ValidateExtInst()
1894 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1899 if (result_num_components != _.GetDimension(hi_type)) { in ValidateExtInst()
1900 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1906 if (result_bit_width != 2 * _.GetBitWidth(hi_type)) { in ValidateExtInst()
1907 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1919 if (!_.IsIntScalarOrVectorType(result_type) || in ValidateExtInst()
1920 _.GetBitWidth(result_type) != 32) { in ValidateExtInst()
1921 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1927 const uint32_t num_components = _.GetDimension(result_type); in ValidateExtInst()
1929 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1937 const uint32_t operand_type = _.GetOperandTypeId(inst, operand_index); in ValidateExtInst()
1939 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1949 if (!_.IsFloatVectorType(result_type)) { in ValidateExtInst()
1950 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1955 const uint32_t num_components = _.GetDimension(result_type); in ValidateExtInst()
1957 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1962 const uint32_t x_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
1963 const uint32_t y_type = _.GetOperandTypeId(inst, 5); in ValidateExtInst()
1966 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1972 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1981 if (!_.IsFloatScalarType(result_type)) { in ValidateExtInst()
1982 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1987 const uint32_t p0_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
1988 if (!_.IsFloatScalarOrVectorType(p0_type)) { in ValidateExtInst()
1989 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
1994 const uint32_t num_components = _.GetDimension(p0_type); in ValidateExtInst()
1996 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2001 if (result_type != _.GetComponentType(p0_type)) { in ValidateExtInst()
2002 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2008 const uint32_t p1_type = _.GetOperandTypeId(inst, 5); in ValidateExtInst()
2010 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2019 if (!_.IsFloatScalarType(result_type)) { in ValidateExtInst()
2020 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2025 const uint32_t p_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
2026 if (!_.IsFloatScalarOrVectorType(p_type)) { in ValidateExtInst()
2027 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2032 const uint32_t num_components = _.GetDimension(p_type); in ValidateExtInst()
2034 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2039 if (result_type != _.GetComponentType(p_type)) { in ValidateExtInst()
2040 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2050 if (!_.IsFloatScalarOrVectorType(result_type)) { in ValidateExtInst()
2051 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2056 const uint32_t num_components = _.GetDimension(result_type); in ValidateExtInst()
2058 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2063 const uint32_t p_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
2065 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2073 if (!_.IsFloatScalarOrVectorType(result_type) && in ValidateExtInst()
2074 !_.IsIntScalarOrVectorType(result_type)) { in ValidateExtInst()
2075 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2081 const uint32_t num_components = _.GetDimension(result_type); in ValidateExtInst()
2083 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2091 const uint32_t operand_type = _.GetOperandTypeId(inst, operand_index); in ValidateExtInst()
2093 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2103 if (!_.IsFloatScalarOrVectorType(result_type) && in ValidateExtInst()
2104 !_.IsIntScalarOrVectorType(result_type)) { in ValidateExtInst()
2105 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2111 const uint32_t num_components = _.GetDimension(result_type); in ValidateExtInst()
2113 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2119 const uint32_t a_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
2120 const uint32_t b_type = _.GetOperandTypeId(inst, 5); in ValidateExtInst()
2121 const uint32_t c_type = _.GetOperandTypeId(inst, 6); in ValidateExtInst()
2124 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2130 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2135 if (!_.IsIntScalarOrVectorType(c_type)) { in ValidateExtInst()
2136 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2141 if (num_components != _.GetDimension(c_type)) { in ValidateExtInst()
2142 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2148 if (_.GetBitWidth(result_type) != _.GetBitWidth(c_type)) { in ValidateExtInst()
2149 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2158 if (!_.IsFloatVectorType(result_type) && in ValidateExtInst()
2159 !_.IsIntVectorType(result_type)) { in ValidateExtInst()
2160 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2165 const uint32_t num_components = _.GetDimension(result_type); in ValidateExtInst()
2167 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2172 const uint32_t offset_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
2173 const uint32_t p_type = _.GetOperandTypeId(inst, 5); in ValidateExtInst()
2175 const uint32_t size_t_bit_width = GetSizeTBitWidth(_); in ValidateExtInst()
2177 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2182 if (!_.IsIntScalarType(offset_type) || in ValidateExtInst()
2183 _.GetBitWidth(offset_type) != size_t_bit_width) { in ValidateExtInst()
2184 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2193 if (!_.GetPointerTypeInfo(p_type, &p_data_type, &p_storage_class)) { in ValidateExtInst()
2194 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2204 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2210 if (_.GetComponentType(result_type) != p_data_type) { in ValidateExtInst()
2211 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2219 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2228 if (_.GetIdOpcode(result_type) != SpvOpTypeVoid) { in ValidateExtInst()
2229 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2233 const uint32_t data_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
2234 const uint32_t offset_type = _.GetOperandTypeId(inst, 5); in ValidateExtInst()
2235 const uint32_t p_type = _.GetOperandTypeId(inst, 6); in ValidateExtInst()
2237 if (!_.IsFloatVectorType(data_type) && !_.IsIntVectorType(data_type)) { in ValidateExtInst()
2238 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2243 const uint32_t num_components = _.GetDimension(data_type); in ValidateExtInst()
2245 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2250 const uint32_t size_t_bit_width = GetSizeTBitWidth(_); in ValidateExtInst()
2252 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2257 if (!_.IsIntScalarType(offset_type) || in ValidateExtInst()
2258 _.GetBitWidth(offset_type) != size_t_bit_width) { in ValidateExtInst()
2259 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2268 if (!_.GetPointerTypeInfo(p_type, &p_data_type, &p_storage_class)) { in ValidateExtInst()
2269 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2278 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2284 if (_.GetComponentType(data_type) != p_data_type) { in ValidateExtInst()
2285 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2294 if (!_.IsFloatScalarType(result_type)) { in ValidateExtInst()
2295 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2300 const uint32_t offset_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
2301 const uint32_t p_type = _.GetOperandTypeId(inst, 5); in ValidateExtInst()
2303 const uint32_t size_t_bit_width = GetSizeTBitWidth(_); in ValidateExtInst()
2305 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2310 if (!_.IsIntScalarType(offset_type) || in ValidateExtInst()
2311 _.GetBitWidth(offset_type) != size_t_bit_width) { in ValidateExtInst()
2312 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2321 if (!_.GetPointerTypeInfo(p_type, &p_data_type, &p_storage_class)) { in ValidateExtInst()
2322 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2332 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2338 if (!_.IsFloatScalarType(p_data_type) || in ValidateExtInst()
2339 _.GetBitWidth(p_data_type) != 16) { in ValidateExtInst()
2340 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2349 if (!_.IsFloatVectorType(result_type)) { in ValidateExtInst()
2350 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2355 const uint32_t num_components = _.GetDimension(result_type); in ValidateExtInst()
2357 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2362 const uint32_t offset_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
2363 const uint32_t p_type = _.GetOperandTypeId(inst, 5); in ValidateExtInst()
2365 const uint32_t size_t_bit_width = GetSizeTBitWidth(_); in ValidateExtInst()
2367 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2372 if (!_.IsIntScalarType(offset_type) || in ValidateExtInst()
2373 _.GetBitWidth(offset_type) != size_t_bit_width) { in ValidateExtInst()
2374 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2383 if (!_.GetPointerTypeInfo(p_type, &p_data_type, &p_storage_class)) { in ValidateExtInst()
2384 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2394 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2400 if (!_.IsFloatScalarType(p_data_type) || in ValidateExtInst()
2401 _.GetBitWidth(p_data_type) != 16) { in ValidateExtInst()
2402 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2409 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2423 if (_.GetIdOpcode(result_type) != SpvOpTypeVoid) { in ValidateExtInst()
2424 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2428 const uint32_t data_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
2429 const uint32_t offset_type = _.GetOperandTypeId(inst, 5); in ValidateExtInst()
2430 const uint32_t p_type = _.GetOperandTypeId(inst, 6); in ValidateExtInst()
2431 const uint32_t data_type_bit_width = _.GetBitWidth(data_type); in ValidateExtInst()
2435 if (!_.IsFloatScalarType(data_type) || in ValidateExtInst()
2437 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2442 if (!_.IsFloatVectorType(data_type) || in ValidateExtInst()
2444 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2449 const uint32_t num_components = _.GetDimension(data_type); in ValidateExtInst()
2452 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2458 const uint32_t size_t_bit_width = GetSizeTBitWidth(_); in ValidateExtInst()
2460 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2465 if (!_.IsIntScalarType(offset_type) || in ValidateExtInst()
2466 _.GetBitWidth(offset_type) != size_t_bit_width) { in ValidateExtInst()
2467 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2476 if (!_.GetPointerTypeInfo(p_type, &p_data_type, &p_storage_class)) { in ValidateExtInst()
2477 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2486 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2492 if (!_.IsFloatScalarType(p_data_type) || in ValidateExtInst()
2493 _.GetBitWidth(p_data_type) != 16) { in ValidateExtInst()
2494 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2505 if (!_.IsFloatVectorType(result_type) && in ValidateExtInst()
2506 !_.IsIntVectorType(result_type)) { in ValidateExtInst()
2507 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2512 const uint32_t result_num_components = _.GetDimension(result_type); in ValidateExtInst()
2515 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2521 const uint32_t x_type = _.GetOperandTypeId(inst, operand_index++); in ValidateExtInst()
2524 const uint32_t y_type = _.GetOperandTypeId(inst, operand_index++); in ValidateExtInst()
2526 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2533 _.GetOperandTypeId(inst, operand_index++); in ValidateExtInst()
2535 if (!_.IsFloatVectorType(x_type) && !_.IsIntVectorType(x_type)) { in ValidateExtInst()
2536 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2541 const uint32_t x_num_components = _.GetDimension(x_type); in ValidateExtInst()
2544 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2549 const uint32_t result_component_type = _.GetComponentType(result_type); in ValidateExtInst()
2551 if (result_component_type != _.GetComponentType(x_type)) { in ValidateExtInst()
2552 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2558 if (!_.IsIntVectorType(shuffle_mask_type)) { in ValidateExtInst()
2559 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2564 if (result_num_components != _.GetDimension(shuffle_mask_type)) { in ValidateExtInst()
2565 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2571 if (_.GetBitWidth(result_component_type) != in ValidateExtInst()
2572 _.GetBitWidth(shuffle_mask_type)) { in ValidateExtInst()
2573 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2582 if (!_.IsIntScalarType(result_type) || in ValidateExtInst()
2583 _.GetBitWidth(result_type) != 32) { in ValidateExtInst()
2584 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2589 const uint32_t format_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
2592 if (!_.GetPointerTypeInfo(format_type, &format_data_type, in ValidateExtInst()
2594 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2600 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2605 if (!_.IsIntScalarType(format_data_type) || in ValidateExtInst()
2606 _.GetBitWidth(format_data_type) != 8) { in ValidateExtInst()
2607 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2615 if (_.GetIdOpcode(result_type) != SpvOpTypeVoid) { in ValidateExtInst()
2616 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2620 const uint32_t p_type = _.GetOperandTypeId(inst, 4); in ValidateExtInst()
2621 const uint32_t num_elements_type = _.GetOperandTypeId(inst, 5); in ValidateExtInst()
2625 if (!_.GetPointerTypeInfo(p_type, &p_data_type, &p_storage_class)) { in ValidateExtInst()
2626 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2632 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2637 if (!_.IsFloatScalarOrVectorType(p_data_type) && in ValidateExtInst()
2638 !_.IsIntScalarOrVectorType(p_data_type)) { in ValidateExtInst()
2639 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2645 const uint32_t num_components = _.GetDimension(p_data_type); in ValidateExtInst()
2647 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2653 const uint32_t size_t_bit_width = GetSizeTBitWidth(_); in ValidateExtInst()
2655 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2660 if (!_.IsIntScalarType(num_elements_type) || in ValidateExtInst()
2661 _.GetBitWidth(num_elements_type) != size_t_bit_width) { in ValidateExtInst()
2662 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2672 if (!_.IsVoidType(result_type)) { in ValidateExtInst()
2673 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2709 ValidateOperandBaseType(_, inst, 5, ext_inst_name); in ValidateExtInst()
2715 ValidateOperandBaseType(_, inst, 5, ext_inst_name); in ValidateExtInst()
2720 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2728 _, "Base Type", inst, 5, ext_inst_name, false); in ValidateExtInst()
2732 auto* component_count = _.FindDef(inst->word(i)); in ValidateExtInst()
2733 if (IsConstIntScalarTypeWith32Or64Bits(_, component_count)) { in ValidateExtInst()
2743 auto* component_count_type = _.FindDef(component_count->word(6)); in ValidateExtInst()
2755 _.FindDef(component_count_type->word(6)); in ValidateExtInst()
2756 if (!_.IsIntScalarType(size_in_bits->type_id()) || in ValidateExtInst()
2769 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2781 ValidateOperandBaseType(_, inst, 6, ext_inst_name); in ValidateExtInst()
2785 ValidateOperandLexicalScope(_, "Parent", inst, 10, ext_inst_name); in ValidateExtInst()
2790 auto* return_type = _.FindDef(inst->word(6)); in ValidateExtInst()
2795 _, "Return Type", inst, 6, ext_inst_name, true); in ValidateExtInst()
2800 _, "Parameter Types", inst, word_index, ext_inst_name, true); in ValidateExtInst()
2808 _, in ValidateExtInst()
2814 _, "Underlying Types", inst, 6, ext_inst_name, false); in ValidateExtInst()
2820 ValidateOperandLexicalScope(_, "Parent", inst, 10, ext_inst_name); in ValidateExtInst()
2823 auto* size = _.FindDef(inst->word(11)); in ValidateExtInst()
2824 if (!_.IsIntScalarType(size->type_id()) || !size->word(3)) { in ValidateExtInst()
2825 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2840 ValidateOperandLexicalScope(_, "Parent", inst, 10, ext_inst_name); in ValidateExtInst()
2844 _, in ValidateExtInst()
2853 _, in ValidateExtInst()
2860 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2874 ValidateOperandDebugType(_, "Type", inst, 6, ext_inst_name, true); in ValidateExtInst()
2885 auto* debug_inst = _.FindDef(inst->word(5)); in ValidateExtInst()
2890 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2895 debug_inst = _.FindDef(inst->word(6)); in ValidateExtInst()
2900 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
2912 ValidateOperandDebugType(_, "Type", inst, 6, ext_inst_name, false); in ValidateExtInst()
2916 ValidateOperandLexicalScope(_, "Parent", inst, 10, ext_inst_name); in ValidateExtInst()
2920 _, in ValidateExtInst()
2936 ValidateOperandDebugType(_, "Type", inst, 6, ext_inst_name, false); in ValidateExtInst()
2940 ValidateOperandLexicalScope(_, "Parent", inst, 10, ext_inst_name); in ValidateExtInst()
2948 ValidateOperandLexicalScope(_, "Parent", inst, 8, ext_inst_name); in ValidateExtInst()
2955 ValidateOperandLexicalScope(_, "Scope", inst, 5, ext_inst_name); in ValidateExtInst()
2968 ValidateOperandDebugType(_, "Type", inst, 6, ext_inst_name, true); in ValidateExtInst()
2972 ValidateOperandLexicalScope(_, "Parent", inst, 10, ext_inst_name); in ValidateExtInst()
2979 auto* operand = _.FindDef(inst->word(6)); in ValidateExtInst()
2982 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
3000 _, in ValidateExtInst()
3006 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
3013 _, in ValidateExtInst()
3021 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
3033 _, "Actual Type", inst, 6, ext_inst_name, false); in ValidateExtInst()
3036 _, in ValidateExtInst()
3049 ValidateOperandDebugType(_, "Type", inst, 6, ext_inst_name, false); in ValidateExtInst()
3053 ValidateOperandLexicalScope(_, "Scope", inst, 10, ext_inst_name); in ValidateExtInst()
3057 _, in ValidateExtInst()
3062 auto* operand = _.FindDef(inst->word(12)); in ValidateExtInst()
3065 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
3079 ValidateOperandLexicalScope(_, "Scope", inst, 6, ext_inst_name); in ValidateExtInst()
3095 if (!IsConstWithIntScalarType(_, inst, word_index) && in ValidateExtInst()
3096 !IsDebugVariableWithIntScalarType(_, inst, word_index)) { in ValidateExtInst()
3097 return _.diag(SPV_ERROR_INVALID_DATA, inst) in ValidateExtInst()
3121 auto import_inst = _.FindDef(inst->GetOperandAs<uint32_t>(2)); in ValidateExtInst()
3128 return _.diag(SPV_ERROR_INVALID_DATA, import_inst) in ValidateExtInst()
3134 return _.diag(SPV_ERROR_INVALID_DATA, import_inst) in ValidateExtInst()
3139 return _.diag(SPV_ERROR_INVALID_DATA, import_inst) in ValidateExtInst()
3143 return ValidateClspvReflectionInstruction(_, inst, version); in ValidateExtInst()
3149 spv_result_t ExtensionPass(ValidationState_t& _, const Instruction* inst) { in ExtensionPass() argument
3151 if (opcode == SpvOpExtension) return ValidateExtension(_, inst); in ExtensionPass()
3152 if (opcode == SpvOpExtInstImport) return ValidateExtInstImport(_, inst); in ExtensionPass()
3153 if (opcode == SpvOpExtInst) return ValidateExtInst(_, inst); in ExtensionPass()