Memory: lazy sparse pages, XCL_MS_IN_AS mesh experiment, BCPack BC1 #1004

Closed
pedro-anthony wants to merge 32 commits from upstream-pr/1011 into main
pedro-anthony commented 2026-11-24 10:22:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by pedro-anthony on 2026-11-24T10:22:38Z.


This branch bundles the linux-proton work since the last upstream sync: sparse-window and write-watch changes, a kernelx physical-page fix, the BCPack BC1 decoder, a detiling change, PresentX plane blending, and two experiments that are off by default (XCL_LAZY_SPARSE=1, XCL_MS_IN_AS=1). It is not one logical change and is well over the size target (about 3900 insertions across 33 files). It should be split before review: preparation, then each feature with its tests, then the experiments on their own.

What is in it

  • D3D12.X: sparse state tracks system-memory tile pools (crates/xcl/src/hle/d3d12x/sparse.rs, console_heap.rs, real.rs)
  • D3D12.X: XCL_MS_IN_AS translates mesh pipelines whose MS sits in the AS slot (experiment) (real.rs, bind.rs, list_x.rs, console_list.rs, title_list.rs)
  • Memory: physical pages mapped into a sparse window can be lazy (XCL_LAZY_SPARSE=1) (crates/xcl/src/hle/kernelx.rs, kernelx/lazy.rs)
  • D3D12.X: write-watch only over committed sparse runs, kept up to date per map (sparse.rs, title_textures.rs)
  • D3D12.X: PresentX with several planes shows them blended, plane 0 at the bottom (present.rs, compose.rs)
  • Shaders: detile a level with per-column offsets instead of a division per texel (gpu/tiling.rs, shaders.rs)
  • DirectStorage: tests expect BCPack BC1 requests to be accepted, and the BCPack BC1 decoder with its generated tables (hle/bcunpack/, hle/dstorage.rs, scripts/gen_bcunpack_tables.py, THIRD_PARTY.md)
  • kernelx: XMemMapPhysicalPagesScatter with no page array unmaps the addresses (kernelx.rs)
  • D3D12.X: R9G9B9E5 render targets / UAVs are half floats on the PC (gpu/recomp/, real.rs)
  • Crash line: an access violation names the faulting page's state (eh.rs)
  • Tests: gpu/recomp/aperture_tests.rs (experiments E1/E1b/E2, several #[ignore]d), tests/gpu_compute_e2e.rs

Tested

  • Not run. The crate builds and tests on Windows only, and this description was written on Linux, so no test counts are reported here.
  • hardware, Rust version, debug / release: not recorded for this change
  • cargo test --workspace -- --test-threads=4: not run

Regression run
Not produced yet. Before this is opened, scripts/smoke.ps1 must be run on a title built from main and from this head commit, and both xcl-smoke blocks pasted here. This PR changes the runtime, so the PR's block must be rerun after every push.

main:

PR:

Not tested

  • Everything above: no Windows build, no GPU test run, no game run, no smoke run.
  • XCL_LAZY_SPARSE=1 and XCL_MS_IN_AS=1 are unmeasured. The mesh experiment's commit message reports black frames once its pipelines exist, which is not understood; it is off by default.
  • Aperture experiments E1/E1b/E2 are #[ignore]d measurement tests and have not been run here.
  • No AMD or NVIDIA runs.

AI use

  • Claude Code with Claude Opus 5.5 wrote the code and commit messages (the commit trailers name it). This description was written by Claude Haiku 5.5 from the diff, and was not checked against a test run.
<!-- greyfinch-sync:ivall/xcl:issue:6579640778 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1011). Originally posted by [pedro-anthony](https://github.com/pedro-anthony) on 2026-11-24T10:22:38Z. --- This branch bundles the linux-proton work since the last upstream sync: sparse-window and write-watch changes, a kernelx physical-page fix, the BCPack BC1 decoder, a detiling change, PresentX plane blending, and two experiments that are off by default (`XCL_LAZY_SPARSE=1`, `XCL_MS_IN_AS=1`). It is not one logical change and is well over the size target (about 3900 insertions across 33 files). It should be split before review: preparation, then each feature with its tests, then the experiments on their own. **What is in it** - `D3D12.X: sparse state tracks system-memory tile pools` (`crates/xcl/src/hle/d3d12x/sparse.rs`, `console_heap.rs`, `real.rs`) - `D3D12.X: XCL_MS_IN_AS translates mesh pipelines whose MS sits in the AS slot (experiment)` (`real.rs`, `bind.rs`, `list_x.rs`, `console_list.rs`, `title_list.rs`) - `Memory: physical pages mapped into a sparse window can be lazy (XCL_LAZY_SPARSE=1)` (`crates/xcl/src/hle/kernelx.rs`, `kernelx/lazy.rs`) - `D3D12.X: write-watch only over committed sparse runs, kept up to date per map` (`sparse.rs`, `title_textures.rs`) - `D3D12.X: PresentX with several planes shows them blended, plane 0 at the bottom` (`present.rs`, `compose.rs`) - `Shaders: detile a level with per-column offsets instead of a division per texel` (`gpu/tiling.rs`, `shaders.rs`) - `DirectStorage: tests expect BCPack BC1 requests to be accepted`, and the BCPack BC1 decoder with its generated tables (`hle/bcunpack/`, `hle/dstorage.rs`, `scripts/gen_bcunpack_tables.py`, `THIRD_PARTY.md`) - `kernelx: XMemMapPhysicalPagesScatter with no page array unmaps the addresses` (`kernelx.rs`) - `D3D12.X: R9G9B9E5 render targets / UAVs are half floats on the PC` (`gpu/recomp/`, `real.rs`) - Crash line: an access violation names the faulting page's state (`eh.rs`) - Tests: `gpu/recomp/aperture_tests.rs` (experiments E1/E1b/E2, several `#[ignore]`d), `tests/gpu_compute_e2e.rs` **Tested** - Not run. The crate builds and tests on Windows only, and this description was written on Linux, so no test counts are reported here. - hardware, Rust version, debug / release: not recorded for this change - `cargo test --workspace -- --test-threads=4`: not run **Regression run** Not produced yet. Before this is opened, `scripts/smoke.ps1` must be run on a title built from `main` and from this head commit, and both `xcl-smoke` blocks pasted here. This PR changes the runtime, so the PR's block must be rerun after every push. main: PR: **Not tested** - Everything above: no Windows build, no GPU test run, no game run, no smoke run. - `XCL_LAZY_SPARSE=1` and `XCL_MS_IN_AS=1` are unmeasured. The mesh experiment's commit message reports black frames once its pipelines exist, which is not understood; it is off by default. - Aperture experiments E1/E1b/E2 are `#[ignore]`d measurement tests and have not been run here. - No AMD or NVIDIA runs. **AI use** - Claude Code with Claude Opus 5.5 wrote the code and commit messages (the commit trailers name it). This description was written by Claude Haiku 5.5 from the diff, and was not checked against a test run.
upstream-sync closed this pull request 2026-11-24 11:05:23 +00:00

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
xcl-dev/xcl!1004
No description provided.