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

Function ValidateGroupFloat

source/val/validate_group.cpp:60–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60spv_result_t ValidateGroupFloat(ValidationState_t& _, const Instruction* inst) {
61 const uint32_t type_id = inst->type_id();
62 if (!_.IsFloatScalarOrVectorType(type_id)) {
63 return _.diag(SPV_ERROR_INVALID_DATA, inst)
64 << "Result must be a scalar or vector of float type";
65 }
66
67 const uint32_t x_type_id = _.GetOperandTypeId(inst, 4);
68 if (x_type_id != type_id) {
69 return _.diag(SPV_ERROR_INVALID_DATA, inst)
70 << "The type of X must match the Result type";
71 }
72 return SPV_SUCCESS;
73}
74
75spv_result_t ValidateGroupInt(ValidationState_t& _, const Instruction* inst) {
76 const uint32_t type_id = inst->type_id();

Callers 1

GroupPassFunction · 0.85

Calls 4

diagMethod · 0.80
GetOperandTypeIdMethod · 0.80
type_idMethod · 0.45

Tested by

no test coverage detected