| 213 | } |
| 214 | |
| 215 | spv_result_t ValidateCommitPipe(ValidationState_t& _, const Instruction* inst) { |
| 216 | if (inst->opcode() == spv::Op::OpCommitReadPipe) { |
| 217 | if (auto error = ValidatePipeType(_, inst, 0, ValidPipeType::READ_ONLY)) |
| 218 | return error; |
| 219 | } else if (inst->opcode() == spv::Op::OpCommitWritePipe) { |
| 220 | if (auto error = ValidatePipeType(_, inst, 0, ValidPipeType::WRITE_ONLY)) |
| 221 | return error; |
| 222 | } |
| 223 | |
| 224 | const Instruction* reserve_id = _.FindDef(_.GetOperandTypeId(inst, 1)); |
| 225 | if (reserve_id->opcode() != spv::Op::OpTypeReserveId) { |
| 226 | return _.diag(SPV_ERROR_INVALID_DATA, inst) |
| 227 | << "Reserve Id type must be OpTypeReserveId."; |
| 228 | } |
| 229 | |
| 230 | if (auto error = ValidatePacketSizeAlign(_, inst, 2, 3)) return error; |
| 231 | |
| 232 | return SPV_SUCCESS; |
| 233 | } |
| 234 | |
| 235 | spv_result_t ValidateGroupCommitPipe(ValidationState_t& _, |
| 236 | const Instruction* inst) { |
no test coverage detected