glslang
glslang copied to clipboard
Crash when compiling with non-semantic debuginfo
When compiling the shader in the attached file with glslangValidator -gVS --target-env vulkan1.3 3188.frag -o 3188.dbg.spv
, glslang crashes with the following assert:
glslangValidator: /home/arcady/glslang/SPIRV/SpvBuilder.cpp:967: spv::Id spv::Builder::makeMemberDebugType(const spv::Id, const spv::Builder::DebugTypeLoc &): Assertion `debugId[memberType] != 0' failed.
https://github.com/KhronosGroup/glslang/files/11224475/glslang.3188.zip
Here is a reduced version of the shader that still exhibits the issue. reduced.frag.txt
After #3359 this will no longer crash, but will not generate debug info for the buffer reference struct members. The full fix is awaiting a pending spec change that will allow forward references in extended instruction sets' instructions.
-gVS for some reason can't handle large shaders with a lot of helper functions. It just silently fails with -1073741819 error code. You can take any shader from the @TheForge to reproduce.
@helviett That seems like a separate issue. Could you file a separate issue with a link to a specific shader that reproduces it?
@arcady-lunarg https://github.com/KhronosGroup/glslang/issues/3497