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

Function ValidateGroupInt

source/val/validate_group.cpp:75–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75spv_result_t ValidateGroupInt(ValidationState_t& _, const Instruction* inst) {
76 const uint32_t type_id = inst->type_id();
77 if (!_.IsIntScalarOrVectorType(type_id)) {
78 return _.diag(SPV_ERROR_INVALID_DATA, inst)
79 << "Result must be a scalar or vector of integer type";
80 }
81
82 const uint32_t x_type_id = _.GetOperandTypeId(inst, 4);
83 if (x_type_id != type_id) {
84 return _.diag(SPV_ERROR_INVALID_DATA, inst)
85 << "The type of X must match the Result type";
86 }
87 return SPV_SUCCESS;
88}
89
90spv_result_t ValidateGroupAsyncCopy(ValidationState_t& _,
91 const Instruction* inst) {

Callers 1

GroupPassFunction · 0.85

Calls 4

diagMethod · 0.80
GetOperandTypeIdMethod · 0.80
type_idMethod · 0.45

Tested by

no test coverage detected