Skip to content

Add basic support for ShaderDebugInfo and line markers#2583

Merged
HansKristian-Work merged 3 commits into
KhronosGroup:mainfrom
nyorain:debug-info-ext
Jan 7, 2026
Merged

Add basic support for ShaderDebugInfo and line markers#2583
HansKristian-Work merged 3 commits into
KhronosGroup:mainfrom
nyorain:debug-info-ext

Conversation

@nyorain

@nyorain nyorain commented Dec 31, 2025

Copy link
Copy Markdown
Contributor

I use SPIRV-Cross for shader debugging in vil and have a couple of changes that might find a place upstream. This change

  • allows multiple source files per parsed module
  • adds the NonSemanticShaderDebugInfo100.h header
  • stores the debug source strings attached per source (via OpSource or debug ext instruction)
  • stores the line markers per source (via OpLine or debug ext instruction)
  • stores debug local variables from the shader-debug-info ext
  • stores per SPIRVariable which debug local variables are associated with it
  • exposes useful functions from the Compiler base class (get_ir and constant evaluation)

I also added simple tests for the debug-info and line marker functionality.

@CLAassistant

CLAassistant commented Dec 31, 2025

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@HansKristian-Work HansKristian-Work left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for taking the time to write a test bench.

@HansKristian-Work HansKristian-Work merged commit 998146d into KhronosGroup:main Jan 7, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants