You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[SPIR-V] Compile the original source with -fspv-debug instead of the -P output #9022
With -fspv-debug, dxcompilerobj.cpp compiles the output of a -P pass.
Line numbers map back through #line markers, but debug columns are positions in the preprocessed line, so they are wrong on any line that contains a macro expansion or a removed comment. spirv-val now rejects the module when a column is past the end of the original line (#8543).
I'm testing a fix for #8543 that clamps the columns and leaves them approximate.
The -P pass is also how SpirvEmitter::HandleTranslationUnit finds the included files. It lists them from the #line table the pass writes (#6935, for #6907).
Steve Urquhart (@SteveUrquhart), do you think that the include list can come from somewhere other than the #line table, for example the SourceManager file entries?
Activity
SteveUrquhart commentedon Oct 9, 2026
Hi Diego Novillo (@dnovillo) , that would be a lot cleaner. I can push a branch for that if you would like, or PR it.
SteveUrquhart commentedon Oct 9, 2026
I opened #9024
dnovillo commentedon Oct 9, 2026
Thank you!
[SPIRV] Generate debug info from original source