KhronosGroup / SPIRV-Cross

SPIRV-Cross is a practical tool and library for performing reflection on SPIR-V and disassembling SPIR-V back to high level languages.
Apache License 2.0
1.96k stars 549 forks source link

Remove spvDescriptor wrapper in spvDescriptorArray #2314

Closed js6i closed 2 months ago

js6i commented 2 months ago

That's a workaround for #2308. The diff between shader byte code with and without this change is only the getelementptr indexing order for affected variables, and looks something like this: (old above, new below)

<   %8 = getelementptr inbounds %struct.spvDescriptorSetBuffer1, ptr addrspace(1) %0, i64 0, i32 0, i64 %7, i32 0, i32 0
---
>   %8 = getelementptr inbounds %struct.spvDescriptorSetBuffer1, ptr addrspace(1) %0, i64 %7, i32 0, i64 0, i32 0, i32 0