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

Function LimitCheckIdBound

source/val/validate_instruction.cpp:348–355  ·  view source on GitHub ↗

Checks that the Resuld is within the valid bound.

Source from the content-addressed store, hash-verified

346
347// Checks that the Resuld <id> is within the valid bound.
348spv_result_t LimitCheckIdBound(ValidationState_t& _, const Instruction* inst) {
349 if (inst->id() >= _.getIdBound()) {
350 return _.diag(SPV_ERROR_INVALID_BINARY, inst)
351 << "Result <id> '" << inst->id()
352 << "' must be less than the ID bound '" << _.getIdBound() << "'.";
353 }
354 return SPV_SUCCESS;
355}
356
357// Checks that the number of OpTypeStruct members is within the limit.
358spv_result_t LimitCheckStruct(ValidationState_t& _, const Instruction* inst) {

Callers 1

InstructionPassFunction · 0.85

Calls 3

getIdBoundMethod · 0.80
diagMethod · 0.80
idMethod · 0.45

Tested by

no test coverage detected