| 111 | } |
| 112 | |
| 113 | spv_result_t ValidateLogicalNot(ValidationState_t& _, const Instruction* inst, |
| 114 | uint32_t operand_index = 2) { |
| 115 | const spv::Op opcode = inst->opcode(); |
| 116 | const uint32_t result_type = inst->type_id(); |
| 117 | if (!_.IsBoolScalarType(result_type) && !_.IsBoolVectorType(result_type)) |
| 118 | return _.diag(SPV_ERROR_INVALID_DATA, inst) |
| 119 | << "Expected bool scalar or vector type as Result Type: " |
| 120 | << spvOpcodeString(opcode); |
| 121 | |
| 122 | if (result_type != _.GetOperandTypeId(inst, operand_index)) |
| 123 | return _.diag(SPV_ERROR_INVALID_DATA, inst) |
| 124 | << "Expected operand to be of Result Type: " |
| 125 | << spvOpcodeString(opcode); |
| 126 | return SPV_SUCCESS; |
| 127 | } |
| 128 | |
| 129 | spv_result_t ValidateSelect(ValidationState_t& _, const Instruction* inst, |
| 130 | uint32_t operand_index = 2) { |
no test coverage detected