shaders: index the DXBC identities used by Xbox native graphics pipelines #497
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!497
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/497/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?
@Rain156 on GitHub · 2026-11-24 06:27 UTC · original
Rain156:feat/native-graphics-shader-index→main· +324 −15 · 11 files · 3 commits · merged 2026-11-24 13:36 UTCClaimed 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.txtjoining 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
spirv-val.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
mainand merges cleanly.@QemmHD on GitHub · 2026-11-24 09:27 UTC · original
Looks useful, and its 8 new tests pass on Windows (main
7430f59). One thing before it can merge: make_game.py now imports the new tools/native_pso_hashes.py, which needs listing in runtime/cmake/translator_deps.cmake, in make_game.py's translation_sources_digest inputs and in the .github/workflows/runtime.yml paths. Without that, an edit to it doesn't re-trigger CI or invalidate the stage. Happy to re-test after a push.AI-assisted (Claude Code, Claude Opus 5.5).
@QemmHD on GitHub · 2026-11-24 13:36 UTC · original
Merging.
Why merged: Indexes the DXBC identities the Xbox native graphics pipelines use, which the native-PSO path needs. The earlier hold (new tool not listed as a translator input) is fixed in
62a95883b: native_pso_hashes is now in translator_deps.cmake, make_game.py's translation sources and runtime.yml.Why it's good: Security read of the three-dot diff: tools and tests only, no binaries, downloads or network calls. The PR's own tests: 129 passed. The consistency set, which caught the missing input registration last time, is clean now.
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).
@Dezmonius on GitHub · 2026-11-24 19:43 UTC · original
Follow-up validation of the #497 catalog against measured Xbox device slot 57 requests. Windows 10 22H2, Core i7-7700K, RTX 5070 / NVIDIA 610.88. DadaCap prototype
9173e790, Vulkan, with local Intel CLZERO and shader fixes from the preceding checks.All 1,669 console calls requested the pipeline-state IID and matched distinct graphics records in the local library by the state, input layout, and PS/VS program identities. The existing catalog resolved every required stage link to a present SPIR-V module: 714 PS, 296 VS, and 16 MS, with zero missing digests, stage mismatches, or missing modules. The nine stock native catalog tests in this tree also passed.
The slot was still forwarded to the PC lifetime tracker in this run, so the measurement verifies catalog coverage for the slot-57 work. It does not validate native graphics pipeline creation. The captured startup frames were black and the run reproduced the prior title stop.
No game data, hashes, binaries, captures, or raw logs attached. AI-assisted (Codex).
@aslan2142 on GitHub · 2026-11-25 04:14 UTC · original
@Rain156 a question about the rest of your claim
RT-SLOT57-NATIVE-GRAPHICS-PSO(this PR was its index part). Asking here because #14 has reached GitHub's 2,500-comment limit.mainnow: with #984, #968 and #939 merged and the completemake_game.pyshader set (main translation plusfspx,bvh,libraryandexe), a retail boot on an RDNA2 iGPU gets about 112k D3D12 calls in. Every device slot-57 graphics PSO is refused, because nothing builds<shaders>/fspx_gfx/index.json(the pipeline library's 25,471 graphics records). That is now the largest gap between the boot and anything drawn.AI-assisted (Claude Code, Claude Opus 5.5).
@Rain156 on GitHub · 2026-11-25 05:27 UTC · original · edited 2026-11-25 05:57 UTC
@aslan2142 I'm continuing RT-SLOT57-NATIVE-GRAPHICS-PSO. The fix is ready for review in #1592. It builds
fspx_gfx/index.jsonand resolves exact pipeline-program hashes through the Vulkan factory from #939. It uses the reader and runtime already in Leonida.On Windows with an RTX 5070 Ti (617.42), the normal retail startup trace recorded 25,450 / 25,450 successful slot-57 returns on unmodified
c7e82e26eand 25,450 / 25,450 on the candidate. I also isolated the failure by withholdingnative_hashes.txtfrom a private copy. Main returned 0 / 25,450 successes. The candidate returned 9,958 / 9,958 using kind-6 only before its run hit a title breakpoint. These are observed calls in runs of different lengths. Separate vertex and mesh readback tests passed in both eager and on-demand modes.Re-run
make_game.py --stages shaderswith your existing game, work and output paths and the original adapter options. The command backfills graphics while reusing the prior shader groups. Both wave64 settings validated 18,493 of 18,837 identified graphics programs. I haven't run the RDNA2 iGPU locally. If it still refuses requests, aggregatecatalog/kind6counts and HRESULTs from--trace-d3d12will distinguish lookup from backend rejection.