KhronosGroup / SPIRV-Reflect

SPIRV-Reflect is a lightweight library that provides a C/C++ reflection API for SPIR-V shader bytecode in Vulkan applications.
Apache License 2.0
672 stars 147 forks source link

Handle OpCopy* instructions #229

Open spencer-lunarg opened 10 months ago

spencer-lunarg commented 10 months ago

while doing https://github.com/KhronosGroup/SPIRV-Reflect/pull/224 I realized that OpCopy* commands aren't correctly supported.

The following is accessing the OpVariable but because it goes through an OpCopyObject it doesn't notice it as accessed

%texture_image = OpVariable %ptr_texture UniformConstant
%var_copy = OpCopyObject %ptr_texture %texture_image
%load = OpLoad %10 %var_copy