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

Function ValidateIsValidReserveId

source/val/validate_pipe.cpp:272–286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270}
271
272spv_result_t ValidateIsValidReserveId(ValidationState_t& _,
273 const Instruction* inst) {
274 if (!_.IsBoolScalarType(inst->type_id())) {
275 return _.diag(SPV_ERROR_INVALID_DATA, inst)
276 << "Result Type must be a bool scalar";
277 }
278
279 const Instruction* reserve_id = _.FindDef(_.GetOperandTypeId(inst, 2));
280 if (reserve_id->opcode() != spv::Op::OpTypeReserveId) {
281 return _.diag(SPV_ERROR_INVALID_DATA, inst)
282 << "Reserve Id type must be OpTypeReserveId.";
283 }
284
285 return SPV_SUCCESS;
286}
287
288spv_result_t ValidateCreatePipeFromPipeStorage(ValidationState_t& _,
289 const Instruction* inst) {

Callers 1

PipePassFunction · 0.85

Calls 6

IsBoolScalarTypeMethod · 0.80
diagMethod · 0.80
FindDefMethod · 0.80
GetOperandTypeIdMethod · 0.80
type_idMethod · 0.45
opcodeMethod · 0.45

Tested by

no test coverage detected