Recompiler: preserve the FSPX compute user SGPR count #219

Manually merged
github merged 1 commit from gh-pr/219/head into gh-pr/219/base 2026-11-26 04:15:59 +00:00
Owner

@⁠Kalmarv on GitHub · 2026-11-23 21:14 UTC · original
Kalmarv:fix/fspx-rsrc2-count → main · +34 −11 · 3 files · 1 commits · merged 2026-11-23 21:24 UTC

Follows #146.

XCL already reads COMPUTE_PGM_RSRC2 when translating an ACCC/FSPX compute shader. Pipeline creation previously looked only in FSSM for the user SGPR count, so binding and replay could fall back to the root-layout heuristic even when FSPX supplied the count. For a shader with four user SGPRs, all four are reserved and its root arguments belong in the argument table.

Read the FSPX count during pipeline metadata lookup and share register decoding with shader translation. The regression test builds two synthetic FSPX containers, sets unrelated bits around the count field, and checks counts of four and eight.

Tested

Windows 11 Pro 26200, Ryzen 9 9950X, x64 MSVC Rust 1.99.0. All checks were CPU-only.

  • Base 6da33fa7ad8c956e2ef72ed9769e3c96f7ac986a with only the new test applied. cargo test -j2 -p xcl --lib fspx_compute_user_sgprs_from_rsrc2 failed 1/1 as expected. Both containers parsed and returned the encoded register words, but the pipeline lookup returned [None, None].
  • Branch head 033a6d1fdf5ecb62fa45a6e865601c20ca53012d, directly on that base. The same test passed 1/1 with [Some(4), Some(8)]. The library test binary also passed all four hle::d3d12x::console_list::tests:: argument-layout tests and all eight gpu::xbox::tests:: container tests. Total 13 passed, 0 failed.

Not tested

  • GPU dispatch using an FSPX pipeline, a retail shader pack, or game output.
  • The full workspace suite.

AI use: Codex, GPT-6.2 Astra.

**@⁠Kalmarv** on GitHub · 2026-11-23 21:14 UTC · [original](https://github.com/xcl-dev/xcl/pull/219) `Kalmarv:fix/fspx-rsrc2-count` → `main` · +34 −11 · 3 files · 1 commits · merged 2026-11-23 21:24 UTC Follows #146. XCL already reads `COMPUTE_PGM_RSRC2` when translating an `ACCC/FSPX` compute shader. Pipeline creation previously looked only in FSSM for the user SGPR count, so binding and replay could fall back to the root-layout heuristic even when FSPX supplied the count. For a shader with four user SGPRs, all four are reserved and its root arguments belong in the argument table. Read the FSPX count during pipeline metadata lookup and share register decoding with shader translation. The regression test builds two synthetic FSPX containers, sets unrelated bits around the count field, and checks counts of four and eight. **Tested** Windows 11 Pro 26200, Ryzen 9 9950X, x64 MSVC Rust 1.99.0. All checks were CPU-only. - Base `6da33fa7ad8c956e2ef72ed9769e3c96f7ac986a` with only the new test applied. `cargo test -j2 -p xcl --lib fspx_compute_user_sgprs_from_rsrc2` failed 1/1 as expected. Both containers parsed and returned the encoded register words, but the pipeline lookup returned `[None, None]`. - Branch head `033a6d1fdf5ecb62fa45a6e865601c20ca53012d`, directly on that base. The same test passed 1/1 with `[Some(4), Some(8)]`. The library test binary also passed all four `hle::d3d12x::console_list::tests::` argument-layout tests and all eight `gpu::xbox::tests::` container tests. Total 13 passed, 0 failed. **Not tested** - GPU dispatch using an FSPX pipeline, a retail shader pack, or game output. - The full workspace suite. **AI use**: Codex, GPT-6.2 Astra.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:15:58 +00:00
github manually merged commit 033a6d1fdf into gh-pr/219/base 2026-11-26 04:15:59 +00:00
Author
Owner

@⁠ivall on GitHub · 2026-11-23 21:24 UTC · original

Merged (main d4f17ca). Checked on an RX 9070 (RDNA4) with 11 PRs merged together on main af20b4b: cargo build --workspace && cargo test --workspace -- --test-threads=4 - 605 unit tests passed, 0 failed (20 ignored), the integration and e2e tests passed; and the retail game still reaches its first menu at 30 fps (720 draws per 2 s).

**@⁠ivall** on GitHub · 2026-11-23 21:24 UTC · [original](https://github.com/xcl-dev/xcl/pull/219#issuecomment-7114417360) Merged (main d4f17ca). Checked on an RX 9070 (RDNA4) with 11 PRs merged together on main af20b4b: `cargo build --workspace && cargo test --workspace -- --test-threads=4` - 605 unit tests passed, 0 failed (20 ignored), the integration and e2e tests passed; and the retail game still reaches its first menu at 30 fps (720 draws per 2 s).
This discussion has been locked. Commenting is limited to contributors.
No description provided.