shaders: build the graphics program index for device slot 57 (RT-SLOT57-NATIVE-GRAPHICS-PSO) #1592

Closed
Rain156 wants to merge 2 commits from upstream-pr/1592 into main
Rain156 commented 2026-11-25 05:27:14 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Rain156 on 2026-11-25T05:27:14Z.


Claimed in the coordination issue as: RT-SLOT57-NATIVE-GRAPHICS-PSO. Original claim

Depends on: #497, #939, #984 and #974 (merged).

What and why

The normal shaders stage produced the compute pipeline library and the DXBC identity catalog. Device slot 57 could also look up raw graphics programs, but the build never populated that index. This follows up on the RDNA2 report in #497. Original report

  • Extract the pipeline-specific PS, VS and MS code with Leonida's existing reader, translate it and publish <shaders>/fspx_gfx/index.json. The graphics build has an independent resume marker that validates its index and module files.
  • The Vulkan factory first uses the container named by the stage records. It can resolve a missing identity by the full native program hash across all seven blocks, or retry a refused catalog PSO with indexed code of the same stage. It retains the decoded state, the input layout and the program bytes used by deferred binding. An ambiguous stage or an occupied block beyond the legacy fallback's two slots cannot silently produce an incomplete PSO.
  • The existing --trace-d3d12 switch reports catalog and kind-6 stage counts and the HRESULT. The full corpus test accounts for the new sub-index separately from carved DXBC containers.

Offline retail checks

Native Windows 11 x64, MSVC RelWithDebInfo, RTX 5070 Ti, NVIDIA 617.42, Xbox 1.0.2.1. The control runtime was unmodified c7e82e26e. The runs used a zero-capability AppContainer. The isolated control withheld only the DXBC identity catalog from the runtime inputs.

Build DXBC catalog Successful / observed slot-57 returns
main control present 25,450 / 25,450
follow-up present 25,450 / 25,450
main control withheld 0 / 25,450
follow-up withheld 9,958 / 9,958

The raw-only candidate trace attributed its successes to kind-6 lookups. The traces ended at title breakpoints after differing numbers of calls. They measure PSO creation during startup. World rendering and the reported RDNA2 iGPU still need their own verification.

Build and GPU validation

  • The standard make_game.py --stages shaders command backfilled the graphics library in an existing workspace. Its index was byte-identical to a separate full pass. A second standard invocation reused all six groups without changing any of their index bytes, index timestamps or module sizes/timestamps.
  • Native wave64 and wave64 emulation each passed spirv-val for 9,671/9,996 PS, 1,342/1,343 VS and 7,480/7,498 MS. All 18,493 published code hashes in each mode matched the complete extracted programs and had a module. The 344 remaining specialized programs were refused by the translator. Across 25,471 graphics records, raw keys alone supplied all stage links for 24,983. The DXBC catalog supplied all stage links for 25,450. Two records also refer to the unidentified slot 6.
  • The C++ corpus check loaded the 18,493 graphics entries and matched all 26,503 carved containers to their own primary entries, with zero failures. The primary and four pre-existing auxiliary indices matched the control byte for byte.
  • New synthetic VS+PS and MS+PS draws passed their GPU pixel checks in eager and on-demand compilation with synchronization validation. The VS case includes a PS reading its own code-base constants after the caller's buffers have been overwritten, a stale source container and a one-byte-wrong raw program. Fourteen related native CTests passed.
  • All 6,279 translator semantic tests passed across 487 files. The build regression sweep ran 661 checks with five skips and zero failures. The added graphics-only archive case, documentation links, compilation and repository game-data checks passed.

