D3D12.X: detach retired segments and reclaim idle aside allocators #2707

Open
github-bot wants to merge 6 commits from github-bot/gh-2707 into main AGit
Owner

@⁠Saksukella on GitHub · 2026-11-26 07:51 UTC · original
Saksukella:fix/alloc-pool-retire-reclaim → main · +942 −61 · 5 files · 6 commits · open

What is in it

  • crates/xcl/src/hle/d3d12x/alloc_pool.rs:
    • Add retire_recording(list) to detach a retired split segment or superseded primary list from its old Backing.users while preserving Backing.marks and last_submit (so GPU completion fences and in_flight(list) remain fully enforced).
    • Track Backing.already_reset and reclaim idle free() put-aside backings on title_reset so their held UMA arena blocks and scratch buffers return promptly instead of remaining pinned until a future busy swap on that exact title allocator.
    • Release STATE before calling reset_pc_allocator / CreateCommandAllocator so COM callbacks during allocator reset or resource teardown (such as dropping a pooled prelude ID3D12CommandAllocator -> real::alloc_release -> alloc_pool::forget) cannot self-deadlock on STATE, and release pending UMA blocks per free backing on forget.
    • Guard against concurrent title_reset / reset_list races while STATE is unlocked: track Backing.resetting (Backing::free() requires !self.resetting) with a Condvar (RESET_DONE), reserve the backing in reset_list before invoking native Reset (rolling back on hr < 0), and wait cleanly if a backing is mid-reset.
    • Add unit tests retired_segment_releases_backing_after_gpu_completes_while_preserving_in_flight, clean_title_reset_reclaims_idle_aside_backings_once, stalled_primary_stand_in_reset_keeps_uma_blocks_until_native_backing_resets, reset_list_blocks_concurrent_title_reset_and_rolls_back_on_failure, and reset_list_waits_while_backing_is_resetting.
  • crates/xcl/src/hle/d3d12x/bind.rs & crates/xcl/src/hle/d3d12x/real.rs:
    • Key bind::State.allocator (and therefore console_list::PENDING UMA blocks) by the native PC allocator backing (alloc_pool::recording_backing / alloc_pool::current) rather than the logical title allocator, and move console_list::allocator_reset(raw) into real::reset_pc_allocator(raw) so swapping away from an in-flight primary backing never frees its UMA blocks while the GPU can still read them.
  • crates/xcl/src/hle/d3d12x/title_list.rs & crates/xcl/src/hle/d3d12x/list_x.rs:
    • Call alloc_pool::retire_recording when title_list::reset moves old split/stand-in segments into spares (and for primary when replaced by a stand_in, retiring its UMA blocks via bind::reset(primary, 0, 0)), in put_spare, and for KickoffX-reclaimed segments in list_x.rs after alloc_pool::executed marks them.

Tested

  • Hardware: AMD Radeon RX 9070 XT (driver 32.0.32029.2010), 24-thread x86_64 CPU, 32 GB RAM, Windows; rustc 1.100.0 (0ef1bc386 2026-11-09); debug (tests) and release (xcl.exe).
  • cargo test -p xcl --lib hle::d3d12x::alloc_pool::tests -- --test-threads=1: 9 passed, 0 failed (0.11s, including stalled_primary_stand_in_reset_keeps_uma_blocks_until_native_backing_resets, reset_list_blocks_concurrent_title_reset_and_rolls_back_on_failure, and reset_list_waits_while_backing_is_resetting).
  • cargo test -p xcl --lib hle::d3d12x::bind::tests -- --test-threads=1: 8 passed, 0 failed (0.38s).
  • cargo test -p xcl --lib hle::d3d12x::title_list::tests -- --test-threads=1: 3 passed, 0 failed (0.01s).
  • Also live-tested in 180s 3D workload on amd-dev (b5c0275f): previously coherent UMA exhausted 4095/4095 MB (547 blocks held for 236 allocators at 63.7k draws / 34.6k dispatches), triggering unified memory is full and 0x887a0006; with this fix held blocks dropped by >72% (152 blocks / 75 allocators, 4046/4095 MB at 65.5k draws / 47.0k dispatches) with 0 unified memory is full warnings.

Regression run

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: AMD Radeon RX 9070 XT
title: b8db18c2
seconds: 60
exit: 0x0
frames shown: 1624 (PresentX 1624)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 19700 MB
xcl-smoke v1
commit: 1a3b698195d70f8c7d36fdd87678e2ed4df7bc00
gpu: AMD Radeon RX 9070 XT
title: b8db18c2
seconds: 60
exit: 0x0
frames shown: 1669 (PresentX 1670)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16379 MB

Not tested

  • NVIDIA and Intel GPU adapters (tested on AMD Radeon RX 9070 XT only).
  • Full cargo test --workspace was run on the same base b49be183 in #2703 (1434 passed; pre-existing RDNA 4 fuzz_validate_and_gpu_1/3 failures).

AI use

  • Antigravity (Google Gemini): assisted with analyzing the coherent UMA allocator-block leak, keying pending UMA blocks by native allocator backing, adding the resetting/Condvar concurrency guard, writing unit tests, and running local tests and smoke verification. All diffs and measurements were reviewed and verified locally on hardware.
