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

Function ValidateAbort

source/val/validate_misc.cpp:115–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115spv_result_t ValidateAbort(ValidationState_t& _, const Instruction* inst) {
116 const auto message_type = _.FindDef(inst->GetOperandAs<uint32_t>(0u));
117 const auto source = _.FindDef(inst->GetOperandAs<uint32_t>(1u));
118 const auto source_type = _.FindDef(source->type_id());
119
120 if (source_type == message_type) return SPV_SUCCESS;
121
122 if (!_.LogicallyMatch(source_type, message_type, false)) {
123 return _.diag(SPV_ERROR_INVALID_ID, inst)
124 << "Type of Message operand does not logically match the type of "
125 "the Message Type operand";
126 }
127
128 return SPV_SUCCESS;
129}
130
131} // namespace
132

Callers 1

MiscPassFunction · 0.85

Calls 4

FindDefMethod · 0.80
LogicallyMatchMethod · 0.80
diagMethod · 0.80
type_idMethod · 0.45

Tested by

no test coverage detected