| 58 | } |
| 59 | |
| 60 | spv_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 | |
| 75 | spv_result_t ValidateGroupInt(ValidationState_t& _, const Instruction* inst) { |
| 76 | const uint32_t type_id = inst->type_id(); |
no test coverage detected