MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / ValidateGroupCommitPipe

Function ValidateGroupCommitPipe

source/val/validate_pipe.cpp:235–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233}
234
235spv_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
256spv_result_t ValidatePipePacketsQuery(ValidationState_t& _,
257 const Instruction* inst) {

Callers 1

PipePassFunction · 0.85

Calls 6

ValidatePipeTypeFunction · 0.85
ValidatePacketSizeAlignFunction · 0.85
FindDefMethod · 0.80
GetOperandTypeIdMethod · 0.80
diagMethod · 0.80
opcodeMethod · 0.45

Tested by

no test coverage detected