| 233 | } |
| 234 | |
| 235 | spv_result_t ValidateGroupCommitPipe(ValidationState_t& _, |
| 236 | const Instruction* inst) { |
| 237 | if (inst->opcode() == spv::Op::OpGroupCommitReadPipe) { |
| 238 | if (auto error = ValidatePipeType(_, inst, 1, ValidPipeType::READ_ONLY)) |
| 239 | return error; |
| 240 | } else if (inst->opcode() == spv::Op::OpGroupCommitWritePipe) { |
| 241 | if (auto error = ValidatePipeType(_, inst, 1, ValidPipeType::WRITE_ONLY)) |
| 242 | return error; |
| 243 | } |
| 244 | |
| 245 | const Instruction* reserve_id = _.FindDef(_.GetOperandTypeId(inst, 2)); |
| 246 | if (reserve_id->opcode() != spv::Op::OpTypeReserveId) { |
| 247 | return _.diag(SPV_ERROR_INVALID_DATA, inst) |
| 248 | << "Reserve Id type must be OpTypeReserveId."; |
| 249 | } |
| 250 | |
| 251 | if (auto error = ValidatePacketSizeAlign(_, inst, 3, 4)) return error; |
| 252 | |
| 253 | return SPV_SUCCESS; |
| 254 | } |
| 255 | |
| 256 | spv_result_t ValidatePipePacketsQuery(ValidationState_t& _, |
| 257 | const Instruction* inst) { |
no test coverage detected