**@⁠Saksukella** on GitHub · 2026-11-26 07:51 UTC · [original](https://github.com/xcl-dev/xcl/pull/2707) `Saksukella:fix/alloc-pool-retire-reclaim` → `main` · +942 −61 · 5 files · 6 commits · open **What is in it** - `crates/xcl/src/hle/d3d12x/alloc_pool.rs`: - Add `retire_recording(list)` to detach a retired split segment or superseded primary list from its old `Backing.users` while preserving `Backing.marks` and `last_submit` (so GPU completion fences and `in_flight(list)` remain fully enforced). - Track `Backing.already_reset` and reclaim idle `free()` put-aside backings on `title_reset` so their held UMA arena blocks and scratch buffers return promptly instead of remaining pinned until a future busy swap on that exact title allocator. - Release `STATE` before calling `reset_pc_allocator` / `CreateCommandAllocator` so COM callbacks during allocator reset or resource teardown (such as dropping a pooled prelude `ID3D12CommandAllocator` -> `real::alloc_release` -> `alloc_pool::forget`) cannot self-deadlock on `STATE`, and release pending UMA blocks per free backing on `forget`. - Guard against concurrent `title_reset` / `reset_list` races while `STATE` is unlocked: track `Backing.resetting` (`Backing::free()` requires `!self.resetting`) with a `Condvar` (`RESET_DONE`), reserve the backing in `reset_list` before invoking native `Reset` (rolling back on `hr < 0`), and wait cleanly if a backing is mid-reset. - Add unit tests `retired_segment_releases_backing_after_gpu_completes_while_preserving_in_flight`, `clean_title_reset_reclaims_idle_aside_backings_once`, `stalled_primary_stand_in_reset_keeps_uma_blocks_until_native_backing_resets`, `reset_list_blocks_concurrent_title_reset_and_rolls_back_on_failure`, and `reset_list_waits_while_backing_is_resetting`. - `crates/xcl/src/hle/d3d12x/bind.rs` & `crates/xcl/src/hle/d3d12x/real.rs`: - Key `bind::State.allocator` (and therefore `console_list::PENDING` UMA blocks) by the native PC allocator backing (`alloc_pool::recording_backing` / `alloc_pool::current`) rather than the logical title allocator, and move `console_list::allocator_reset(raw)` into `real::reset_pc_allocator(raw)` so swapping away from an in-flight primary backing never frees its UMA blocks while the GPU can still read them. - `crates/xcl/src/hle/d3d12x/title_list.rs` & `crates/xcl/src/hle/d3d12x/list_x.rs`: - Call `alloc_pool::retire_recording` when `title_list::reset` moves old split/stand-in segments into `spares` (and for `primary` when replaced by a `stand_in`, retiring its UMA blocks via `bind::reset(primary, 0, 0)`), in `put_spare`, and for `KickoffX`-reclaimed segments in `list_x.rs` after `alloc_pool::executed` marks them. **Tested** - Hardware: AMD Radeon RX 9070 XT (driver `32.0.32029.2010`), 24-thread x86_64 CPU, 32 GB RAM, Windows; `rustc 1.100.0 (0ef1bc386 2026-11-09)`; debug (tests) and release (`xcl.exe`). - `cargo test -p xcl --lib hle::d3d12x::alloc_pool::tests -- --test-threads=1`: 9 passed, 0 failed (`0.11s`, including `stalled_primary_stand_in_reset_keeps_uma_blocks_until_native_backing_resets`, `reset_list_blocks_concurrent_title_reset_and_rolls_back_on_failure`, and `reset_list_waits_while_backing_is_resetting`). - `cargo test -p xcl --lib hle::d3d12x::bind::tests -- --test-threads=1`: 8 passed, 0 failed (`0.38s`). - `cargo test -p xcl --lib hle::d3d12x::title_list::tests -- --test-threads=1`: 3 passed, 0 failed (`0.01s`). - Also live-tested in 180s 3D workload on `amd-dev` (`b5c0275f`): previously `coherent` UMA exhausted `4095/4095 MB` (`547 blocks held for 236 allocators` at `63.7k draws / 34.6k dispatches`), triggering `unified memory is full` and `0x887a0006`; with this fix held blocks dropped by >72% (`152 blocks / 75 allocators`, `4046/4095 MB` at `65.5k draws / 47.0k dispatches`) with `0` `unified memory is full` warnings. **Regression run** ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: AMD Radeon RX 9070 XT title: b8db18c2 seconds: 60 exit: 0x0 frames shown: 1624 (PresentX 1624) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 19700 MB ``` ``` xcl-smoke v1 commit: 1a3b698195d70f8c7d36fdd87678e2ed4df7bc00 gpu: AMD Radeon RX 9070 XT title: b8db18c2 seconds: 60 exit: 0x0 frames shown: 1669 (PresentX 1670) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16379 MB ``` **Not tested** - NVIDIA and Intel GPU adapters (tested on AMD Radeon RX 9070 XT only). - Full `cargo test --workspace` was run on the same base `b49be183` in #2703 (`1434` passed; pre-existing RDNA 4 `fuzz_validate_and_gpu_1/3` failures). **AI use** - Antigravity (Google Gemini): assisted with analyzing the coherent UMA allocator-block leak, keying pending UMA blocks by native allocator backing, adding the `resetting`/`Condvar` concurrency guard, writing unit tests, and running local tests and smoke verification. All diffs and measurements were reviewed and verified locally on hardware.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 07:52:39 +00:00
Author
Owner

@⁠fromthemoonx on GitHub · 2026-11-26 08:14 UTC · original · edited 2026-11-26 12:08 UTC

Rerun on the new head 1a3b698 (the two lifetime fixes from thehollowedone's review): passes on NVIDIA, and each of the 3 new alloc_pool tests fails when the fix it guards is put back.

result
cargo test --workspace --no-fail-fast -- --test-threads=4, 1a3b698 (its base is current main b49be18, so this is also the merged tree) 1443 passed, 0 failed, 47 ignored; 25 SKIPPED lines
reset_list_preserves_previous_backing_until_native_success, forget_does_not_release_a_busy_original_backing_twice_and_reclaims_when_idle, forget_racing_mid_reset_list_cleans_up_on_rollback_and_commit, alone, 40 runs each 40 of 40 each
hle::d3d12x::alloc_pool:: (12 tests), --test-threads=8, 40 runs 40 of 40
scratch: try_reserve_backing back to move_list(s, list, backing) (old backing detached before Reset succeeds), each new test alone reset_list_preserves_… fails (s.backings[&old].users.contains(&list)), forget_racing_… fails; forget_does_not_… passes
scratch: forget drops a busy backing instead of pushing it to orphaned (the old behaviour), each new test alone forget_does_not_… fails (s.orphaned.iter().any(…)), forget_racing_… fails (committed forgotten backing must not recreate a zombie backing); reset_list_preserves_… passes
e2e test_title_draws_with_a_root_signature_under_the_debug_layer the same messages as main: 3× error id 93, 1× error id 1046, 1× warning id 820, 8× id 0 at exit

With both mutations, running the whole alloc_pool:: module fails 6 to 9 of its 12 tests, because one failure poisons the shared state for the rest; alone, only the tests above fail. Same RTX 3060 (driver 610.88), Rust 1.100.0, debug. Not tested: a title, AMD / Intel.

AI use: Claude Code (Claude Opus 5.5) ran the tests and mutations and wrote this rerun.


Rerun on dff6edc: still passed on NVIDIA.

result
cargo test --workspace --no-fail-fast -- --test-threads=4, dff6edc merged onto main b49be18 (clean) 1440 passed, 0 failed, 47 ignored; 25 SKIPPED lines
alloc_pool:: + title_list:: + bind:: + console_list:: + real::dispatch_chain:: (29 tests), --test-threads=8, 30 runs 30 of 30
hle::d3d12x::list_x::tests::, --test-threads=4, 100 runs 7 failed runs: a_dispatch_with_a_pipeline_still_building_waits_at_the_submit 7×, rotating_queue_… 1×, the two main flakes

Rerun on f796b9e: still passed on NVIDIA, and the new test was stable.

result
cargo test --workspace --no-fail-fast -- --test-threads=4, f796b9e merged onto main b49be18 (clean) 1438 passed, 0 failed, 47 ignored; 25 SKIPPED lines
the 3 new tests (now with stalled_primary_stand_in_reset_keeps_uma_blocks_until_native_backing_resets), alone, 40 runs each 40 of 40 each
alloc_pool:: + title_list:: + bind:: + console_list:: + real::dispatch_chain:: (27 tests), --test-threads=8, 30 runs 30 of 30
hle::d3d12x::list_x::tests::, --test-threads=4, 100 runs 6 failed runs, all a_dispatch_with_a_pipeline_still_building_waits_at_the_submit, the main flake
e2e debug-layer test the same messages as main (3× id 93, 1× id 1046, 1× warning id 820, 8× id 0)

First run, on 7879954: NVIDIA run: passed; both new tests stable, list_x no different from main in parallel, debug-layer messages as on main.

Tested: 7879954 merged onto main b49be18 (clean). RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, debug, Graphics Tools (D3D12 debug layer) installed.

result
cargo test --workspace --no-fail-fast -- --test-threads=4 1437 passed, 0 failed, 47 ignored; 25 SKIPPED lines
retired_segment_releases_backing_after_gpu_completes_while_preserving_in_flight, clean_title_reset_reclaims_idle_aside_backings_once, alone, 40 runs each 40 of 40 each
hle::d3d12x::alloc_pool:: + title_list:: + real::dispatch_chain:: (11 tests), --test-threads=8, 30 runs 30 of 30
hle::d3d12x::list_x::tests::, --test-threads=4, 100 runs 7 failed runs, only in a_dispatch_with_a_pipeline_still_building_waits_at_the_submit (7×) and rotating_queue_self_deadlock_… (3×), the two that flake on main the same way (#2118, #2547)
e2e test_title_draws_with_a_root_signature_under_the_debug_layer, merged vs main the same: 3× error id 93, 1× error id 1046, 1× warning id 820, 8× id 0 at exit

Not tested: a title run, Intel, a release build.

AI use: Claude Code (Claude Opus 5.5) ran the suite, the repeats and the debug-layer comparison, and wrote this report.

**@⁠fromthemoonx** on GitHub · 2026-11-26 08:14 UTC · [original](https://github.com/xcl-dev/xcl/pull/2707#issuecomment-7186365972) · edited 2026-11-26 12:08 UTC **Rerun on the new head `1a3b698` (the two lifetime fixes from thehollowedone's review): passes on NVIDIA, and each of the 3 new `alloc_pool` tests fails when the fix it guards is put back.** | | result | |---|---| | `cargo test --workspace --no-fail-fast -- --test-threads=4`, `1a3b698` (its base is current `main` `b49be18`, so this is also the merged tree) | 1443 passed, 0 failed, 47 ignored; 25 `SKIPPED` lines | | `reset_list_preserves_previous_backing_until_native_success`, `forget_does_not_release_a_busy_original_backing_twice_and_reclaims_when_idle`, `forget_racing_mid_reset_list_cleans_up_on_rollback_and_commit`, alone, 40 runs each | 40 of 40 each | | `hle::d3d12x::alloc_pool::` (12 tests), `--test-threads=8`, 40 runs | 40 of 40 | | scratch: `try_reserve_backing` back to `move_list(s, list, backing)` (old backing detached before Reset succeeds), each new test alone | `reset_list_preserves_…` fails (`s.backings[&old].users.contains(&list)`), `forget_racing_…` fails; `forget_does_not_…` passes | | scratch: `forget` drops a busy backing instead of pushing it to `orphaned` (the old behaviour), each new test alone | `forget_does_not_…` fails (`s.orphaned.iter().any(…)`), `forget_racing_…` fails (`committed forgotten backing must not recreate a zombie backing`); `reset_list_preserves_…` passes | | `e2e` `test_title_draws_with_a_root_signature_under_the_debug_layer` | the same messages as `main`: 3× error id 93, 1× error id 1046, 1× warning id 820, 8× id 0 at exit | With both mutations, running the whole `alloc_pool::` module fails 6 to 9 of its 12 tests, because one failure poisons the shared state for the rest; alone, only the tests above fail. Same RTX 3060 (driver 610.88), Rust 1.100.0, debug. Not tested: a title, AMD / Intel. AI use: Claude Code (Claude Opus 5.5) ran the tests and mutations and wrote this rerun. --- *Rerun on `dff6edc`:* still passed on NVIDIA. | | result | |---|---| | `cargo test --workspace --no-fail-fast -- --test-threads=4`, `dff6edc` merged onto `main` `b49be18` (clean) | 1440 passed, 0 failed, 47 ignored; 25 `SKIPPED` lines | | `alloc_pool::` + `title_list::` + `bind::` + `console_list::` + `real::dispatch_chain::` (29 tests), `--test-threads=8`, 30 runs | 30 of 30 | | `hle::d3d12x::list_x::tests::`, `--test-threads=4`, 100 runs | 7 failed runs: `a_dispatch_with_a_pipeline_still_building_waits_at_the_submit` 7×, `rotating_queue_…` 1×, the two `main` flakes | --- *Rerun on `f796b9e`:* still passed on NVIDIA, and the new test was stable. | | result | |---|---| | `cargo test --workspace --no-fail-fast -- --test-threads=4`, `f796b9e` merged onto `main` `b49be18` (clean) | 1438 passed, 0 failed, 47 ignored; 25 `SKIPPED` lines | | the 3 new tests (now with `stalled_primary_stand_in_reset_keeps_uma_blocks_until_native_backing_resets`), alone, 40 runs each | 40 of 40 each | | `alloc_pool::` + `title_list::` + `bind::` + `console_list::` + `real::dispatch_chain::` (27 tests), `--test-threads=8`, 30 runs | 30 of 30 | | `hle::d3d12x::list_x::tests::`, `--test-threads=4`, 100 runs | 6 failed runs, all `a_dispatch_with_a_pipeline_still_building_waits_at_the_submit`, the `main` flake | | `e2e` debug-layer test | the same messages as `main` (3× id 93, 1× id 1046, 1× warning id 820, 8× id 0) | --- *First run, on `7879954`:* NVIDIA run: passed; both new tests stable, `list_x` no different from `main` in parallel, debug-layer messages as on `main`. **Tested:** `7879954` merged onto `main` `b49be18` (clean). RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, debug, Graphics Tools (D3D12 debug layer) installed. | | result | |---|---| | `cargo test --workspace --no-fail-fast -- --test-threads=4` | 1437 passed, 0 failed, 47 ignored; 25 `SKIPPED` lines | | `retired_segment_releases_backing_after_gpu_completes_while_preserving_in_flight`, `clean_title_reset_reclaims_idle_aside_backings_once`, alone, 40 runs each | 40 of 40 each | | `hle::d3d12x::alloc_pool::` + `title_list::` + `real::dispatch_chain::` (11 tests), `--test-threads=8`, 30 runs | 30 of 30 | | `hle::d3d12x::list_x::tests::`, `--test-threads=4`, 100 runs | 7 failed runs, only in `a_dispatch_with_a_pipeline_still_building_waits_at_the_submit` (7×) and `rotating_queue_self_deadlock_…` (3×), the two that flake on `main` the same way (#2118, #2547) | | `e2e` `test_title_draws_with_a_root_signature_under_the_debug_layer`, merged vs `main` | the same: 3× error id 93, 1× error id 1046, 1× warning id 820, 8× id 0 at exit | **Not tested:** a title run, Intel, a release build. **AI use:** Claude Code (Claude Opus 5.5) ran the suite, the repeats and the debug-layer comparison, and wrote this report.
Author
Owner

@⁠luckyteagirl on GitHub · 2026-11-26 08:18 UTC · original · reviewed

At head 7879954925faaa048293f28857febf9eb8aa503b, the new bind::reset(primary, 0, 0) runs precisely when title_list::reset selects a stand-in because the primary PC list is still in flight (title_list.rs:157-201). bind::reset moves that primary recording's UMA blocks to console_list::PENDING under its old logical title allocator (bind.rs:75-87). A subsequent successful title-allocator Reset can swap to a different native backing while the old primary is still in flight, but real::alloc_reset unconditionally calls console_list::allocator_reset(this) on success (real.rs:7047-7057), which frees all pending blocks under that logical allocator. The GPU can therefore still read blocks freed by the new stand-in path. Before this PR, the stand-in branch did not transfer the primary's bind blocks at that point. Could those blocks stay owned by the old primary/native backing until its fence completes, with the pending-key/reset path tracking that backing rather than the logical allocator? A regression with a GPU-stalled primary, stand-in list reset, and title-allocator reset would distinguish the two lifetimes.

This is an exact-head source review; I did not run a GPU-stalled title reproduction. AI use: OpenAI Codex (GPT-6.2 Sol) traced the interleaving; I checked the bind, pool, and allocator-reset paths before posting.

**@⁠luckyteagirl** on GitHub · 2026-11-26 08:18 UTC · [original](https://github.com/xcl-dev/xcl/pull/2707#pullrequestreview-6070577990) · **reviewed** At head `7879954925faaa048293f28857febf9eb8aa503b`, the new `bind::reset(primary, 0, 0)` runs precisely when `title_list::reset` selects a stand-in because the primary PC list is still in flight (`title_list.rs:157-201`). `bind::reset` moves that primary recording's UMA blocks to `console_list::PENDING` under its old logical title allocator (`bind.rs:75-87`). A subsequent successful title-allocator `Reset` can swap to a different native backing while the old primary is still in flight, but `real::alloc_reset` unconditionally calls `console_list::allocator_reset(this)` on success (`real.rs:7047-7057`), which frees all pending blocks under that logical allocator. The GPU can therefore still read blocks freed by the new stand-in path. Before this PR, the stand-in branch did not transfer the primary's bind blocks at that point. Could those blocks stay owned by the old primary/native backing until its fence completes, with the pending-key/reset path tracking that backing rather than the logical allocator? A regression with a GPU-stalled primary, stand-in list reset, and title-allocator reset would distinguish the two lifetimes. This is an exact-head source review; I did not run a GPU-stalled title reproduction. AI use: OpenAI Codex (GPT-6.2 Sol) traced the interleaving; I checked the bind, pool, and allocator-reset paths before posting.
Author
Owner

@⁠sage-sage on GitHub · 2026-11-26 08:48 UTC · original

Test report: passes on NVIDIA. Exact head 78799549 (its base is current main b49be18, so head = merged).

Tested

  • RTX 4080 SUPER (driver 621.40), Ryzen 5 7600X, Windows 11 26H2 build 26300.10075, rustc 1.100.0 MSVC, DXC 1.9.2602.17 (Windows SDK 10.0.26100), debug build
  • cargo test --workspace -- --test-threads=4: 1437 passed, 0 failed, 47 ignored; the 2 new tests pass
  • SKIPPED: 29 lines, the same as on main on this machine (wave64, debug layer, Developer Mode, heap windows)

Not tested

  • No game, so not split segments and allocator reuse on a title.

Claude Code (Claude Opus 5.5) ran the tests and wrote this report.

**@⁠sage-sage** on GitHub · 2026-11-26 08:48 UTC · [original](https://github.com/xcl-dev/xcl/pull/2707#issuecomment-7187050769) **Test report: passes on NVIDIA.** Exact head `78799549` (its base is current `main` `b49be18`, so head = merged). **Tested** - RTX 4080 SUPER (driver 621.40), Ryzen 5 7600X, Windows 11 26H2 build 26300.10075, rustc 1.100.0 MSVC, DXC 1.9.2602.17 (Windows SDK 10.0.26100), debug build - `cargo test --workspace -- --test-threads=4`: 1437 passed, 0 failed, 47 ignored; the 2 new tests pass - SKIPPED: 29 lines, the same as on `main` on this machine (wave64, debug layer, Developer Mode, heap windows) **Not tested** - No game, so not split segments and allocator reuse on a title. Claude Code (Claude Opus 5.5) ran the tests and wrote this report.
Author
Owner

@⁠Saksukella on GitHub · 2026-11-26 08:55 UTC · original

Good catch @⁠luckyteagirl — fixed in f796b9e6. bind::State.allocator (and thus console_list::PENDING) is now keyed by the native PC allocator backing (alloc_pool::recording_backing / alloc_pool::current) rather than the logical title allocator, and console_list::allocator_reset now runs inside real::reset_pc_allocator (and for free backings in alloc_pool::forget) rather than unconditionally on alloc_reset(this). Added the regression test stalled_primary_stand_in_reset_keeps_uma_blocks_until_native_backing_resets covering a GPU-stalled primary, stand-in reset, title-allocator swap reset, and post-fence reclaim. Re-ran alloc_pool (7/7), bind (8/8), title_list (3/3), and a 60s RX 9070 XT smoke run (1669 frames, 0 removals, 0 crashes).

**@⁠Saksukella** on GitHub · 2026-11-26 08:55 UTC · [original](https://github.com/xcl-dev/xcl/pull/2707#issuecomment-7187190797) Good catch @⁠luckyteagirl — fixed in `f796b9e6`. `bind::State.allocator` (and thus `console_list::PENDING`) is now keyed by the native PC allocator backing (`alloc_pool::recording_backing` / `alloc_pool::current`) rather than the logical title allocator, and `console_list::allocator_reset` now runs inside `real::reset_pc_allocator` (and for free backings in `alloc_pool::forget`) rather than unconditionally on `alloc_reset(this)`. Added the regression test `stalled_primary_stand_in_reset_keeps_uma_blocks_until_native_backing_resets` covering a GPU-stalled primary, stand-in reset, title-allocator swap reset, and post-fence reclaim. Re-ran `alloc_pool` (7/7), `bind` (8/8), `title_list` (3/3), and a 60s RX 9070 XT smoke run (1669 frames, 0 removals, 0 crashes).
Author
Owner

@⁠Kalmarv on GitHub · 2026-11-26 09:25 UTC · original

A gap in retire_recording's call sites, found while reading this PR next to #2404 (a code read, not a run). At 068671d:

  • A list split mid-recording that the title submits with KickoffX goes through title_list::reclaim_for_kickoff (list_x.rs:3330). That moves the reclaimed segments, the active one included, into the wrapper's spares (title_list.rs:344) without retire_recording.
  • They are submitted just after: prior in the loop that follows, and the active segment at alloc_pool::executed(q_raw, &one) (list_x.rs:3355). After that they stay in their old backing's users, the way the Reset path's segments did before this PR. So that PC allocator stays "aside with a list on it" until the spare is reset elsewhere.
  • Here the detach has to come after executed() marks them. Detached before it, the submit would leave their backing unmarked, and the backing could be reset while the GPU runs it.

Suggested fix: call super::alloc_pool::retire_recording(seg); in the for seg in reclaimed loop at list_x.rs:3377-3380 (next to bind::reset and clear_segment_state), which runs after line 3355.

AI use: Claude Code with Claude Opus 5.5 read the code and wrote this note.

**@⁠Kalmarv** on GitHub · 2026-11-26 09:25 UTC · [original](https://github.com/xcl-dev/xcl/pull/2707#issuecomment-7187959801) A gap in `retire_recording`'s call sites, found while reading this PR next to #2404 (a code read, not a run). At `068671d`: - A list split mid-recording that the title submits with KickoffX goes through `title_list::reclaim_for_kickoff` (`list_x.rs:3330`). That moves the reclaimed segments, the active one included, into the wrapper's `spares` (`title_list.rs:344`) without `retire_recording`. - They are submitted just after: `prior` in the loop that follows, and the active segment at `alloc_pool::executed(q_raw, &one)` (`list_x.rs:3355`). After that they stay in their old backing's `users`, the way the Reset path's segments did before this PR. So that PC allocator stays "aside with a list on it" until the spare is reset elsewhere. - Here the detach has to come after `executed()` marks them. Detached before it, the submit would leave their backing unmarked, and the backing could be reset while the GPU runs it. Suggested fix: call `super::alloc_pool::retire_recording(seg);` in the `for seg in reclaimed` loop at `list_x.rs:3377-3380` (next to `bind::reset` and `clear_segment_state`), which runs after line 3355. AI use: Claude Code with Claude Opus 5.5 read the code and wrote this note.
Author
Owner

@⁠Saksukella on GitHub · 2026-11-26 09:39 UTC · original

Good catch @⁠Kalmarv — added super::alloc_pool::retire_recording(seg); in the KickoffX reclaimed-segments loop at list_x.rs (after alloc_pool::executed marks them) in dff6edc7 (along with dropping an orphaned ResetCurrent backing if forget raced). Re-ran alloc_pool::tests (9/9) and 60s RX 9070 XT smoke (1669 frames, 0 removals, 0 crashes).

**@⁠Saksukella** on GitHub · 2026-11-26 09:39 UTC · [original](https://github.com/xcl-dev/xcl/pull/2707#issuecomment-7188279628) Good catch @⁠Kalmarv — added `super::alloc_pool::retire_recording(seg);` in the `KickoffX` reclaimed-segments loop at `list_x.rs` (after `alloc_pool::executed` marks them) in `dff6edc7` (along with dropping an orphaned `ResetCurrent` backing if `forget` raced). Re-ran `alloc_pool::tests` (9/9) and 60s RX 9070 XT smoke (1669 frames, 0 removals, 0 crashes).
Author
Owner

@⁠thehollowedone on GitHub · 2026-11-26 09:46 UTC · original

Exact-head allocator lifetime check on dff6edc7 (including the new KickoffX change). I found two paths the current nine allocator tests do not cover. Both fail with the test-only witnesses below; the existing nine pass.

  1. The previous backing can be reset while a list's native Reset is still pending. try_reserve_backing moves a list from old backing A to current backing B before calling native Reset(B). If a concurrent title allocator reset reclaims the now apparently free A, and Reset(B) fails, rollback_backing restores the list→A mapping after A's commands have been discarded. The witness starts with a closed recording on A, resets toward B, reclaims A inside the reset callback, returns E_FAIL, and observes A was reset. The existing rollback test starts with no previous recording. Reservation · Reset/rollback. Microsoft says an allocator reset reuses the memory behind recorded commands and must wait for GPU work on that allocator: allocator Reset contract.
  2. Final release can discard pending UMA ownership for a busy original backing. After A is put aside for B, forget(A) visits [A, B, A]. The first A visit removes its busy Backing; the second sees no record, treats A as free, and calls console_list::allocator_reset(A). The witness leaves A held by a live recording and confirms its pending UMA entry has disappeared. With actual UMA blocks, that reset path calls free_uma. Release loop · UMA release.

For the first path, reserve B while keeping A's existing user until native Reset succeeds; then move the association. On failure, release only the temporary B reservation. For the second, deduplicate backing IDs before inspecting/removing them. Deduplication alone prevents the early drain but does not solve eventual cleanup: a busy backing's pending UMA and fence/list ownership must survive final title-allocator release until safe reclamation, including allocator-address reuse.

Tested: Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti / 621.35, rustc 1.99.1 MSVC, debug. On this head with only the two test functions added:

  • cargo test --offline --locked -p xcl --lib reset_list_preserves_previous_backing_until_native_success -- --nocapture --test-threads=1: 0 passed, 1 failed; previous A was reset before the native callback returned.
  • cargo test --offline --locked -p xcl --lib forget_does_not_release_a_busy_original_backing_twice -- --nocapture --test-threads=1: 0 passed, 1 failed; pending entry was empty.
  • Existing hle::d3d12x::alloc_pool::tests with those two names skipped: 9 passed, 0 failed.
Test-only diff against dff6edc7
diff --git a/crates/xcl/src/hle/d3d12x/alloc_pool.rs b/crates/xcl/src/hle/d3d12x/alloc_pool.rs
index df8a39e..f558306 100644
--- a/crates/xcl/src/hle/d3d12x/alloc_pool.rs
+++ b/crates/xcl/src/hle/d3d12x/alloc_pool.rs
@@ -1092,6 +1092,66 @@ mod tests {
         unsafe { forget(alloc) };
     }
 
+    #[test]
+    fn reset_list_preserves_previous_backing_until_native_success() {
+        let mut ids = Box::new([0u8; 5]);
+        let base = ids.as_mut_ptr() as usize;
+        let (alloc, old, current, spare, list) = (base, base + 1, base + 2, base + 3, base + 4);
+        {
+            let mut g = STATE.lock().unwrap();
+            let s = g.get_or_insert_with(State::default);
+            s.types.insert(alloc, D3D12_COMMAND_LIST_TYPE_DIRECT.0);
+            s.cur.insert(alloc, current);
+            s.aside.insert(alloc, vec![old, spare]);
+            s.backings.insert(spare, Backing { already_reset: true, ..Backing::default() });
+            move_list(s, list, old);
+        }
+
+        let mut native_resets = Vec::new();
+        let hr = reset_list(list, alloc, D3D12_COMMAND_LIST_TYPE_DIRECT.0, |backing| {
+            assert_eq!(backing, current);
+            let mut g = STATE.lock().unwrap();
+            let s = g.as_mut().unwrap();
+            assert_eq!(
+                unsafe { title_reset_in(s, alloc as *mut c_void, |raw| {
+                    native_resets.push(raw as usize);
+                    0
+                }) },
+                Some(0)
+            );
+            crate::util::E_FAIL
+        });
+
+        assert_eq!(hr, crate::util::E_FAIL);
+        assert_eq!(recording_backing(list), Some(old));
+        assert!(!native_resets.contains(&old), "the previous recording was reset before native Reset succeeded");
+    }
+
+    #[test]
+    fn forget_does_not_release_a_busy_original_backing_twice() {
+        let mut ids = Box::new([0u8; 3]);
+        let base = ids.as_mut_ptr() as usize;
+        let (alloc, next, list) = (base, base + 1, base + 2);
+        {
+            let mut g = STATE.lock().unwrap();
+            let s = g.get_or_insert_with(State::default);
+            s.types.insert(alloc, D3D12_COMMAND_LIST_TYPE_DIRECT.0);
+            s.aside.insert(alloc, vec![alloc]);
+            s.cur.insert(alloc, next);
+            move_list(s, list, alloc);
+            s.backings.entry(next).or_default().users.insert(list + 1);
+        }
+        super::super::console_list::hold_until_reset(alloc, vec![0x1111]);
+
+        unsafe { forget(alloc) };
+
+        assert_eq!(
+            super::super::console_list::take_pending_for_test(alloc),
+            vec![0x1111],
+            "a live old recording must keep its pending UMA blocks"
+        );
+    }
+
     #[test]
     fn reset_list_waits_while_backing_is_resetting() {
         let mut ids = Box::new([0u8; 2]);

These are synthetic state tests; they do not reproduce a retail crash or measure GPU memory pressure. I did not run the full workspace suite or paired smoke on this head. No game files or diagnostics were used.

AI use: Codex (GPT-6.2 Sol) inspected the paths, added and ran the witnesses, and drafted this comment; Codex (GPT-6.2 Astra) independently reviewed the allocator lifetimes.

**@⁠thehollowedone** on GitHub · 2026-11-26 09:46 UTC · [original](https://github.com/xcl-dev/xcl/pull/2707#issuecomment-7188447563) Exact-head allocator lifetime check on [`dff6edc7`](https://github.com/xcl-dev/xcl/commit/dff6edc7e64c818a29fe20946911b8c0e5578387) (including the new KickoffX change). I found two paths the current nine allocator tests do not cover. Both fail with the test-only witnesses below; the existing nine pass. 1. **The previous backing can be reset while a list's native Reset is still pending.** `try_reserve_backing` moves a list from old backing A to current backing B *before* calling native `Reset(B)`. If a concurrent title allocator reset reclaims the now apparently free A, and `Reset(B)` fails, `rollback_backing` restores the list→A mapping after A's commands have been discarded. The witness starts with a closed recording on A, resets toward B, reclaims A inside the reset callback, returns `E_FAIL`, and observes A was reset. The existing rollback test starts with no previous recording. [Reservation](https://github.com/xcl-dev/xcl/blob/dff6edc7e64c818a29fe20946911b8c0e5578387/crates/xcl/src/hle/d3d12x/alloc_pool.rs#L123-L145) · [Reset/rollback](https://github.com/xcl-dev/xcl/blob/dff6edc7e64c818a29fe20946911b8c0e5578387/crates/xcl/src/hle/d3d12x/alloc_pool.rs#L155-L183). Microsoft says an allocator reset reuses the memory behind recorded commands and must wait for GPU work on that allocator: [allocator Reset contract](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12commandallocator-reset). 2. **Final release can discard pending UMA ownership for a busy original backing.** After A is put aside for B, `forget(A)` visits `[A, B, A]`. The first A visit removes its busy `Backing`; the second sees no record, treats A as free, and calls `console_list::allocator_reset(A)`. The witness leaves A held by a live recording and confirms its pending UMA entry has disappeared. With actual UMA blocks, that reset path calls `free_uma`. [Release loop](https://github.com/xcl-dev/xcl/blob/dff6edc7e64c818a29fe20946911b8c0e5578387/crates/xcl/src/hle/d3d12x/alloc_pool.rs#L312-L335) · [UMA release](https://github.com/xcl-dev/xcl/blob/dff6edc7e64c818a29fe20946911b8c0e5578387/crates/xcl/src/hle/d3d12x/console_list.rs#L329-L334). For the first path, reserve B while keeping A's existing user until native Reset succeeds; then move the association. On failure, release only the temporary B reservation. For the second, deduplicate backing IDs *before* inspecting/removing them. Deduplication alone prevents the early drain but does not solve eventual cleanup: a busy backing's pending UMA and fence/list ownership must survive final title-allocator release until safe reclamation, including allocator-address reuse. **Tested:** Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti / 621.35, rustc 1.99.1 MSVC, debug. On this head with only the two test functions added: - `cargo test --offline --locked -p xcl --lib reset_list_preserves_previous_backing_until_native_success -- --nocapture --test-threads=1`: **0 passed, 1 failed**; previous A was reset before the native callback returned. - `cargo test --offline --locked -p xcl --lib forget_does_not_release_a_busy_original_backing_twice -- --nocapture --test-threads=1`: **0 passed, 1 failed**; pending entry was empty. - Existing `hle::d3d12x::alloc_pool::tests` with those two names skipped: **9 passed, 0 failed**. <details><summary>Test-only diff against dff6edc7</summary> ```diff diff --git a/crates/xcl/src/hle/d3d12x/alloc_pool.rs b/crates/xcl/src/hle/d3d12x/alloc_pool.rs index df8a39e..f558306 100644 --- a/crates/xcl/src/hle/d3d12x/alloc_pool.rs +++ b/crates/xcl/src/hle/d3d12x/alloc_pool.rs @@ -1092,6 +1092,66 @@ mod tests { unsafe { forget(alloc) }; } + #[test] + fn reset_list_preserves_previous_backing_until_native_success() { + let mut ids = Box::new([0u8; 5]); + let base = ids.as_mut_ptr() as usize; + let (alloc, old, current, spare, list) = (base, base + 1, base + 2, base + 3, base + 4); + { + let mut g = STATE.lock().unwrap(); + let s = g.get_or_insert_with(State::default); + s.types.insert(alloc, D3D12_COMMAND_LIST_TYPE_DIRECT.0); + s.cur.insert(alloc, current); + s.aside.insert(alloc, vec![old, spare]); + s.backings.insert(spare, Backing { already_reset: true, ..Backing::default() }); + move_list(s, list, old); + } + + let mut native_resets = Vec::new(); + let hr = reset_list(list, alloc, D3D12_COMMAND_LIST_TYPE_DIRECT.0, |backing| { + assert_eq!(backing, current); + let mut g = STATE.lock().unwrap(); + let s = g.as_mut().unwrap(); + assert_eq!( + unsafe { title_reset_in(s, alloc as *mut c_void, |raw| { + native_resets.push(raw as usize); + 0 + }) }, + Some(0) + ); + crate::util::E_FAIL + }); + + assert_eq!(hr, crate::util::E_FAIL); + assert_eq!(recording_backing(list), Some(old)); + assert!(!native_resets.contains(&old), "the previous recording was reset before native Reset succeeded"); + } + + #[test] + fn forget_does_not_release_a_busy_original_backing_twice() { + let mut ids = Box::new([0u8; 3]); + let base = ids.as_mut_ptr() as usize; + let (alloc, next, list) = (base, base + 1, base + 2); + { + let mut g = STATE.lock().unwrap(); + let s = g.get_or_insert_with(State::default); + s.types.insert(alloc, D3D12_COMMAND_LIST_TYPE_DIRECT.0); + s.aside.insert(alloc, vec![alloc]); + s.cur.insert(alloc, next); + move_list(s, list, alloc); + s.backings.entry(next).or_default().users.insert(list + 1); + } + super::super::console_list::hold_until_reset(alloc, vec![0x1111]); + + unsafe { forget(alloc) }; + + assert_eq!( + super::super::console_list::take_pending_for_test(alloc), + vec![0x1111], + "a live old recording must keep its pending UMA blocks" + ); + } + #[test] fn reset_list_waits_while_backing_is_resetting() { let mut ids = Box::new([0u8; 2]); ``` </details> These are synthetic state tests; they do not reproduce a retail crash or measure GPU memory pressure. I did not run the full workspace suite or paired smoke on this head. No game files or diagnostics were used. AI use: Codex (GPT-6.2 Sol) inspected the paths, added and ran the witnesses, and drafted this comment; Codex (GPT-6.2 Astra) independently reviewed the allocator lifetimes.
Author
Owner

@⁠Saksukella on GitHub · 2026-11-26 11:33 UTC · original

Thanks @⁠thehollowedone — both lifetime witnesses are fixed in 59cc732a + 1a3b6981:

  1. try_reserve_backing now pins the target backing without detaching prev until native Reset succeeds (commit_backing detaches old on success; rollback_backing releases only the temporary target reservation on failure).
  2. forget(alloc) now sorts & deduplicates backing IDs before inspection and moves any still-busy backing into State.orphaned (detached from s.backings for address-reuse safety while preserving its users/marks across executed/retire_recording/forget_list/title_reset until safe reclamation, including concurrent forget racing with reset_list and finish_aside).

Added reset_list_preserves_previous_backing_until_native_success, forget_does_not_release_a_busy_original_backing_twice_and_reclaims_when_idle, and forget_racing_mid_reset_list_cleans_up_on_rollback_and_commit (12/12 alloc_pool::tests pass) and re-ran 60s RX 9070 XT smoke (1669 frames, 16379 MB, 0 removals, 0 crashes).

**@⁠Saksukella** on GitHub · 2026-11-26 11:33 UTC · [original](https://github.com/xcl-dev/xcl/pull/2707#issuecomment-7190884511) Thanks @⁠thehollowedone — both lifetime witnesses are fixed in `59cc732a` + `1a3b6981`: 1. `try_reserve_backing` now pins the target backing without detaching `prev` until native `Reset` succeeds (`commit_backing` detaches `old` on success; `rollback_backing` releases only the temporary target reservation on failure). 2. `forget(alloc)` now sorts & deduplicates backing IDs before inspection and moves any still-busy backing into `State.orphaned` (detached from `s.backings` for address-reuse safety while preserving its `users`/`marks` across `executed`/`retire_recording`/`forget_list`/`title_reset` until safe reclamation, including concurrent `forget` racing with `reset_list` and `finish_aside`). Added `reset_list_preserves_previous_backing_until_native_success`, `forget_does_not_release_a_busy_original_backing_twice_and_reclaims_when_idle`, and `forget_racing_mid_reset_list_cleans_up_on_rollback_and_commit` (12/12 `alloc_pool::tests` pass) and re-ran 60s RX 9070 XT smoke (1669 frames, 16379 MB, 0 removals, 0 crashes).
Author
Owner

@⁠Decodere on GitHub · 2026-11-26 12:49 UTC · original

Independent RTX 4060 (8 GB) / Windows 11 release verification of PR #2707 at 1a3b698195d70f8c7d36fdd87678e2ed4df7bc00 (parent 59cc732a32bb3e838012844d370eba03a55ba0a2; merge-base origin/main b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7). Measurements and targeted test results only; not a full source review.

Setup

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6 cores / 12 threads), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200
  • Toolchain / caches: rustc 1.100.0 (0ef1bc386 2026-11-09), DXC 1.9.2609.5, release builds, warm DXIL/pipeline caches, quiet machine (zero concurrent builds/tests during timed runs)
  • Workload: Retail workload title: 29640639 via scripts/smoke.ps1 -Seconds 60 (XCL_NETWORK=0 XCL_ACTIVITY=1, default flags, no input)

Targeted RTX 4060 release unit tests (1a3b6981)

  • cargo test --release -p xcl --lib hle::d3d12x::alloc_pool:: -- --test-threads=4 (3 consecutive parallel runs): 12 passed, 0 failed, 0 ignored × 3 (0.22 s, 0.20 s, 0.23 s, 0 skipped, exit 0), covering all 8 new lifetime/concurrency tests (retired_segment_releases_backing_after_gpu_completes_while_preserving_in_flight, clean_title_reset_reclaims_idle_aside_backings_once, stalled_primary_stand_in_reset_keeps_uma_blocks_until_native_backing_resets, reset_list_blocks_concurrent_title_reset_and_rolls_back_on_failure, reset_list_waits_while_backing_is_resetting, reset_list_preserves_previous_backing_until_native_success, forget_does_not_release_a_busy_original_backing_twice_and_reclaims_when_idle, and forget_racing_mid_reset_list_cleans_up_on_rollback_and_commit).
  • cargo test --release -p xcl --lib hle::d3d12x::bind:: -- --test-threads=4: 8 passed, 0 failed, 0 ignored (0.32 s, 0 skipped, exit 0).
  • cargo test --release -p xcl --lib hle::d3d12x::title_list:: -- --test-threads=4: 3 passed, 0 failed, 0 ignored (0.02 s, 0 skipped, exit 0).
  • cargo test --release -p xcl --lib hle::d3d12x::list_x:: -- --test-threads=4: 40 passed, 0 failed, 0 ignored (0.69 s, 0 skipped, exit 0).
  • cargo test --release -p xcl --lib hle::d3d12x::real:: -- --test-threads=4: 60 passed, 0 failed, 0 ignored (0.66 s, 0 skipped, exit 0).

Observations

  • All 123 targeted release tests across all 5 modified modules (alloc_pool::, bind::, title_list::, list_x::, real::), including 3 consecutive parallel passes of alloc_pool::, passed cleanly on this RTX 4060 host with 0 skips and 0 flakes.
  • Quiet 60 s retail smoke ran cleanly (exit: 0x0, 1564 frames shown, 60 60 60 steady-state presents per 2 s, 0 device removals, 0 crashes, 13964 MB peak commit vs origin/main b49be183's 14018 MB / 1518 frames).

Paired 60 s RTX 4060 smoke (b49be183 vs 1a3b6981)

Merge-base origin/main (b49be183):

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

PR #2707 head (1a3b6981):

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

Limits of coverage

  • Full workspace test suite was not re-run on 1a3b6981 (only targeted alloc_pool::, bind::, title_list::, list_x::, and real:: release tests plus paired quiet 60 s smoke).
  • The quiet 60 s no-input menu/intro smoke verifies no runtime regression on the baseline path rather than long-session world-load idle aside-allocator reclamation under heavy churn (reclamation and concurrent reset/forget races are exercised by the alloc_pool::tests suite above).
  • Single discrete NVIDIA 8 GB GPU (RTX 4060) on native Windows 11; no AMD, Intel, or Wine/Linux run on this host.

AI use

Ran the targeted release unit tests and paired quiet 60 s smoke runs with assistance from Google Antigravity (Gemini 4 Neon); all test counts and smoke blocks were taken directly from cargo test and scripts/smoke.ps1 outputs.

**@⁠Decodere** on GitHub · 2026-11-26 12:49 UTC · [original](https://github.com/xcl-dev/xcl/pull/2707#issuecomment-7192518861) **Independent RTX 4060 (8 GB) / Windows 11 release verification of PR #2707 at `1a3b698195d70f8c7d36fdd87678e2ed4df7bc00`** (parent `59cc732a32bb3e838012844d370eba03a55ba0a2`; merge-base `origin/main` `b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7`). Measurements and targeted test results only; not a full source review. ### Setup - **GPU:** NVIDIA GeForce RTX 4060 (8 GB / `7956 MiB` reported by D3D12), driver `32.0.16.2114` (NVIDIA `621.14`, WDDM 3.2) - **CPU / RAM / OS:** Intel Core i5-11400F (6 cores / 12 threads), 32 GB RAM (`31.9 GiB` usable), Windows 11 Home `26200` - **Toolchain / caches:** `rustc 1.100.0 (0ef1bc386 2026-11-09)`, DXC `1.9.2609.5`, release builds, warm DXIL/pipeline caches, quiet machine (zero concurrent builds/tests during timed runs) - **Workload:** Retail workload `title: 29640639` via `scripts/smoke.ps1 -Seconds 60` (`XCL_NETWORK=0 XCL_ACTIVITY=1`, default flags, no input) ### Targeted RTX 4060 release unit tests (`1a3b6981`) - `cargo test --release -p xcl --lib hle::d3d12x::alloc_pool:: -- --test-threads=4` (3 consecutive parallel runs): **12 passed, 0 failed, 0 ignored** × 3 (`0.22 s`, `0.20 s`, `0.23 s`, `0` skipped, exit `0`), covering all 8 new lifetime/concurrency tests (`retired_segment_releases_backing_after_gpu_completes_while_preserving_in_flight`, `clean_title_reset_reclaims_idle_aside_backings_once`, `stalled_primary_stand_in_reset_keeps_uma_blocks_until_native_backing_resets`, `reset_list_blocks_concurrent_title_reset_and_rolls_back_on_failure`, `reset_list_waits_while_backing_is_resetting`, `reset_list_preserves_previous_backing_until_native_success`, `forget_does_not_release_a_busy_original_backing_twice_and_reclaims_when_idle`, and `forget_racing_mid_reset_list_cleans_up_on_rollback_and_commit`). - `cargo test --release -p xcl --lib hle::d3d12x::bind:: -- --test-threads=4`: **8 passed, 0 failed, 0 ignored** (`0.32 s`, `0` skipped, exit `0`). - `cargo test --release -p xcl --lib hle::d3d12x::title_list:: -- --test-threads=4`: **3 passed, 0 failed, 0 ignored** (`0.02 s`, `0` skipped, exit `0`). - `cargo test --release -p xcl --lib hle::d3d12x::list_x:: -- --test-threads=4`: **40 passed, 0 failed, 0 ignored** (`0.69 s`, `0` skipped, exit `0`). - `cargo test --release -p xcl --lib hle::d3d12x::real:: -- --test-threads=4`: **60 passed, 0 failed, 0 ignored** (`0.66 s`, `0` skipped, exit `0`). ### Observations - All 123 targeted release tests across all 5 modified modules (`alloc_pool::`, `bind::`, `title_list::`, `list_x::`, `real::`), including 3 consecutive parallel passes of `alloc_pool::`, passed cleanly on this RTX 4060 host with `0` skips and `0` flakes. - Quiet 60 s retail smoke ran cleanly (`exit: 0x0`, `1564` frames shown, `60 60 60` steady-state presents per 2 s, `0` device removals, `0` crashes, `13964 MB` peak commit vs `origin/main` `b49be183`'s `14018 MB` / `1518` frames). ### Paired 60 s RTX 4060 smoke (`b49be183` vs `1a3b6981`) Merge-base `origin/main` (`b49be183`): ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1518 (PresentX 1518) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14018 MB ``` PR #2707 head (`1a3b6981`): ``` xcl-smoke v1 commit: 1a3b698195d70f8c7d36fdd87678e2ed4df7bc00 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1564 (PresentX 1564) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13964 MB ``` ### Limits of coverage - Full workspace test suite was not re-run on `1a3b6981` (only targeted `alloc_pool::`, `bind::`, `title_list::`, `list_x::`, and `real::` release tests plus paired quiet 60 s smoke). - The quiet 60 s no-input menu/intro smoke verifies no runtime regression on the baseline path rather than long-session world-load idle aside-allocator reclamation under heavy churn (reclamation and concurrent reset/forget races are exercised by the `alloc_pool::tests` suite above). - Single discrete NVIDIA 8 GB GPU (`RTX 4060`) on native Windows 11; no AMD, Intel, or Wine/Linux run on this host. ### AI use Ran the targeted release unit tests and paired quiet 60 s smoke runs with assistance from Google Antigravity (Gemini 4 Neon); all test counts and smoke blocks were taken directly from `cargo test` and `scripts/smoke.ps1` outputs.
This pull request can be merged automatically.
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/2707/head:github-bot/gh-2707'
git switch 'github-bot/gh-2707'

Merge

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