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

Function ValidatePipePacketsQuery

source/val/validate_pipe.cpp:256–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254}
255
256spv_result_t ValidatePipePacketsQuery(ValidationState_t& _,
257 const Instruction* inst) {
258 const uint32_t result_type = inst->type_id();
259 if (!_.IsIntScalarType(result_type, 32)) {
260 return _.diag(SPV_ERROR_INVALID_DATA, inst)
261 << "Result Type must be a 32-bit int scalar.";
262 }
263
264 if (auto error = ValidatePipeType(_, inst, 2, ValidPipeType::READ_OR_WRITE))
265 return error;
266
267 if (auto error = ValidatePacketSizeAlign(_, inst, 3, 4)) return error;
268
269 return SPV_SUCCESS;
270}
271
272spv_result_t ValidateIsValidReserveId(ValidationState_t& _,
273 const Instruction* inst) {

Callers 1

PipePassFunction · 0.85

Calls 5

ValidatePipeTypeFunction · 0.85
ValidatePacketSizeAlignFunction · 0.85
IsIntScalarTypeMethod · 0.80
diagMethod · 0.80
type_idMethod · 0.45

Tested by

no test coverage detected