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

Function ValidatePacketSizeAlign

source/val/validate_pipe.cpp:65–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65spv_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
85spv_result_t ValidateReadWritePipe(ValidationState_t& _,
86 const Instruction* inst) {

Callers 7

ValidateReadWritePipeFunction · 0.85
ValidateReservePacketsFunction · 0.85
ValidateCommitPipeFunction · 0.85
ValidateGroupCommitPipeFunction · 0.85
ValidatePipePacketsQueryFunction · 0.85

Calls 3

GetOperandTypeIdMethod · 0.80
IsIntScalarTypeMethod · 0.80
diagMethod · 0.80

Tested by

no test coverage detected