AI-assisted: Yes (Codex). The original claim is in #14. The successor tracker has the completion notice and the remaining specialized translation work.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5485722920 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1592). Originally posted by [Rain156](https://github.com/Rain156) on 2026-11-25T05:27:14Z. --- Claimed in the coordination issue as: RT-SLOT57-NATIVE-GRAPHICS-PSO. [Original claim](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7123093929) Depends on: #497, #939, #984 and #974 (merged). ### What and why The normal shaders stage produced the compute pipeline library and the DXBC identity catalog. Device slot 57 could also look up raw graphics programs, but the build never populated that index. This follows up on the RDNA2 report in #497. [Original report](https://github.com/ubiquitarianism/leonida/pull/497#issuecomment-7152662192) - Extract the pipeline-specific PS, VS and MS code with Leonida's existing reader, translate it and publish `<shaders>/fspx_gfx/index.json`. The graphics build has an independent resume marker that validates its index and module files. - The Vulkan factory first uses the container named by the stage records. It can resolve a missing identity by the full native program hash across all seven blocks, or retry a refused catalog PSO with indexed code of the same stage. It retains the decoded state, the input layout and the program bytes used by deferred binding. An ambiguous stage or an occupied block beyond the legacy fallback's two slots cannot silently produce an incomplete PSO. - The existing `--trace-d3d12` switch reports catalog and kind-6 stage counts and the HRESULT. The full corpus test accounts for the new sub-index separately from carved DXBC containers. ### Offline retail checks Native Windows 11 x64, MSVC RelWithDebInfo, RTX 5070 Ti, NVIDIA 617.42, Xbox 1.0.2.1. The control runtime was unmodified `c7e82e26e`. The runs used a zero-capability AppContainer. The isolated control withheld only the DXBC identity catalog from the runtime inputs. | Build | DXBC catalog | Successful / observed slot-57 returns | |---|---|---:| | main control | present | 25,450 / 25,450 | | follow-up | present | 25,450 / 25,450 | | main control | withheld | 0 / 25,450 | | follow-up | withheld | 9,958 / 9,958 | The raw-only candidate trace attributed its successes to kind-6 lookups. The traces ended at title breakpoints after differing numbers of calls. They measure PSO creation during startup. World rendering and the reported RDNA2 iGPU still need their own verification. ### Build and GPU validation - The standard `make_game.py --stages shaders` command backfilled the graphics library in an existing workspace. Its index was byte-identical to a separate full pass. A second standard invocation reused all six groups without changing any of their index bytes, index timestamps or module sizes/timestamps. - Native wave64 and wave64 emulation each passed `spirv-val` for 9,671/9,996 PS, 1,342/1,343 VS and 7,480/7,498 MS. All 18,493 published code hashes in each mode matched the complete extracted programs and had a module. The 344 remaining specialized programs were refused by the translator. Across 25,471 graphics records, raw keys alone supplied all stage links for 24,983. The DXBC catalog supplied all stage links for 25,450. Two records also refer to the unidentified slot 6. - The C++ corpus check loaded the 18,493 graphics entries and matched all 26,503 carved containers to their own primary entries, with zero failures. The primary and four pre-existing auxiliary indices matched the control byte for byte. - New synthetic VS+PS and MS+PS draws passed their GPU pixel checks in eager and on-demand compilation with synchronization validation. The VS case includes a PS reading its own code-base constants after the caller's buffers have been overwritten, a stale source container and a one-byte-wrong raw program. Fourteen related native CTests passed. - All 6,279 translator semantic tests passed across 487 files. The build regression sweep ran 661 checks with five skips and zero failures. The added graphics-only archive case, documentation links, compilation and repository game-data checks passed. AI-assisted: Yes (Codex). The original claim is in #14. The successor tracker has the [completion notice](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7154337573) and the [remaining specialized translation work](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7154337920).
Snooozs commented 2026-11-25 14:47:01 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Snooozs on 2026-11-25T14:47:01Z.


