[PR #497] [MERGED] shaders: index the DXBC identities used by Xbox native graphics pipelines #546

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

📋 Pull Request Information

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

Base: main ← Head: feat/native-graphics-shader-index


📝 Commits (3)

  • 1740e09 shaders: index DXBC identities for Xbox native graphics pipelines
  • 9e77e97 Merge remote-tracking branch 'upstream/main' into feat/native-graphics-shader-index
  • 62a9588 build: track native PSO catalog dependencies

📊 Changes

11 files changed (+324 additions, -15 deletions)

View changed files

📝 .github/workflows/runtime.yml (+6 -0)
📝 docs/d3d12_vulkan.md (+9 -0)
📝 make_game.py (+28 -2)
📝 runtime/cmake/translator_deps.cmake (+6 -3)
📝 tests/test_bvh_shaders_stage.py (+1 -1)
📝 tests/test_cmake_translator_deps.py (+8 -6)
📝 tests/test_fspx_shaders_stage.py (+3 -1)
📝 tests/test_make_game_translator_flags.py (+2 -0)
➕ tests/test_native_pso_hashes.py (+140 -0)
📝 tests/test_shader_stage_resume.py (+6 -2)
➕ tools/native_pso_hashes.py (+115 -0)

📄 Description

Claimed in the coordination issue as: RT-SLOT57-NATIVE-GRAPHICS-PSO-INDEX (claim). This is the shader-index prerequisite of RT-SLOT57-NATIVE-GRAPHICS-PSO.

What and why

Xbox native graphics pipeline descriptors refer to a stage by its DXBC HASH digest. The translation index names shaders by carved filename and FSSM hash. The shaders stage now writes a local, versioned native_hashes.txt joining those identities. This lets a renderer recover the stage and original container for a native pipeline request.

The writer validates the stage and FSSM hash, detects conflicting uses of a digest and atomically publishes the sorted catalog. An existing translation can add or refresh the catalog without rebuilding SPIR-V. The guest device dispatch is being tested separately.

Adapted from enx's GPL implementation using the format measurements by LooperSalty and KkelebekK. Original implementation

Tested

  • Independently read the HASH part of all 26,503 local retail 1.0.2.1 primary containers. Every row resolves to the expected stage and FSSM program. There are 25,321 distinct identities and zero missing or conflicting entries. The 26,503 translated primary modules passed spirv-val.
  • Regenerated the catalog in the translated workspace. The output was byte-identical. A second invocation kept its timestamp and reused it.
  • 216 Python tests covering the catalog, shader-stage resumption, translation settings and shader dependencies passed. The translator semantic suite passed all 6,104 tests in 465 files.
  • Python compilation, the build help command and the repository-wide game-data check passed.

GPUs tested: The catalog is CPU-only. Corpus verification ran on Windows 11 x64 on the RTX 5070 Ti / NVIDIA 617.42 test machine.

AI-assisted: yes, OpenAI Codex.

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys or decryption in this change or its report.
  • No translator rule changed.

🔄 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/497 **Author:** [@Rain156](https://github.com/Rain156) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@QemmHD](https://github.com/QemmHD) **Base:** `main` ← **Head:** `feat/native-graphics-shader-index` --- ### 📝 Commits (3) - [`1740e09`](https://github.com/ubiquitarianism/leonida/commit/1740e093c90cab386e2f419bbc115ca94637b09f) shaders: index DXBC identities for Xbox native graphics pipelines - [`9e77e97`](https://github.com/ubiquitarianism/leonida/commit/9e77e974eef1c6e8f0ee0d773b9e1abededc7928) Merge remote-tracking branch 'upstream/main' into feat/native-graphics-shader-index - [`62a9588`](https://github.com/ubiquitarianism/leonida/commit/62a95883b608d510ae0967cd7ddf5c9938b333a9) build: track native PSO catalog dependencies ### 📊 Changes **11 files changed** (+324 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/runtime.yml` (+6 -0) 📝 `docs/d3d12_vulkan.md` (+9 -0) 📝 `make_game.py` (+28 -2) 📝 `runtime/cmake/translator_deps.cmake` (+6 -3) 📝 `tests/test_bvh_shaders_stage.py` (+1 -1) 📝 `tests/test_cmake_translator_deps.py` (+8 -6) 📝 `tests/test_fspx_shaders_stage.py` (+3 -1) 📝 `tests/test_make_game_translator_flags.py` (+2 -0) ➕ `tests/test_native_pso_hashes.py` (+140 -0) 📝 `tests/test_shader_stage_resume.py` (+6 -2) ➕ `tools/native_pso_hashes.py` (+115 -0) </details> ### 📄 Description Claimed in the coordination issue as: RT-SLOT57-NATIVE-GRAPHICS-PSO-INDEX ([claim](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7123853830)). This is the shader-index prerequisite of RT-SLOT57-NATIVE-GRAPHICS-PSO. ### What and why Xbox native graphics pipeline descriptors refer to a stage by its DXBC HASH digest. The translation index names shaders by carved filename and FSSM hash. The shaders stage now writes a local, versioned `native_hashes.txt` joining those identities. This lets a renderer recover the stage and original container for a native pipeline request. The writer validates the stage and FSSM hash, detects conflicting uses of a digest and atomically publishes the sorted catalog. An existing translation can add or refresh the catalog without rebuilding SPIR-V. The guest device dispatch is being tested separately. Adapted from enx's GPL implementation using the format measurements by LooperSalty and KkelebekK. [Original implementation](https://git.notrexed.dev/enx/leonida/commit/5c175db901f8486bcdefd03746b578b657e3151f) ### Tested - Independently read the HASH part of all 26,503 local retail 1.0.2.1 primary containers. Every row resolves to the expected stage and FSSM program. There are 25,321 distinct identities and zero missing or conflicting entries. The 26,503 translated primary modules passed `spirv-val`. - Regenerated the catalog in the translated workspace. The output was byte-identical. A second invocation kept its timestamp and reused it. - 216 Python tests covering the catalog, shader-stage resumption, translation settings and shader dependencies passed. The translator semantic suite passed all 6,104 tests in 465 files. - Python compilation, the build help command and the repository-wide game-data check passed. GPUs tested: The catalog is CPU-only. Corpus verification ran on Windows 11 x64 on the RTX 5070 Ti / NVIDIA 617.42 test machine. AI-assisted: yes, OpenAI Codex. ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic. - [x] No game data, keys or decryption in this change or its report. - [x] No translator rule changed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:18:14 +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#546
No description provided.