BUILD-SPIRV-DEBUGINFO: Support named SPIR-V shader debug instructions #310
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!310
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/310/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ettehn on GitHub · 2026-11-24 03:06 UTC · original
ettehn:spirv-nonsemantic-debuginfo→main· +95 −2 · 3 files · 1 commits · merged 2026-11-24 13:36 UTCClaimed in the coordination issue as: BUILD-SPIRV-DEBUGINFO
Rebased on main after #78 merged. On Windows, the updated head passed 47 SPIR-V assembler tests, 3 line-ending checks, all 6,075 semantic tests, and the no-game-data check.
What and why
Carries forward old upstream PR #4744. Register all 44 names from Khronos
NonSemantic.Shader.DebugInfo.100and use the imported instruction set for bothOpExtInstandOpExtInstWithForwardRefsKHR. Without this, the Python assembler tries to parse names such asDebugSourceas integers.Tested
Windows 11 25H2 (build 26200.9974), Ryzen 9 8945HX, Python 3.13.7, Khronos SPIRV-Tools 2026.4. These checks run on the CPU and use no GPU driver.
The new synthetic regression failed on
mainwithinvalid integer literal 'DebugSource'and passed after the fix. It compares named instructions with numeric opcodes, validates the module withspirv-val --target-env vulkan1.2, and checks binary parity withspirv-asexcept for the generator word.python -IB -m unittest discover -s tests -p 'test_spirv_asm*.py'— 42 passed. The same command on the local integration with #78 passed 47 tests.python -IB tests/test_text_write_line_endings.py— 3 passed.python -IB scripts/run_semantic_tests.py tests/semantic -j 8— 6,075 tests across 463 files, zero failing files. The same suite on unpatchedmainalso had zero failing files.python -IB scripts/check_no_game_data.py— passed.AI-assisted: Yes. OpenAI Codex helped port the patch, run the Windows checks and prepare this PR.
Checklist
@Oliwettoo on GitHub · 2026-11-24 10:25 UTC · original
Looks good. The new
NONSEMANTIC_SHADER_DEBUGINFO_100table matches SPIRV-Headers'extinst.nonsemantic.shader.debuginfo.100.grammar.jsonexactly (same 44 names, same opcodes, checked by script).OpExtInstWithForwardRefsKHRstays out of the pure-Id fast path because of its literal operand, so routing it through the ext-set lookup is enough.tests/test_spirv_asm.pypasses on currentmain(the spirv-as comparison was skipped here, as there is no SPIRV-Tools on this machine). Ship. AI-assisted review.@QemmHD on GitHub · 2026-11-24 13:36 UTC · original
Merging.
Why merged: Adds the named NonSemantic.Shader.DebugInfo.100 instruction table so SPIR-V debug instructions disassemble by name. Oliwettoo checked that the table matches SPIRV-Headers' grammar exactly (44 names).
Why it's good: Data table plus tests only. Its tests: 47 passed. No behaviour change for shaders without debug info.
Tested on Windows 11, RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0, alone on main (
21625bca8or51f316092) and in a cumulative merge of #497, #278, #310, #334, #346, #340, #355, #361, #363, #620 and #577 (which carries #540) on main2d73c242f(git merge-tree: 0 conflicts against current main). Repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests): 566 passed / 5 skipped / 0 failed on main and on main + batch. compileall OK. Full ctest: 302/304 on main and on main + batch (the same two pre-existing failures, d3d12_execute_indirect_validation and d3d12_depth_resolve, no new ones).AI-assisted (Claude Code, Claude Opus 5.5).