This has conflicted with main since the slot 57 state work (#1671, #1691, #1703) landed, so I merged main 446574e76 into it and tested that, in case it saves you the time: Snooozs/leonida branch merge-main-into-1592 (one merge commit on your 817b4be0b; take it with git pull https://github.com/Snooozs/leonida merge-main-into-1592, or redo it as you like - I am not opening a second pull request).

What needed a decision:

  • d3d12_xs_native_pso.h: main added the B4G4R4A4 stand-in blend retry after create_pipeline, in the body you moved into build(). I moved the retry into build(), so it runs for both stage sources, and before your retry with indexed code (a catalog pipeline that succeeds with the blend fallback is returned, as on main).
  • native_pso.h: git merges this without a conflict, but it would not compile: native_pso_blend_test and native_pso_depth_test on main call np::plan(desc, map), and here plan takes a third argument. I added a two-argument overload that only uses the records' containers.
  • d3d12_translated_draw_test.cpp: keeps both --native-fspx and --dual-source.

Tested on the merge, Windows 10 Pro 19045, RTX 5060 Ti, NVIDIA 621.01, MSVC 14.43 RelWithDebInfo: 24 of 24 of d3d12_translated_draw, xbox_native_base_draw, xbox_native_fspx_draw, xbox_derived_mask_*, d3d12_dual_source_draw(_eager), d3d12_mesh, xbox_native_fspx_mesh, native_pso_blend/depth/fallback, device_proxy*, xs_proxy*, shader_library; tests/test_library_shaders_stage.py 18 of 18 (before the overload was added; it is Python only). Not run: the whole ctest set, a boot, the dual-source path together with indexed (kind-6) stages.

I am translating the graphics programs from my own package with the merged make_game.py (llvm-mc 23.1.6, wave64 emulation) and will add the counts here.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7165807748 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1592#issuecomment-7165807748). Originally posted by [Snooozs](https://github.com/Snooozs) on 2026-11-25T14:47:01Z. --- This has conflicted with `main` since the slot 57 state work (#1671, #1691, #1703) landed, so I merged `main` 446574e76 into it and tested that, in case it saves you the time: [`Snooozs/leonida` branch `merge-main-into-1592`](https://github.com/Snooozs/leonida/tree/merge-main-into-1592) (one merge commit on your 817b4be0b; take it with `git pull https://github.com/Snooozs/leonida merge-main-into-1592`, or redo it as you like - I am not opening a second pull request). What needed a decision: - **`d3d12_xs_native_pso.h`:** `main` added the B4G4R4A4 stand-in blend retry after `create_pipeline`, in the body you moved into `build()`. I moved the retry into `build()`, so it runs for both stage sources, and before your retry with indexed code (a catalog pipeline that succeeds with the blend fallback is returned, as on `main`). - **`native_pso.h`:** git merges this without a conflict, but it would not compile: `native_pso_blend_test` and `native_pso_depth_test` on `main` call `np::plan(desc, map)`, and here `plan` takes a third argument. I added a two-argument overload that only uses the records' containers. - **`d3d12_translated_draw_test.cpp`:** keeps both `--native-fspx` and `--dual-source`. Tested on the merge, Windows 10 Pro 19045, RTX 5060 Ti, NVIDIA 621.01, MSVC 14.43 RelWithDebInfo: 24 of 24 of `d3d12_translated_draw`, `xbox_native_base_draw`, `xbox_native_fspx_draw`, `xbox_derived_mask_*`, `d3d12_dual_source_draw(_eager)`, `d3d12_mesh`, `xbox_native_fspx_mesh`, `native_pso_blend/depth/fallback`, `device_proxy*`, `xs_proxy*`, `shader_library`; `tests/test_library_shaders_stage.py` 18 of 18 (before the overload was added; it is Python only). Not run: the whole `ctest` set, a boot, the dual-source path together with indexed (kind-6) stages. I am translating the graphics programs from my own package with the merged `make_game.py` (llvm-mc 23.1.6, wave64 emulation) and will add the counts here. AI-assisted (Claude Code).
Snooozs commented 2026-11-25 15:08:11 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Snooozs on 2026-11-25T15:08:11Z.


Counts from my own 1.0.2.1 package, as promised: merged make_game.py (translate_library_stages, fspx_gfx only), llvm-mc 23.1.6, --wave64-emulate, 8 shards, 22 minutes including unpacking: 18,493 of 18,837 programs, all 18,493 pass spirv-val: 9,671 PS, 1,342 VS, 7,480 MS. Exactly your emulated numbers. AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7166359530 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1592#issuecomment-7166359530). Originally posted by [Snooozs](https://github.com/Snooozs) on 2026-11-25T15:08:11Z. --- Counts from my own 1.0.2.1 package, as promised: merged `make_game.py` (`translate_library_stages`, `fspx_gfx` only), llvm-mc 23.1.6, `--wave64-emulate`, 8 shards, 22 minutes including unpacking: **18,493 of 18,837 programs, all 18,493 pass spirv-val: 9,671 PS, 1,342 VS, 7,480 MS.** Exactly your emulated numbers. AI-assisted (Claude Code).
BubsMcgee commented 2026-11-25 15:34:05 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by BubsMcgee on 2026-11-25T15:34:05Z.


Retail-boot data point that this PR should fix (Windows 11, RTX 3080 Ti, driver 616.64; main-based runtime at 71a769d7d, shaders stage run from a 1.0.2.1 package):

  • The runtime reports 29277 translated shaders (2710 fspx, 0 fspx_compute, 0 fspx_gfx, 52 bvh, 12 exe) — the graphics program index is empty, matching DadaCap's "no fspx_gfx set" finding.
  • Slot 57 is used: device slot 57 (Xbox native graphics pipeline / PC lifetime tracker) first call, routed to DeserializeGraphicsPipelineStateX.
  • Exactly 4 ID3D12Device2::CreatePipelineState failures, paired fail/ok/fail/ok at trace records ~127452/127454 and ~128214/128215, then the boot continues to session d with non-black frames.

So those 4 failures line up with slot-57 native graphics PSOs that cannot resolve a graphics program without fspx_gfx. This PR builds that index and adds the catalog/kind-6 retry, so it should turn them into successes. For contrast, #1497 (bary-fallback) and #1818 (on-demand console streams) do not apply to this boot: the device has fragment-shader barycentrics, and the boot is eager, not LEONIDA_PIPELINE_COMPILE=on-demand.

I have not run this branch (it is CONFLICTING on current main), but I can test Snooozs/leonida:merge-main-into-1592 plus a full fspx_gfx build and re-run this boot if that is useful. Counts and record numbers only; no game data.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7167042589 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1592#issuecomment-7167042589). Originally posted by [BubsMcgee](https://github.com/BubsMcgee) on 2026-11-25T15:34:05Z. --- Retail-boot data point that this PR should fix (Windows 11, RTX 3080 Ti, driver 616.64; main-based runtime at `71a769d7d`, shaders stage run from a 1.0.2.1 package): - The runtime reports `29277 translated shaders (2710 fspx, 0 fspx_compute, 0 fspx_gfx, 52 bvh, 12 exe)` — the graphics program index is empty, matching DadaCap's "no `fspx_gfx` set" finding. - Slot 57 is used: `device slot 57 (Xbox native graphics pipeline / PC lifetime tracker) first call`, routed to `DeserializeGraphicsPipelineStateX`. - Exactly **4 `ID3D12Device2::CreatePipelineState` failures**, paired fail/ok/fail/ok at trace records ~127452/127454 and ~128214/128215, then the boot continues to session `d` with non-black frames. So those 4 failures line up with slot-57 native graphics PSOs that cannot resolve a graphics program without `fspx_gfx`. This PR builds that index and adds the catalog/kind-6 retry, so it should turn them into successes. For contrast, #1497 (bary-fallback) and #1818 (on-demand console streams) do not apply to this boot: the device has fragment-shader barycentrics, and the boot is eager, not `LEONIDA_PIPELINE_COMPILE=on-demand`. I have not run this branch (it is CONFLICTING on current main), but I can test `Snooozs/leonida:merge-main-into-1592` plus a full `fspx_gfx` build and re-run this boot if that is useful. Counts and record numbers only; no game data. AI-assisted.
DadaCap commented 2026-11-25 15:53:41 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-25T15:53:41Z.


Retail result with this branch merged onto a tree of current main (RTX 5080, NVIDIA 621.24), 18,735 of 18,837 programs in fspx_gfx (18,493 from the pull request as it is, plus 242 of its refusals re-disassembled with tools/rdna2_decode.py; the remaining 102: 78 DPP on v_cmpx, 18 s_getpc_b64, 6 without a container). The ten hashes one run asked for at slot 57 are all covered. With it, native_hashes.txt and an indirect mesh merge, a run showed a world picture (#1608 finding).

Two things that may save someone a day:

  1. The catalog comes first. With fspx_gfx but no native_hashes.txt the title's frames were black from the intro on (the package splash stayed on screen); with both, or with the catalog alone, the intro plays. The log line is slot 57 has no native_hashes.txt; checking indexed native programs. My folder lacked it because I had re-translated with a script of mine.
  2. Compile cost is graphics now: the first world frame built 168 pipelines and the second 297, up to 41 s for one mesh pair.

Merge notes: the only semantic conflict was the B4G4R4A4 stand-in blend retry in d3d12_xs_native_pso.h (kept inside this pull request's build()). ctest on the merge: xbox_native_fspx_draw, xbox_native_fspx_mesh, d3d12_translated_draw, native_pso_blend, native_pso_depth, native_pso_fallback pass. AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7167406878 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1592#issuecomment-7167406878). Originally posted by [DadaCap](https://github.com/DadaCap) on 2026-11-25T15:53:41Z. --- Retail result with this branch merged onto a tree of current `main` (RTX 5080, NVIDIA 621.24), 18,735 of 18,837 programs in `fspx_gfx` (18,493 from the pull request as it is, plus 242 of its refusals re-disassembled with `tools/rdna2_decode.py`; the remaining 102: 78 `DPP on v_cmpx`, 18 `s_getpc_b64`, 6 without a container). The ten hashes one run asked for at slot 57 are all covered. With it, `native_hashes.txt` and an indirect mesh merge, a run showed a world picture ([#1608 finding](https://github.com/ubiquitarianism/leonida/issues/1608)). Two things that may save someone a day: 1. **The catalog comes first.** With `fspx_gfx` but no `native_hashes.txt` the title's frames were black from the intro on (the package splash stayed on screen); with both, or with the catalog alone, the intro plays. The log line is `slot 57 has no native_hashes.txt; checking indexed native programs`. My folder lacked it because I had re-translated with a script of mine. 2. **Compile cost is graphics now:** the first world frame built 168 pipelines and the second 297, up to 41 s for one mesh pair. Merge notes: the only semantic conflict was the B4G4R4A4 stand-in blend retry in `d3d12_xs_native_pso.h` (kept inside this pull request's `build()`). ctest on the merge: `xbox_native_fspx_draw`, `xbox_native_fspx_mesh`, `d3d12_translated_draw`, `native_pso_blend`, `native_pso_depth`, `native_pso_fallback` pass. AI-assisted (Claude Code).
BubsMcgee commented 2026-11-25 17:23:41 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by BubsMcgee on 2026-11-25T17:23:41Z.


Tested Snooozs/leonida:merge-main-into-1592 (202d6d20f) in the retail boot — RTX 3080 Ti, driver 616.64.

The slot-57 fix works:

  • the port loads spirv/fspx_gfx (18,493 programs) and logs device slot 57 routed to DeserializeGraphicsPipelineStateX, with slot 57 stage sources: catalog=1/2 kind6=0 hr=0x0;
  • the four slot-57 CreatePipelineState failures from the eager boot (~#127452/#128214) are gone;
  • the game now passes that point: session d at t75 s, 2,505 presents, 40/40 non-black frames, 0 device faults, and it starts streaming world data (160 file opens) from t97 s in a 240 s boot.

Remaining on the same boot:

  • 15 ID3D12Device2::CreatePipelineState failures, all on PipelineStream::Mesh streams (type 24, "contains a mesh shader; DXIL kind 13") — #137311/#137313/#138069/#138074 and #229763/#229766/#229771/#230854/#230861/#230868 (10 of 15 listed). Hundreds of other mesh streams created; the log gives no refusal reason for these 15.
  • The 240 s run then exits 0xC0000005 in amd_fidelityfx_upscaler_xbox.dll+0x65ff (read 0x10) at ~175 s, while the world is loading; a 120 s run does not reach it. That is the FSR path, not slot 57.
  • The boot also logs 0xC0000005 in leonida::fsdraw::has_tsharp; that is our local LEONIDA_LOCAL_DIAGNOSTICS probe, not this PR.

@Rain156 @Snooozs: is the 15-stream mesh-shader refusal expected (programs the library does not carry?), and is the FSR crash at world load known? I can re-run with local diagnostics off for a clean digest.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7169439582 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1592#issuecomment-7169439582). Originally posted by [BubsMcgee](https://github.com/BubsMcgee) on 2026-11-25T17:23:41Z. --- Tested `Snooozs/leonida:merge-main-into-1592` (202d6d20f) in the retail boot — RTX 3080 Ti, driver 616.64. The slot-57 fix works: - the port loads `spirv/fspx_gfx` (18,493 programs) and logs `device slot 57 routed to DeserializeGraphicsPipelineStateX`, with `slot 57 stage sources: catalog=1/2 kind6=0 hr=0x0`; - the four slot-57 `CreatePipelineState` failures from the eager boot (~#127452/#128214) are gone; - the game now passes that point: session `d` at t~75 s, 2,505 presents, 40/40 non-black frames, 0 device faults, and it starts streaming world data (160 file opens) from t~97 s in a 240 s boot. Remaining on the same boot: - 15 `ID3D12Device2::CreatePipelineState` failures, all on `PipelineStream::Mesh` streams (type 24, "contains a mesh shader; DXIL kind 13") — #137311/#137313/#138069/#138074 and #229763/#229766/#229771/#230854/#230861/#230868 (10 of 15 listed). Hundreds of other mesh streams created; the log gives no refusal reason for these 15. - The 240 s run then exits `0xC0000005` in `amd_fidelityfx_upscaler_xbox.dll+0x65ff` (read 0x10) at ~175 s, while the world is loading; a 120 s run does not reach it. That is the FSR path, not slot 57. - The boot also logs `0xC0000005` in `leonida::fsdraw::has_tsharp`; that is our local `LEONIDA_LOCAL_DIAGNOSTICS` probe, not this PR. @Rain156 @Snooozs: is the 15-stream mesh-shader refusal expected (programs the library does not carry?), and is the FSR crash at world load known? I can re-run with local diagnostics off for a clean digest. AI-assisted.
BubsMcgee commented 2026-11-25 17:26:42 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by BubsMcgee on 2026-11-25T17:26:42Z.


Follow-up on the FSR crash: it is the FSPX translation, not slot 57.

  • spirv/fspx carries 27 of the DLL's 29 programs; amd_fidelityfx_upscaler_xbox_03 and _18 are the two missing (all 29 are unpacked under shaders/fspx).
  • The FSR4 DLL's slot-67 DeserializeComputePipelineStateX call 2694 returns 0x80070057 (E_INVALIDARG); that is the pass the DLL names FFX_FSR4_PASS_4. It falls back to "NewBE", the runtime marks that ID3D12Device2::CreatePipelineState unsupported (#123672), and the DLL's CreateModel(...) == FFX_API_RETURN_OK assertion fires → the 0xC0000005 in amd_fidelityfx_upscaler_xbox.dll+0x65ff at ~175 s (the 120 s boot never reaches it).
  • The rest of the 240 s boot is clean for this PR: session d, 2,505 presents, 40/40 non-black, 0 device faults, 160 world files opened, and the 18,493-program fspx_gfx resolving slot 57.

So the world-load blocker is translating the two missing FSPX programs (pass 4 is presumably _03/_18).

@Rain156 @Snooozs is this two-program FSPX gap already owned/tracked elsewhere? docs/fspx.md currently says 27 of 29 translate, so it may be known. I can file it as a finding if not.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7169512690 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1592#issuecomment-7169512690). Originally posted by [BubsMcgee](https://github.com/BubsMcgee) on 2026-11-25T17:26:42Z. --- Follow-up on the FSR crash: it is the FSPX translation, not slot 57. - `spirv/fspx` carries **27 of the DLL's 29** programs; `amd_fidelityfx_upscaler_xbox_03` and `_18` are the two missing (all 29 are unpacked under `shaders/fspx`). - The FSR4 DLL's slot-67 `DeserializeComputePipelineStateX` **call 2694** returns `0x80070057` (`E_INVALIDARG`); that is the pass the DLL names `FFX_FSR4_PASS_4`. It falls back to "NewBE", the runtime marks that `ID3D12Device2::CreatePipelineState` unsupported (#123672), and the DLL's `CreateModel(...) == FFX_API_RETURN_OK` assertion fires → the `0xC0000005` in `amd_fidelityfx_upscaler_xbox.dll+0x65ff` at ~175 s (the 120 s boot never reaches it). - The rest of the 240 s boot is clean for this PR: session `d`, 2,505 presents, 40/40 non-black, 0 device faults, 160 world files opened, and the 18,493-program `fspx_gfx` resolving slot 57. So the world-load blocker is translating the two missing FSPX programs (pass 4 is presumably `_03`/`_18`). @Rain156 @Snooozs is this two-program FSPX gap already owned/tracked elsewhere? `docs/fspx.md` currently says 27 of 29 translate, so it may be known. I can file it as a finding if not. AI-assisted.
kurrutako commented 2026-11-25 17:53:44 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by kurrutako on 2026-11-25T17:53:44Z.


@BubsMcgee on the two missing FSPX programs: #1862 (SHADER-FSPX-DOT4-EXACT, open) is the fix for that gap. With it, all 29 FSPX programs translate on a retail copy here (27 of 29 on main). Retail boots on an RTX 5070 with #1862 merged no longer end in the amd_fidelityfx_upscaler_xbox.dll access violation; before it, my boot hit it at about 210 s. Those boots did not have this branch, so I can't say how the two interact. AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7170149123 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1592#issuecomment-7170149123). Originally posted by [kurrutako](https://github.com/kurrutako) on 2026-11-25T17:53:44Z. --- @BubsMcgee on the two missing FSPX programs: #1862 (SHADER-FSPX-DOT4-EXACT, open) is the fix for that gap. With it, all 29 FSPX programs translate on a retail copy here (27 of 29 on `main`). Retail boots on an RTX 5070 with #1862 merged no longer end in the `amd_fidelityfx_upscaler_xbox.dll` access violation; before it, my boot hit it at about 210 s. Those boots did not have this branch, so I can't say how the two interact. AI-assisted.
OreoFR commented 2026-11-26 19:08:08 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-26T19:08:08Z.


@Rain156 is this still on your side? It now conflicts with main (needs rebase). Two things that may help:

  • #1647 is merged, so the 78 DPP on v_cmpx refusals DadaCap counted here now translate. That leaves 18 s_getpc_b64 and 6 without a container.
  • Snooozs has main merged into this branch (Snooozs/leonida:merge-main-into-1592), and BubsMcgee confirmed slot 57 loads 18,493 programs with it.

Happy to test a rebased branch on an RTX 4070 Laptop (NVIDIA 621.40). If you'd rather hand it over, say so and someone can carry it on. AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7201232407 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1592#issuecomment-7201232407). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-26T19:08:08Z. --- @Rain156 is this still on your side? It now conflicts with `main` (`needs rebase`). Two things that may help: - #1647 is merged, so the 78 `DPP on v_cmpx` refusals DadaCap counted here now translate. That leaves 18 `s_getpc_b64` and 6 without a container. - Snooozs has `main` merged into this branch (`Snooozs/leonida:merge-main-into-1592`), and BubsMcgee confirmed slot 57 loads 18,493 programs with it. Happy to test a rebased branch on an RTX 4070 Laptop (NVIDIA 621.40). If you'd rather hand it over, say so and someone can carry it on. AI-assisted (Claude Code, Claude Opus 5.5).
Coderlord commented 2026-11-27 13:13:15 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Coderlord on 2026-11-27T13:13:15Z.


@Rain156 @OreoFR this conflicts with today's main (63185f4a3) in three files, all against the new slot-57 blend and depth state. Here's a resolution, in case it saves someone the work: Coderlord/leonida-ubiq:merge-main-into-1592 (de01b1372, two commits on 817b4be0b: the merge, then a test fix).

  • d3d12_xs_native_pso.h: this PR's build() (catalog container or the library's indexed program, and the retry with the indexed bytes) now holds main's B4G4R4A4 stand-in blend retry, so both attempts get it. Includes from both sides.
  • d3d12_translated_draw_test.cpp: main's --dual-source and this PR's --native-fspx side by side, with the kind-6/FSSM wording in the closing line.
  • CMakeLists.txt: main's d3d12_mesh_heavy_cache and this PR's xbox_native_fspx_mesh.
  • Test fix: main's native_pso_blend_test and native_pso_depth_test call plan() with two arguments, so they don't build against this PR's three-argument plan(). They now pass a code-stage callback that knows no code ranges.

Tested on an RTX 5080 (NVIDIA 621.40, Windows 11) as part of an integration branch with these same four files plus other open PRs: the 11 tests on these files pass (d3d12_translated_draw, d3d12_dual_source_draw and _eager, xbox_native_fspx_draw, d3d12_mesh, d3d12_mesh_heavy_cache, xbox_native_fspx_mesh, native_pso_blend, native_pso_depth, native_pso_fallback, dual_source_fragment; the two native_pso_ ones after the test fix). This branch alone was not built. AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7219206294 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1592#issuecomment-7219206294). Originally posted by [Coderlord](https://github.com/Coderlord) on 2026-11-27T13:13:15Z. --- @Rain156 @OreoFR this conflicts with today's `main` (63185f4a3) in three files, all against the new slot-57 blend and depth state. Here's a resolution, in case it saves someone the work: `Coderlord/leonida-ubiq:merge-main-into-1592` (de01b1372, two commits on 817b4be0b: the merge, then a test fix). - `d3d12_xs_native_pso.h`: this PR's `build()` (catalog container or the library's indexed program, and the retry with the indexed bytes) now holds main's B4G4R4A4 stand-in blend retry, so both attempts get it. Includes from both sides. - `d3d12_translated_draw_test.cpp`: main's `--dual-source` and this PR's `--native-fspx` side by side, with the kind-6/FSSM wording in the closing line. - `CMakeLists.txt`: main's `d3d12_mesh_heavy_cache` and this PR's `xbox_native_fspx_mesh`. - Test fix: main's `native_pso_blend_test` and `native_pso_depth_test` call `plan()` with two arguments, so they don't build against this PR's three-argument `plan()`. They now pass a code-stage callback that knows no code ranges. Tested on an RTX 5080 (NVIDIA 621.40, Windows 11) as part of an integration branch with these same four files plus other open PRs: the 11 tests on these files pass (`d3d12_translated_draw`, `d3d12_dual_source_draw` and `_eager`, `xbox_native_fspx_draw`, `d3d12_mesh`, `d3d12_mesh_heavy_cache`, `xbox_native_fspx_mesh`, `native_pso_blend`, `native_pso_depth`, `native_pso_fallback`, `dual_source_fragment`; the two `native_pso_` ones after the test fix). This branch alone was not built. AI-assisted (Claude Code).
MoonEyes commented 2026-11-28 17:59:27 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T17:59:27Z.


Hi @Rain156, thanks for this pull request. It currently conflicts with main (conflicting file(s): runtime/CMakeLists.txt, runtime/shims/d3d12_xs_native_pso.h, runtime/test/d3d12_translated_draw_test.cpp), so it carries the needs rebase label. CONTRIBUTING.md asks authors to rebase their branch on main; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7243443173 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1592#issuecomment-7243443173). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-28T17:59:27Z. --- Hi @Rain156, thanks for this pull request. It currently conflicts with `main` (conflicting file(s): `runtime/CMakeLists.txt`, `runtime/shims/d3d12_xs_native_pso.h`, `runtime/test/d3d12_translated_draw_test.cpp`), so it carries the `needs rebase` label. CONTRIBUTING.md asks authors to rebase their branch on `main`; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here. AI-assisted (Claude Code, Claude Opus 5.5).
Rain156 commented 2026-11-29 06:26:39 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Rain156 on 2026-11-29T06:26:39Z.


I don’t have time to continue working on this PR. If another contributor would like to take it over, please feel free. I’ll leave this PR open for reference.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7251857853 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1592#issuecomment-7251857853). Originally posted by [Rain156](https://github.com/Rain156) on 2026-11-29T06:26:39Z. --- I don’t have time to continue working on this PR. If another contributor would like to take it over, please feel free. I’ll leave this PR open for reference.
enlight3d commented 2026-11-29 12:33:59 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-11-29T12:33:59Z.


Run of #1592 on a native Windows GPU (NVIDIA RTX 3090). Synthetic tests only, no game files.

Heads: PR 817b4be0b, main 8fb974878.
Merged or head-only: head-only. git merge --no-ff of the PR into main conflicts in runtime/CMakeLists.txt, runtime/shims/d3d12_xs_native_pso.h and runtime/test/d3d12_translated_draw_test.cpp, so everything below ran on the PR head itself (detached at 817b4be0b, merge base c7e82e26e).

Commands:

git checkout --detach pr-1592
cmake -S runtime -B runtime/build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_REQUIRE_VULKAN=ON
cmake --build runtime/build -j 8 --target d3d12_mesh_test d3d12_translated_draw_test device_proxy_test xs_proxy_mock_test shader_library_test shader_library_corpus_test d3d12_vulkan_device_test d3d12_pipeline_library_test d3d12_pso_validation_test gta6rt
ctest -R "^(<the 23 tests that run those targets>)$" --output-on-failure -j1

Green: 22 Passed, 1 Skipped, 0 failed. Includes the two tests the PR adds, xbox_native_fspx_draw and xbox_native_fspx_mesh, plus d3d12_mesh, d3d12_translated_draw, xbox_native_base_draw, device_proxy (+ _trace), the xs_proxy_mock* family (9), shader_library, d3d12_vulkan_device, d3d12_pso_validation and d3d12_pipeline_library. shader_library_corpus is Skipped (it needs the retail corpus, which is not used here), and tests/test_library_shaders_stage.py was not run (no pytest in the Python used for this run).

Red (behavioural, the PR's non-test changes reverted to the merge base, tests and runtime/CMakeLists.txt kept: docs/*, make_game.py, runtime/shims/d3d12_vulkan_device.cpp, d3d12_xs_device.cpp/.h, d3d12_xs_native_pso.h, runtime/src/native_pso.h, shader_library.h). Everything builds; 6 of 23 fail:

  • xbox_native_fspx_draw at d3d12_translated_draw_test.cpp:254 (stale-digest recovery with raw VS/PS: create_native_pso fails)
  • xbox_native_fspx_mesh at d3d12_mesh_test.cpp:333 (raw MS/PS: create_native_pso fails)
  • shader_library at shader_library_test.cpp:530 (compute_program(short_code).kind == Kind::fspx)
  • device_proxy, device_proxy_trace, xs_proxy_mock (test sources extended by the PR)
    The other 16 tests (including d3d12_mesh, d3d12_translated_draw, xbox_native_base_draw) pass in that state, so they do not measure the change. All 23 pass again with the PR restored.

Link: no new imports vs the merge base c7e82e26e (gta6rt.exe built at both, 651 entries, identical lists). Against current main 8fb974878 (714 entries) the only entry present here and not in main is api-ms-win-crt-stdio-l1-1-0.dll!__stdio_common_vswscanf, which the merge-base build already has, so it is not from this PR.

Machine: RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro 10.0.26300, MSVC 19.44, RelWithDebInfo, Ninja, Vulkan SDK 1.4.363.1.

The branch conflicts with main in the three files above; could you merge main into it so it can be tested merged?

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7255904232 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1592#issuecomment-7255904232). Originally posted by [enlight3d](https://github.com/enlight3d) on 2026-11-29T12:33:59Z. --- Run of #1592 on a native Windows GPU (NVIDIA RTX 3090). Synthetic tests only, no game files. Heads: PR `817b4be0b`, main `8fb974878`. Merged or head-only: **head-only**. `git merge --no-ff` of the PR into main conflicts in `runtime/CMakeLists.txt`, `runtime/shims/d3d12_xs_native_pso.h` and `runtime/test/d3d12_translated_draw_test.cpp`, so everything below ran on the PR head itself (detached at `817b4be0b`, merge base `c7e82e26e`). Commands: ``` git checkout --detach pr-1592 cmake -S runtime -B runtime/build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_REQUIRE_VULKAN=ON cmake --build runtime/build -j 8 --target d3d12_mesh_test d3d12_translated_draw_test device_proxy_test xs_proxy_mock_test shader_library_test shader_library_corpus_test d3d12_vulkan_device_test d3d12_pipeline_library_test d3d12_pso_validation_test gta6rt ctest -R "^(<the 23 tests that run those targets>)$" --output-on-failure -j1 ``` Green: 22 Passed, 1 Skipped, 0 failed. Includes the two tests the PR adds, `xbox_native_fspx_draw` and `xbox_native_fspx_mesh`, plus `d3d12_mesh`, `d3d12_translated_draw`, `xbox_native_base_draw`, `device_proxy` (+ `_trace`), the `xs_proxy_mock*` family (9), `shader_library`, `d3d12_vulkan_device`, `d3d12_pso_validation` and `d3d12_pipeline_library`. `shader_library_corpus` is Skipped (it needs the retail corpus, which is not used here), and `tests/test_library_shaders_stage.py` was not run (no pytest in the Python used for this run). Red (behavioural, the PR's non-test changes reverted to the merge base, tests and `runtime/CMakeLists.txt` kept: `docs/*`, `make_game.py`, `runtime/shims/d3d12_vulkan_device.cpp`, `d3d12_xs_device.cpp/.h`, `d3d12_xs_native_pso.h`, `runtime/src/native_pso.h`, `shader_library.h`). Everything builds; 6 of 23 fail: - `xbox_native_fspx_draw` at `d3d12_translated_draw_test.cpp:254` (stale-digest recovery with raw VS/PS: `create_native_pso` fails) - `xbox_native_fspx_mesh` at `d3d12_mesh_test.cpp:333` (raw MS/PS: `create_native_pso` fails) - `shader_library` at `shader_library_test.cpp:530` (`compute_program(short_code).kind == Kind::fspx`) - `device_proxy`, `device_proxy_trace`, `xs_proxy_mock` (test sources extended by the PR) The other 16 tests (including `d3d12_mesh`, `d3d12_translated_draw`, `xbox_native_base_draw`) pass in that state, so they do not measure the change. All 23 pass again with the PR restored. Link: no new imports vs the merge base `c7e82e26e` (gta6rt.exe built at both, 651 entries, identical lists). Against current main `8fb974878` (714 entries) the only entry present here and not in main is `api-ms-win-crt-stdio-l1-1-0.dll!__stdio_common_vswscanf`, which the merge-base build already has, so it is not from this PR. Machine: RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro 10.0.26300, MSVC 19.44, RelWithDebInfo, Ninja, Vulkan SDK 1.4.363.1. The branch conflicts with main in the three files above; could you merge main into it so it can be tested merged?
aslan2142 commented 2026-12-01 17:23:53 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T17:23:53Z.


Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, d3d12/, or general docs), please feel free to reopen it.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7319234163 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1592#issuecomment-7319234163). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T17:23:53Z. --- Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (`d3d12/`) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, `d3d12/`, or general docs), please feel free to reopen it.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
ProjectLeonida/mandy!1592
No description provided.