| 63 | } |
| 64 | |
| 65 | spv_result_t ValidatePacketSizeAlign(ValidationState_t& _, |
| 66 | const Instruction* inst, |
| 67 | uint32_t size_operand, |
| 68 | uint32_t alignment_operand) { |
| 69 | const uint32_t packet_size_id = _.GetOperandTypeId(inst, size_operand); |
| 70 | if (!_.IsIntScalarType(packet_size_id, 32)) { |
| 71 | return _.diag(SPV_ERROR_INVALID_DATA, inst) |
| 72 | << "Packet Size must be a 32-bit scalar integer."; |
| 73 | } |
| 74 | |
| 75 | const uint32_t packet_alignment_id = |
| 76 | _.GetOperandTypeId(inst, alignment_operand); |
| 77 | if (!_.IsIntScalarType(packet_alignment_id, 32)) { |
| 78 | return _.diag(SPV_ERROR_INVALID_DATA, inst) |
| 79 | << "Packet Alignment must be a 32-bit scalar integer."; |
| 80 | } |
| 81 | |
| 82 | return SPV_SUCCESS; |
| 83 | } |
| 84 | |
| 85 | spv_result_t ValidateReadWritePipe(ValidationState_t& _, |
| 86 | const Instruction* inst) { |
no test coverage detected