[PR #310] [MERGED] BUILD-SPIRV-DEBUGINFO: Support named SPIR-V shader debug instructions #362

Closed
opened 2026-11-26 20:17:37 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/310
Author: @ettehn
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @QemmHD

Base: main ← Head: spirv-nonsemantic-debuginfo


📝 Commits (1)

  • f8a8829 Support named SPIR-V shader debug instructions

📊 Changes

3 files changed (+95 additions, -2 deletions)

View changed files

📝 tests/test_spirv_asm.py (+43 -0)
📝 tools/spirv_asm.py (+4 -2)
📝 tools/spirv_asm_tables.py (+48 -0)

📄 Description

Claimed 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.100 and use the imported instruction set for both OpExtInst and OpExtInstWithForwardRefsKHR. Without this, the Python assembler tries to parse names such as DebugSource as 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 main with invalid integer literal 'DebugSource' and passed after the fix. It compares named instructions with numeric opcodes, validates the module with spirv-val --target-env vulkan1.2, and checks binary parity with spirv-as except 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 unpatched main also 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

  • No game data, keys or decryption.
  • No translator rule change. The patch affects the Python SPIR-V assembler.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/310 **Author:** [@ettehn](https://github.com/ettehn) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@QemmHD](https://github.com/QemmHD) **Base:** `main` ← **Head:** `spirv-nonsemantic-debuginfo` --- ### 📝 Commits (1) - [`f8a8829`](https://github.com/ubiquitarianism/leonida/commit/f8a88299e1dfd09195e129a1d14970e2b532ef2b) Support named SPIR-V shader debug instructions ### 📊 Changes **3 files changed** (+95 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_spirv_asm.py` (+43 -0) 📝 `tools/spirv_asm.py` (+4 -2) 📝 `tools/spirv_asm_tables.py` (+48 -0) </details> ### 📄 Description Claimed in the coordination issue as: [BUILD-SPIRV-DEBUGINFO](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7120674636) 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.100` and use the imported instruction set for both `OpExtInst` and `OpExtInstWithForwardRefsKHR`. Without this, the Python assembler tries to parse names such as `DebugSource` as 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 `main` with `invalid integer literal 'DebugSource'` and passed after the fix. It compares named instructions with numeric opcodes, validates the module with `spirv-val --target-env vulkan1.2`, and checks binary parity with `spirv-as` except 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 unpatched `main` also 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 - [x] No game data, keys or decryption. - No translator rule change. The patch affects the Python SPIR-V assembler. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:17:37 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#362
No description provided.