| 421 | } |
| 422 | |
| 423 | bool 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 | |
| 439 | bool Instruction::IsVulkanUniformBuffer() const { |
| 440 | if (opcode() != spv::Op::OpTypePointer) { |
no test coverage detected