glslang icon indicating copy to clipboard operation
glslang copied to clipboard

Crash when compiling with non-semantic debuginfo

Open arcady-lunarg opened this issue 1 year ago • 5 comments

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

arcady-lunarg avatar Apr 14 '23 18:04 arcady-lunarg

Here is a reduced version of the shader that still exhibits the issue. reduced.frag.txt

arcady-lunarg avatar May 25 '23 20:05 arcady-lunarg

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.

arcady-lunarg avatar Oct 19 '23 01:10 arcady-lunarg

-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 avatar Jan 27 '24 09:01 helviett

@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 avatar Feb 02 '24 22:02 arcady-lunarg

@arcady-lunarg https://github.com/KhronosGroup/glslang/issues/3497

helviett avatar Feb 04 '24 07:02 helviett