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

Method IsVulkanStorageBufferVariable

source/opt/instruction.cpp:423–437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

421}
422
423bool Instruction::IsVulkanStorageBufferVariable() const {
424 if (opcode() != spv::Op::OpVariable) {
425 return false;
426 }
427
428 spv::StorageClass storage_class =
429 spv::StorageClass(GetSingleWordInOperand(kVariableStorageClassIndex));
430 if (storage_class == spv::StorageClass::StorageBuffer ||
431 storage_class == spv::StorageClass::Uniform) {
432 Instruction* var_type = context()->get_def_use_mgr()->GetDef(type_id());
433 return var_type != nullptr && var_type->IsVulkanStorageBuffer();
434 }
435
436 return false;
437}
438
439bool Instruction::IsVulkanUniformBuffer() const {
440 if (opcode() != spv::Op::OpTypePointer) {

Callers 1

FindLiveMembersMethod · 0.80

Calls 3

IsVulkanStorageBufferMethod · 0.80
GetDefMethod · 0.45
get_def_use_mgrMethod · 0.45

Tested by

no test coverage detected