Open TLaviron opened 2 years ago
Thanks for reporting, @TLaviron.
@jaebaek, can you take a look?
Sure. I will take a look.
For some reason we have two loads of the texture. The first is in GetTexture, and another after the function call.
I think we need to avoid the one after the function call.
The following shader generates invalid SPIR-V:
Compiled using latest release (v1.6.2112) with command line
dxc.exe -E main -T cs_6_0 -Fo uav_indexing.comp.spv -spirv -fspv-target-env=vulkan1.1 uav_indexing.comp.hlsl
As commented in the code, using the returned value from the function and storing it in a resource variable works and has the intended effect.