| 27 | namespace val { |
| 28 | |
| 29 | spv_result_t ValidateShaderBitWidth(ValidationState_t& _, |
| 30 | const Instruction* inst) { |
| 31 | if (_.HasCapability(spv::Capability::Shader)) { |
| 32 | if (_.ContainsLimitedUseIntOrFloatType(inst->type_id()) || |
| 33 | _.ContainsLimitedUseIntOrFloatType(_.GetOperandTypeId(inst, 2u))) { |
| 34 | return _.diag(SPV_ERROR_INVALID_DATA, inst) |
| 35 | << "8- or 16-bit types can only be used with width-only " |
| 36 | "conversions"; |
| 37 | } |
| 38 | } |
| 39 | return SPV_SUCCESS; |
| 40 | } |
| 41 | |
| 42 | spv_result_t ValidateConvertFToU(ValidationState_t& _, const Instruction* inst, |
| 43 | uint32_t operand_index = 2) { |
no test coverage detected