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

Function IsBlockArray

source/val/validate_logical_pointers.cpp:413–424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

411}
412
413spv_result_t IsBlockArray(ValidationState_t& _, const Instruction* type) {
414 if (type->opcode() == spv::Op::OpTypeArray ||
415 type->opcode() == spv::Op::OpTypeRuntimeArray) {
416 const auto element_type = _.FindDef(type->GetOperandAs<uint32_t>(1));
417 if (element_type->opcode() == spv::Op::OpTypeStruct &&
418 (_.HasDecoration(element_type->id(), spv::Decoration::Block) ||
419 _.HasDecoration(element_type->id(), spv::Decoration::BufferBlock))) {
420 return SPV_ERROR_INVALID_DATA;
421 }
422 }
423 return SPV_SUCCESS;
424}
425
426spv_result_t CheckMatrixElementTyped(ValidationState_t& _,
427 const Instruction* inst) {

Callers 1

ValidateVariablePointersFunction · 0.85

Calls 4

FindDefMethod · 0.80
opcodeMethod · 0.45
HasDecorationMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected