D3D12.X: pack sparse pool tile reuse into the fullest heap #2898

Open
github-bot wants to merge 1 commit from github-bot/gh-2898 into nvidia-dev AGit
Owner

@⁠itsSio on GitHub · 2026-11-26 22:17 UTC · original
itsSio:d3d12x/nvidia-dev-pack-sparse-pools → nvidia-dev · +190 −29 · 1 files · 1 commits · open

Part of #2688.

sparse.rs stored free sparse pool tiles in a flat Vec<(u32, u32)> and popped cooling FIFO before free, scattering reuse across nearly-empty draining 64 MiB pools so retire_free_pools could not reclaim them and splitting UpdateTileMappings across more heaps.

This partitions free tiles by heap (FreePools): reuse_tile drains cooled tiles into their heaps and packs the fullest partially-used heap (1..POOL_TILES, lowest index on ties), leaving nearly-empty and all-free heaps untouched for retirement unless no partial heap has space. retire_free_pools checks heap counts in O(pools), and before_execute_on passes free.has_empty_heap() to retire_due so an all-free heap completed during drain_cooling retires even when cooling is empty. Orthogonal to #2630.

What is in it

  • crates/xcl/src/hle/d3d12x/sparse.rs (+190/-29): per-heap FreePools, fullest-heap reuse_tile, free_heaps/retire_free_pools/retire_due updates, and unit test reuse_tile_packs_fuller_heaps_so_nearly_empty_pools_retire.

Tested

  • RTX 5080 (driver 32.0.16.1088), Ryzen 7 9800X3D, 32 GB RAM, Win11 26200, rustc 1.97.0 (stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5, debug (release for smoke & A/B):
    • cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4: 1748 passed, 7 failed, 48 ignored, 27 SKIPPED (21 no wave64, 3 wave32 per-lane f16/cvt refused, 2 no heap windows, 1 pso_measurement driver cache; all 7 pre-existing on af2cecc4: texture_upload::tests x2, d3d12_mesh_stream, gpu_compute_e2e, gpu_two_pass_cache_e2e x2, intermittent e2e driver log write). hle::d3d12x::sparse::tests: 61 passed, 0 failed, 1 ignored.
    • WARP (XCL_ADAPTER=warp XCL_TEST_WARP=1): reuse_tile_packs_fuller_heaps_so_nearly_empty_pools_retire 1 passed, 0 failed.
    • Paired 180 s Series S A/B (XCL_DEVICE_TYPE=lockhart XCL_PREPARE=0 XCL_NETWORK=0 XCL_ACTIVITY=1, warm cache, af2cecc4 vs 8cf249e5): peak commit 22042 -> 21818 MB (-224 MB), final commit 20250 -> 20144 MB (-106 MB), final local VRAM 8159 -> 8093 MB (-66 MB), steady sparse pools 5440 -> 5376 MB (-64 MB, slack 855 -> 791 MB), UpdateTileMappings 891 -> 736 (-17.4% for 120k mapped tiles), frames 5173 -> 5237, 0 removals/crashes.
  • RTX 2080 SUPER (driver 32.0.16.1088), Ryzen 5 5600X, 16 GB RAM, Win11 26200, rustc 1.99.1 (stable-x86_64-pc-windows-msvc), DXC 1.8.2502.11, debug:
    • cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4: 1749 passed, 6 failed, 48 ignored, 30 SKIPPED (same 6 pre-existing af2cecc4 failures; 0 new failures).
    • WARP (XCL_ADAPTER=warp XCL_TEST_WARP=1): reuse_tile_packs_fuller_heaps_so_nearly_empty_pools_retire 1 passed, 0 failed.

Regression run

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 5080
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1019 (PresentX 1019)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14670 MB
xcl-smoke v1
commit: 8cf249e55603a3e6dc4c34aa9e1b4fec5077d997
gpu: NVIDIA GeForce RTX 5080
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1622 (PresentX 1622)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15869 MB

Not tested

  • AMD/Intel GPUs, Linux/Wine, multi-run Series X/S sweeps past menus, and combined stacking with #2630.

AI use
Ran via Samaritan:

  • Antigravity (Gemini 4 Neon (High)): designed and implemented FreePools and its unit test, ran the paired RTX 5080 A/B measurement, dual-PC test suites, WARP checks, smoke run, and initial PR prep/coordination.
  • Antigravity (Gemini 4 Hydrogen (High)): performed an independent read-only diff audit of sparse.rs (PASS), live upstream duplicate and mergeability audit against nvidia-dev (eae01502), and scripts/pr_check.py/URL verification.
**@⁠itsSio** on GitHub · 2026-11-26 22:17 UTC · [original](https://github.com/xcl-dev/xcl/pull/2898) `itsSio:d3d12x/nvidia-dev-pack-sparse-pools` → `nvidia-dev` · +190 −29 · 1 files · 1 commits · open Part of #2688. `sparse.rs` stored free sparse pool tiles in a flat `Vec<(u32, u32)>` and popped `cooling` FIFO before `free`, scattering reuse across nearly-empty draining 64 MiB pools so `retire_free_pools` could not reclaim them and splitting `UpdateTileMappings` across more heaps. This partitions free tiles by heap (`FreePools`): `reuse_tile` drains cooled tiles into their heaps and packs the fullest partially-used heap (`1..POOL_TILES`, lowest index on ties), leaving nearly-empty and all-free heaps untouched for retirement unless no partial heap has space. `retire_free_pools` checks heap counts in O(pools), and `before_execute_on` passes `free.has_empty_heap()` to `retire_due` so an all-free heap completed during `drain_cooling` retires even when `cooling` is empty. Orthogonal to #2630. **What is in it** - `crates/xcl/src/hle/d3d12x/sparse.rs` (`+190/-29`): per-heap `FreePools`, fullest-heap `reuse_tile`, `free_heaps`/`retire_free_pools`/`retire_due` updates, and unit test `reuse_tile_packs_fuller_heaps_so_nearly_empty_pools_retire`. **Tested** - RTX 5080 (driver `32.0.16.1088`), Ryzen 7 9800X3D, 32 GB RAM, Win11 26200, `rustc 1.97.0` (`stable-x86_64-pc-windows-msvc`), DXC `1.9.2609.5`, debug (release for smoke & A/B): - `cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4`: 1748 passed, 7 failed, 48 ignored, 27 `SKIPPED` (21 no wave64, 3 wave32 per-lane f16/cvt refused, 2 no heap windows, 1 `pso_measurement` driver cache; all 7 pre-existing on `af2cecc4`: `texture_upload::tests` x2, `d3d12_mesh_stream`, `gpu_compute_e2e`, `gpu_two_pass_cache_e2e` x2, intermittent `e2e` driver log write). `hle::d3d12x::sparse::tests`: 61 passed, 0 failed, 1 ignored. - WARP (`XCL_ADAPTER=warp XCL_TEST_WARP=1`): `reuse_tile_packs_fuller_heaps_so_nearly_empty_pools_retire` 1 passed, 0 failed. - Paired 180 s Series S A/B (`XCL_DEVICE_TYPE=lockhart XCL_PREPARE=0 XCL_NETWORK=0 XCL_ACTIVITY=1`, warm cache, `af2cecc4` vs `8cf249e5`): peak commit `22042 -> 21818 MB` (`-224 MB`), final commit `20250 -> 20144 MB` (`-106 MB`), final local VRAM `8159 -> 8093 MB` (`-66 MB`), steady sparse pools `5440 -> 5376 MB` (`-64 MB`, slack `855 -> 791 MB`), `UpdateTileMappings` `891 -> 736` (`-17.4%` for 120k mapped tiles), frames `5173 -> 5237`, `0` removals/crashes. - RTX 2080 SUPER (driver `32.0.16.1088`), Ryzen 5 5600X, 16 GB RAM, Win11 26200, `rustc 1.99.1` (`stable-x86_64-pc-windows-msvc`), DXC `1.8.2502.11`, debug: - `cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4`: 1749 passed, 6 failed, 48 ignored, 30 `SKIPPED` (same 6 pre-existing `af2cecc4` failures; 0 new failures). - WARP (`XCL_ADAPTER=warp XCL_TEST_WARP=1`): `reuse_tile_packs_fuller_heaps_so_nearly_empty_pools_retire` 1 passed, 0 failed. **Regression run** ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 5080 title: retail-title seconds: 60 exit: 0x0 frames shown: 1019 (PresentX 1019) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14670 MB ``` ``` xcl-smoke v1 commit: 8cf249e55603a3e6dc4c34aa9e1b4fec5077d997 gpu: NVIDIA GeForce RTX 5080 title: retail-title seconds: 60 exit: 0x0 frames shown: 1622 (PresentX 1622) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15869 MB ``` **Not tested** - AMD/Intel GPUs, Linux/Wine, multi-run Series X/S sweeps past menus, and combined stacking with #2630. **AI use** Ran via Samaritan: - Antigravity (Gemini 4 Neon (High)): designed and implemented `FreePools` and its unit test, ran the paired RTX 5080 A/B measurement, dual-PC test suites, WARP checks, smoke run, and initial PR prep/coordination. - Antigravity (Gemini 4 Hydrogen (High)): performed an independent read-only diff audit of `sparse.rs` (`PASS`), live upstream duplicate and mergeability audit against `nvidia-dev` (`eae01502`), and `scripts/pr_check.py`/URL verification.
sparse.rs previously stored free pool tiles in a flat Vec and popped the
oldest cooled tile from cooling in FIFO order before checking free. When
tiles freed across multiple 64 MiB pools cooled, reuse_tile handed out
tiles from nearly-empty draining pools instead of packing fuller ones,
keeping sparse pools pinned so retire_free_pools could not reclaim them
and splitting UpdateTileMappings calls across more heaps.

Partition free sparse pool tiles by heap in FreePools. reuse_tile drains
cooled tiles into their heaps and takes from the fullest partially-used
heap (fewest free tiles in 1..POOL_TILES, lowest heap index on ties),
leaving nearly-empty and all-free heaps untouched for retirement unless
no partially-used heap has a free tile. retire_free_pools drains cooling
and checks heap counts in O(pools) instead of scanning all free tiles,
and before_execute_on passes free.has_empty_heap() to retire_due so an
all-free heap completed by take_tile's drain_cooling still retires even
when cooling is empty.

Measured on RTX 5080 (180 s Series S XCL_DEVICE_TYPE=lockhart A/B vs
nvidia-dev af2cecc4): peak commit 22042 -> 21818 MB (-224 MB), steady
sparse pools 5440 -> 5376 MB (-64 MB), UpdateTileMappings calls 891 ->
736 (-17.4%) for 120k mapped tiles, 0 device removals, 0 crashes.
sparse::tests: 61 passed, 0 failed, 1 ignored.

Assisted-by: Antigravity (Gemini 4 Neon (High))
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 01:15:26 +00:00
Author
Owner

@⁠Gevroska on GitHub · 2026-11-26 22:37 UTC · original

I compared 8cf249e5 with its direct nvidia-dev parent af2cecc4 on Microsoft WARP. I populated two 64 MiB sparse heaps, one with 1,024 tiles and the other with two. I released a tile from each, waited for fence retirement and the normal cooling interval, then mapped and wrote a new tile.

Both revisions matched all 67,239,936 initial bytes and passed five full 65,536-byte tile readbacks across reuse and retirement. The difference came at allocation: the parent reused the draining heap and retained two active slots. The PR reused the denser heap, allowing the draining heap’s active slot to retire and leaving one. This checks data preservation and pool bookkeeping. I did not measure deferred heap destruction, physical VRAM savings, or a title workload.

I used Codex GPT-6.2 Sol for the fixture and WARP runs. A separate GPT-6.2 Sol agent independently checked the fixture, artifacts, and recorded results. Codex GPT-6.2 Astra wrote this comment.

**@⁠Gevroska** on GitHub · 2026-11-26 22:37 UTC · [original](https://github.com/xcl-dev/xcl/pull/2898#issuecomment-7204839515) I compared `8cf249e5` with its direct `nvidia-dev` parent `af2cecc4` on Microsoft WARP. I populated two 64 MiB sparse heaps, one with 1,024 tiles and the other with two. I released a tile from each, waited for fence retirement and the normal cooling interval, then mapped and wrote a new tile. Both revisions matched all 67,239,936 initial bytes and passed five full 65,536-byte tile readbacks across reuse and retirement. The difference came at allocation: the parent reused the draining heap and retained two active slots. The PR reused the denser heap, allowing the draining heap’s active slot to retire and leaving one. This checks data preservation and pool bookkeeping. I did not measure deferred heap destruction, physical VRAM savings, or a title workload. I used Codex GPT-6.2 Sol for the fixture and WARP runs. A separate GPT-6.2 Sol agent independently checked the fixture, artifacts, and recorded results. Codex GPT-6.2 Astra wrote this comment.
Author
Owner

@⁠DarkPanda69 on GitHub · 2026-11-26 22:37 UTC · original

AMD run for the Not tested line.

Tested: pass, head 8cf249e applied on its base nvidia-dev eae0150, debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X.
cargo test -p xcl --lib -- hle::d3d12x::sparse --test-threads=4 --nocapture:

  • AMD RX 9070 XT (RDNA4), driver 32.0.32029.2010: 63 passed, 0 failed, 1 ignored, 0 SKIPPED, reuse_tile_packs_fuller_heaps_so_nearly_empty_pools_retire among them. nvidia-dev without the PR: 62 passed, 0 failed.

The sparse tests that need a device make it with D3D12CreateDevice(None, ..), so they ran on the first adapter, the RX 9070 XT here.

Not tested: Series X/S sweeps in a title, stacking with #2630, Intel, Linux / Wine.

AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.

**@⁠DarkPanda69** on GitHub · 2026-11-26 22:37 UTC · [original](https://github.com/xcl-dev/xcl/pull/2898#issuecomment-7204850014) AMD run for the **Not tested** line. **Tested:** pass, head `8cf249e` applied on its base `nvidia-dev` `eae0150`, debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X. `cargo test -p xcl --lib -- hle::d3d12x::sparse --test-threads=4 --nocapture`: - AMD RX 9070 XT (RDNA4), driver 32.0.32029.2010: 63 passed, 0 failed, 1 ignored, 0 SKIPPED, `reuse_tile_packs_fuller_heaps_so_nearly_empty_pools_retire` among them. `nvidia-dev` without the PR: 62 passed, 0 failed. The sparse tests that need a device make it with `D3D12CreateDevice(None, ..)`, so they ran on the first adapter, the RX 9070 XT here. **Not tested:** Series X/S sweeps in a title, stacking with #2630, Intel, Linux / Wine. AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
Author
Owner

@⁠Aniseto on GitHub · 2026-11-26 22:39 UTC · original

Ran the sparse-pool reuse tests at 8cf249e5 on an NVIDIA Blackwell desktop part:

Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 14.44.35207, DXC 1.9.2609.5, debug build.

XCL_ADAPTER=NVIDIA cargo test -p xcl --lib reuse_tile_packs_fuller_heaps_so_nearly_empty_pools_retire -- --test-threads=1
1 passed; 0 failed; 0 ignored; 0 measured; 1648 filtered out      (exit 0)

XCL_ADAPTER=NVIDIA cargo test -p xcl --lib hle::d3d12x::sparse -- --test-threads=1
61 passed; 0 failed; 1 ignored; 0 measured; 1587 filtered out      (exit 0)

The new reuse_tile_packs_fuller_heaps_so_nearly_empty_pools_retire test passes, as do all 61 tests in the sparse module (one ignored). These are CPU-side pool bookkeeping tests; no UpdateTileMappings was issued on the adapter. The PR has no comments yet and the author tested on an RTX 5080, so this adds a second NVIDIA datapoint with driver 32.0.16.2124.

Not tested: the release smoke and A/B frame times from the description, a paired 60 s smoke run, the full workspace suite and its seven known failures, AMD and Intel GPUs, native wave64 hosts, Wine, game data.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.

**@⁠Aniseto** on GitHub · 2026-11-26 22:39 UTC · [original](https://github.com/xcl-dev/xcl/pull/2898#issuecomment-7204875432) Ran the sparse-pool reuse tests at `8cf249e5` on an NVIDIA Blackwell desktop part: Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 14.44.35207, DXC 1.9.2609.5, debug build. ``` XCL_ADAPTER=NVIDIA cargo test -p xcl --lib reuse_tile_packs_fuller_heaps_so_nearly_empty_pools_retire -- --test-threads=1 1 passed; 0 failed; 0 ignored; 0 measured; 1648 filtered out (exit 0) XCL_ADAPTER=NVIDIA cargo test -p xcl --lib hle::d3d12x::sparse -- --test-threads=1 61 passed; 0 failed; 1 ignored; 0 measured; 1587 filtered out (exit 0) ``` The new `reuse_tile_packs_fuller_heaps_so_nearly_empty_pools_retire` test passes, as do all 61 tests in the `sparse` module (one ignored). These are CPU-side pool bookkeeping tests; no `UpdateTileMappings` was issued on the adapter. The PR has no comments yet and the author tested on an RTX 5080, so this adds a second NVIDIA datapoint with driver 32.0.16.2124. Not tested: the release smoke and A/B frame times from the description, a paired 60 s smoke run, the full workspace suite and its seven known failures, AMD and Intel GPUs, native wave64 hosts, Wine, game data. AI-assisted (OpenCode), model: **DeepSeek V4.1 Flash Free** - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.
Author
Owner

@⁠Decodere on GitHub · 2026-11-26 23:44 UTC · original

Independent desktop NVIDIA (natural 8 GB VRAM) verification of PR #2898 at head 8cf249e55603a3e6dc4c34aa9e1b4fec5077d997 (1 commit; exact parent & merge-base on nvidia-dev: af2cecc40886a8682ecf3267f5328c6dc4b66ad7).

Environment

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12, 7022 MB DXGI local video memory budget observed in this run), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6C / 12T), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200 (Developer Mode off)
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC, DXC 1.9.2609.5, --release

Targeted release tests & build (8cf249e5)

Command Result
cargo test --release -p xcl --lib reuse_tile_packs_fuller_heaps_so_nearly_empty_pools_retire -- --nocapture (3 consecutive runs) 1 passed; 0 failed; 0 ignored; 1648 filtered out × 3 (0.00s, 0.00s, 0.00s)
cargo test --release -p xcl --lib hle::d3d12x::sparse:: (3 consecutive runs) 61 passed; 0 failed; 1 ignored; 1587 filtered out × 3 (2.32s, 2.30s, 2.19s; early_commit_timing is #[ignore])
cargo build --release -p xcl --bin xcl Clean build (1m 25s, exit 0)

Paired quiet 60 s retail smoke (title: 29640639)

Exact parent & merge-base on nvidia-dev (af2cecc40886a8682ecf3267f5328c6dc4b66ad7, cached baseline on the same machine):

xcl-smoke v1
commit: af2cecc40886a8682ecf3267f5328c6dc4b66ad7
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1547 (PresentX 1547)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16342 MB

PR #2898 (8cf249e55603a3e6dc4c34aa9e1b4fec5077d997):

xcl-smoke v1
commit: 8cf249e55603a3e6dc4c34aa9e1b4fec5077d997
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1594 (PresentX 1594)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15014 MB

Runtime log observations (xcl.log)

  • 9384 log lines, 0 [ERROR] / device-removal / panic lines.
  • Active sparse uploads observed: last sparse windows timing: entry write-watch 468 ms (528988 dirty pages), lock wait 10 ms, chunk scan 48 ms, upload 193 ms (39181 runs, 30367 of them in 235 dispatches).
  • Final draw/memory telemetry in log: 19099 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped); last memory sample 14925 MB committed by the process; video memory 6181 MB local, 4778 MB non-local; sparse pools 896 MB (838 MB mapped); video memory budget 7022 MB.

Limits of coverage

  • Fullest-heap tile packing (reuse_tile_packs_fuller_heaps_so_nearly_empty_pools_retire, 3/3) and the full hle::d3d12x::sparse:: suite (61/0/1, 3/3, early_commit_timing remained #[ignore]) passed on RTX 4060.
  • The 60 s menu capture on title: 29640639 stayed at sparse pools 896 MB (838 MB mapped) and confirms clean steady-state behavior on nvidia-dev without exercising multi-minute world streaming churn or measuring long-run sparse pool retirement counts; frame-count and peak-commit deltas vs. the cached af2cecc4 baseline reflect normal single-run startup/worker variance and are not attributed to this PR.

AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).

**@⁠Decodere** on GitHub · 2026-11-26 23:44 UTC · [original](https://github.com/xcl-dev/xcl/pull/2898#issuecomment-7205806648) Independent desktop NVIDIA (natural 8 GB VRAM) verification of **PR #2898** at head `8cf249e55603a3e6dc4c34aa9e1b4fec5077d997` (`1` commit; exact parent & merge-base on `nvidia-dev`: `af2cecc40886a8682ecf3267f5328c6dc4b66ad7`). ### Environment - **GPU:** NVIDIA GeForce RTX 4060 (8 GB / `7956 MiB` reported by D3D12, `7022 MB` DXGI local video memory budget observed in this run), driver `32.0.16.2114` (NVIDIA `621.14`, WDDM 3.2) - **CPU / RAM / OS:** Intel Core i5-11400F (6C / 12T), 32 GB RAM (`31.9 GiB` usable), Windows 11 Home `26200` (Developer Mode off) - **Toolchain:** `rustc 1.100.0 (0ef1bc386 2026-11-09)` MSVC, DXC `1.9.2609.5`, `--release` ### Targeted release tests & build (`8cf249e5`) | Command | Result | | --- | --- | | `cargo test --release -p xcl --lib reuse_tile_packs_fuller_heaps_so_nearly_empty_pools_retire -- --nocapture` (3 consecutive runs) | `1 passed; 0 failed; 0 ignored; 1648 filtered out` × 3 (`0.00s`, `0.00s`, `0.00s`) | | `cargo test --release -p xcl --lib hle::d3d12x::sparse::` (3 consecutive runs) | `61 passed; 0 failed; 1 ignored; 1587 filtered out` × 3 (`2.32s`, `2.30s`, `2.19s`; `early_commit_timing` is `#[ignore]`) | | `cargo build --release -p xcl --bin xcl` | Clean build (`1m 25s`, exit `0`) | ### Paired quiet 60 s retail smoke (`title: 29640639`) Exact parent & merge-base on `nvidia-dev` (`af2cecc40886a8682ecf3267f5328c6dc4b66ad7`, cached baseline on the same machine): ``` xcl-smoke v1 commit: af2cecc40886a8682ecf3267f5328c6dc4b66ad7 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1547 (PresentX 1547) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16342 MB ``` PR #2898 (`8cf249e55603a3e6dc4c34aa9e1b4fec5077d997`): ``` xcl-smoke v1 commit: 8cf249e55603a3e6dc4c34aa9e1b4fec5077d997 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1594 (PresentX 1594) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15014 MB ``` ### Runtime log observations (`xcl.log`) - `9384` log lines, `0` `[ERROR]` / device-removal / panic lines. - Active sparse uploads observed: last `sparse windows timing:` entry `write-watch 468 ms (528988 dirty pages), lock wait 10 ms, chunk scan 48 ms, upload 193 ms (39181 runs, 30367 of them in 235 dispatches)`. - Final draw/memory telemetry in log: `19099 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped)`; last memory sample `14925 MB committed by the process; video memory 6181 MB local, 4778 MB non-local; sparse pools 896 MB (838 MB mapped); video memory budget 7022 MB`. ### Limits of coverage - Fullest-heap tile packing (`reuse_tile_packs_fuller_heaps_so_nearly_empty_pools_retire`, 3/3) and the full `hle::d3d12x::sparse::` suite (`61/0/1`, 3/3, `early_commit_timing` remained `#[ignore]`) passed on RTX 4060. - The 60 s menu capture on `title: 29640639` stayed at `sparse pools 896 MB (838 MB mapped)` and confirms clean steady-state behavior on `nvidia-dev` without exercising multi-minute world streaming churn or measuring long-run sparse pool retirement counts; frame-count and peak-commit deltas vs. the cached `af2cecc4` baseline reflect normal single-run startup/worker variance and are not attributed to this PR. *AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).*
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-27 00:17 UTC · original

Tested: Clean 8cf249e55603a3e6dc4c34aa9e1b4fec5077d997, Windows 11 build 26200, Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, Rust 1.100.0 MSVC, debug. cargo test --locked -j 2 -p xcl --lib --no-run; ran exact hle::d3d12x::sparse::tests::a_tile_given_back_is_not_used_again_before_it_cooled and a_pool_goes_once_its_last_tile_cooled_with_nothing_parked with --test-threads=1 --nocapture in separate lock acquisitions. Both passed, 0 failures, ignores or skips. A default-device D3D12 probe confirmed the hardware A770 for each run. The fixtures exercised reuse after cooling and retirement of an empty pool on a later submit.

Not tested: Two-heap packing on Arc, physical VRAM savings, deferred heap destruction, full suite or retail smoke.

AI use: T3 Code / Codex (gpt-6.2-sol) ran and reran the checks and wrote this report.

**@⁠JJAutoCompare** on GitHub · 2026-11-27 00:17 UTC · [original](https://github.com/xcl-dev/xcl/pull/2898#issuecomment-7206338353) **Tested:** Clean `8cf249e55603a3e6dc4c34aa9e1b4fec5077d997`, Windows 11 build 26200, Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, Rust 1.100.0 MSVC, debug. `cargo test --locked -j 2 -p xcl --lib --no-run`; ran exact `hle::d3d12x::sparse::tests::a_tile_given_back_is_not_used_again_before_it_cooled` and `a_pool_goes_once_its_last_tile_cooled_with_nothing_parked` with `--test-threads=1 --nocapture` in separate lock acquisitions. Both passed, 0 failures, ignores or skips. A default-device D3D12 probe confirmed the hardware A770 for each run. The fixtures exercised reuse after cooling and retirement of an empty pool on a later submit. **Not tested:** Two-heap packing on Arc, physical VRAM savings, deferred heap destruction, full suite or retail smoke. **AI use:** T3 Code / Codex (`gpt-6.2-sol`) ran and reran the checks and wrote this report.
Author
Owner

@⁠LocranKing on GitHub · 2026-11-27 04:49 UTC · original

Independent 180 s paired check on NVIDIA GeForce RTX 3060 Ti (8 GB) (8cf249e5 merged with nvidia-dev ecc0bb57, Series S / lockhart profile, identical warm cache snapshot).

Setup

  • Machine: Windows 11 Home build 26300, AMD Ryzen 5 5500 (6C/12T), 31.8 GB RAM, RTX 3060 Ti (8 GB, driver 621.40, nvprofile shader heap 2048 MB), DXC 1.9.2602.17.
  • Env: XCL_DEVICE_TYPE=lockhart XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_TEXTURE_LEVEL_PAGES=1 XCL_PSO_WAIT_MS=50 XCL_GFX_PSO_WAIT_MS=200 XCL_CS_PSO_WAIT_MS=50 XCL_PREPARE_GRAPHICS=0 XCL_DRED=1 + XCL_PRESS_AT (18:A..74:A).

Results (180 s paired runs)

tree frames (PresentX) peak commit local / non-local VRAM peak sparse pools (end)
nvidia-dev (ecc0bb57) 1,825 27,125 MB 9,773 / 4,914 MB 2,624 MB (2,543 MB mapped)
PR #2898 (8cf249e5 + ecc0bb57) 1,892 (+3.7 %) 25,380 MB (-1,745 MB) 9,064 / 4,631 MB (-709 MB local) 2,560 MB (2,468 MB mapped)
xcl-smoke v1
commit: ecc0bb57976b1bc94854199ddf4f915fd00e0a59
gpu: NVIDIA GeForce RTX 3060 Ti
title: 9cc6a39e
seconds: 180
exit: 0x0
frames shown: 1825 (PresentX 1825)
presents per 2 s (last 3): 1 1 1
device removals: 0
crashes: 0
peak commit: 27125 MB
xcl-smoke v1
commit: 8cf249e55603a3e6dc4c34aa9e1b4fec5077d997
gpu: NVIDIA GeForce RTX 3060 Ti
title: 9cc6a39e
seconds: 180
exit: 0x0
frames shown: 1892 (PresentX 1893)
presents per 2 s (last 3): 1 1 2
device removals: 0
crashes: 0
peak commit: 25380 MB

Not tested: longer runs past 180 s, Series X (anaconda) profile, AMD GPUs.

**@⁠LocranKing** on GitHub · 2026-11-27 04:49 UTC · [original](https://github.com/xcl-dev/xcl/pull/2898#issuecomment-7210122278) Independent 180 s paired check on **NVIDIA GeForce RTX 3060 Ti (8 GB)** (`8cf249e5` merged with `nvidia-dev` `ecc0bb57`, Series S / `lockhart` profile, identical warm cache snapshot). **Setup** - **Machine:** Windows 11 Home build 26300, AMD Ryzen 5 5500 (6C/12T), 31.8 GB RAM, RTX 3060 Ti (8 GB, driver `621.40`, `nvprofile` shader heap 2048 MB), DXC `1.9.2602.17`. - **Env:** `XCL_DEVICE_TYPE=lockhart XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_TEXTURE_LEVEL_PAGES=1 XCL_PSO_WAIT_MS=50 XCL_GFX_PSO_WAIT_MS=200 XCL_CS_PSO_WAIT_MS=50 XCL_PREPARE_GRAPHICS=0 XCL_DRED=1` + `XCL_PRESS_AT` (`18:A..74:A`). **Results (180 s paired runs)** | tree | frames (`PresentX`) | peak commit | local / non-local VRAM peak | sparse pools (end) | |---|---:|---:|---:|---:| | `nvidia-dev` (`ecc0bb57`) | 1,825 | 27,125 MB | 9,773 / 4,914 MB | 2,624 MB (2,543 MB mapped) | | **PR `#2898`** (`8cf249e5` + `ecc0bb57`) | **1,892** (+3.7 %) | **25,380 MB** (-1,745 MB) | **9,064** / 4,631 MB (-709 MB local) | **2,560 MB** (2,468 MB mapped) | ```text xcl-smoke v1 commit: ecc0bb57976b1bc94854199ddf4f915fd00e0a59 gpu: NVIDIA GeForce RTX 3060 Ti title: 9cc6a39e seconds: 180 exit: 0x0 frames shown: 1825 (PresentX 1825) presents per 2 s (last 3): 1 1 1 device removals: 0 crashes: 0 peak commit: 27125 MB ``` ```text xcl-smoke v1 commit: 8cf249e55603a3e6dc4c34aa9e1b4fec5077d997 gpu: NVIDIA GeForce RTX 3060 Ti title: 9cc6a39e seconds: 180 exit: 0x0 frames shown: 1892 (PresentX 1893) presents per 2 s (last 3): 1 1 2 device removals: 0 crashes: 0 peak commit: 25380 MB ``` **Not tested:** longer runs past 180 s, Series X (`anaconda`) profile, AMD GPUs.
Author
Owner

@⁠luckyteagirl on GitHub · 2026-11-27 05:49 UTC · original · reviewed

pop_packed ranks heaps by tiles available for immediate reuse. That makes a draining heap look full while most of its freed tiles are still cooling. In a CPU-only harness using the exact reuse_tile and free_heaps code, heap 0 had one reusable tile and 1,023 cooling tiles, while heap 1 had two reusable tiles and 1,022 live tiles. The allocation chose heap 0 and left neither heap eligible for retirement after cooling. Taking an available tile from heap 1 would have let heap 0 retire at that point. Could the ranking account for cooling tiles when estimating occupancy while still handing out only reusable tiles? The existing packing test cools both heaps before allocation and would benefit from a case with different cooling ages. Heap ranking · Cooling and retirement

AI use: OpenAI Codex (GPT-6.2 Sol) reviewed the source, ran the CPU-only fixture, and drafted this comment. No GPU or title was used.

**@⁠luckyteagirl** on GitHub · 2026-11-27 05:49 UTC · [original](https://github.com/xcl-dev/xcl/pull/2898#pullrequestreview-6084013633) · **reviewed** `pop_packed` ranks heaps by tiles available for immediate reuse. That makes a draining heap look full while most of its freed tiles are still cooling. In a CPU-only harness using the exact `reuse_tile` and `free_heaps` code, heap 0 had one reusable tile and 1,023 cooling tiles, while heap 1 had two reusable tiles and 1,022 live tiles. The allocation chose heap 0 and left neither heap eligible for retirement after cooling. Taking an available tile from heap 1 would have let heap 0 retire at that point. Could the ranking account for cooling tiles when estimating occupancy while still handing out only reusable tiles? The existing packing test cools both heaps before allocation and would benefit from a case with different cooling ages. [Heap ranking](https://github.com/xcl-dev/xcl/blob/8cf249e55603a3e6dc4c34aa9e1b4fec5077d997/crates/xcl/src/hle/d3d12x/sparse.rs#L373-L390) · [Cooling and retirement](https://github.com/xcl-dev/xcl/blob/8cf249e55603a3e6dc4c34aa9e1b4fec5077d997/crates/xcl/src/hle/d3d12x/sparse.rs#L420-L440) AI use: OpenAI Codex (GPT-6.2 Sol) reviewed the source, ran the CPU-only fixture, and drafted this comment. No GPU or title was used.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2898/head:github-bot/gh-2898'
git switch 'github-bot/gh-2898'

Merge

Merge the changes and update on Forgejo.
git switch 'nvidia-dev'
git merge --no-ff 'github-bot/gh-2898'
git switch 'github-bot/gh-2898'
git rebase 'nvidia-dev'
git switch 'nvidia-dev'
git merge --ff-only 'github-bot/gh-2898'
git switch 'github-bot/gh-2898'
git rebase 'nvidia-dev'
git switch 'nvidia-dev'
git merge --no-ff 'github-bot/gh-2898'
git switch 'nvidia-dev'
git merge --squash 'github-bot/gh-2898'
git switch 'nvidia-dev'
git merge --ff-only 'github-bot/gh-2898'
git switch 'nvidia-dev'
git merge 'github-bot/gh-2898'
git push origin 'nvidia-dev'
This discussion has been locked. Commenting is limited to contributors.
No description provided.