Open maoenpei opened 1 year ago
Just a few quick notes here:
1) & 3) The command line above does not specify any optimization, so no inlining is done, so no DebugInlinedAt will be generated.
2) The code above does not require a DebugLexicalBlock to be generated. Usually these are created when the user specifies lexical blocks (besides the function itself) with declared local variables.
Just a few quick notes here:
- & 3) The command line above does not specify any optimization, so no inlining is done, so no DebugInlinedAt will be generated.
- The code above does not require a DebugLexicalBlock to be generated. Usually these are created when the user specifies lexical blocks (besides the function itself) with declared local variables.
Hi @greg-lunarg, thanks for your reply. I've tried "-Od" and see it's exactly the default option ("-Os" makes less instructions). glslang doesn't support "-O" plus a number so I don't know if there is another option that controls the optimization level. Do you have a method that makes the inlining appear?
(BTW, there's another bug created for dxc. You were the one who replied to that case. What a coincidence! :p)
I've working on a debugger tool that displays a top-down inlined-function call view, which requires to read the NonSemantic DebugInfo.
However, I've found an issue that if I add "-gVS" the glslangValidator generates no DebugInlinedAt instruction and generates incorrect function definition line numbers.
Test Shader (rchit_test.glsl):
Result SPIRV:
Building command:
There are a couple of issues:
So it looks like the NonSemantic.DebugInfo extension is not fully supported in glslang. What is the plan for fully supporting it?