Closed inferrna closed 2 years ago
It seems like the names of variables have been stripped out by optimising it, so when Vulkano is trying to assign names to struct fields, it can't find any names and so it just goes with "unnamed". What it really should do in this case is add numbers so that the names don't conflict anymore.
Passing -g
flag to glslc seems solved the issue for me:
./bin/glslc -g -fshader-stage=compute -O shader.glsl
But bad naming for unnamed fields is still the issue for vulkano, so I keep this open.
Code example https://github.com/inferrna/smart_denoise_rs
Issue
There are two precompiled shaders in the repo:
compiled_opt.spv
produced with./bin/glslc -fshader-stage=compute shader.glsl
andcompiled_unopt.spv
produced with./bin/glslc -fshader-stage=compute -O shader.glsl
Using unoptimized version in
src/denoise_shader_compiled.rs
works fine but with optimized I got this error at compile stage:Using latest glslc from here https://storage.googleapis.com/shaderc/badges/build_link_linux_clang_release.html