D3D12.X: keep caller allocator for untracked lists and retain whole PSOs in dispatch_chain #2323

Open
Decodere wants to merge 1 commit from upstream-pr/2333 into main
Decodere commented 2026-11-25 14:57:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-25T14:57:39Z.


What is in it

Follow-up to #2080 (Part of #2088, Part of #1269) fixing four runtime allocator/lifetime bugs across crates/xcl/src/hle/d3d12x/real/dispatch_chain.rs, crates/xcl/src/hle/d3d12x/bind.rs, crates/xcl/src/hle/d3d12x/list_x.rs, and crates/xcl/src/hle/d3d12x/alloc_pool.rs:

  1. Preserve caller allocator for lists not tracked by alloc_pool: Extracted resolve_allocator (resolve_allocator_with) so when alloc_pool::enabled() is true and alloc_pool::recording_backing(list) returns None (as for console command lists created via dev_create_command_list_x and bundles), dispatch_chain falls back to the caller's allocator instead of 0. Previously, zeroing the allocator forced every console-list split compute dispatch onto the synchronous unsplit chain.whole() fallback.
  2. Register fresh mid-list split segments on their active alloc_pool backing: In list_x::split, when no idle spare exists and a fresh segment is created on pc_alloc = alloc_pool::current(alloc), call alloc_pool::created_on(p as usize, pc_alloc, ty.0) (and real::dispatch_chain::list_reset(p as usize)). Previously, leaving the new segment unregistered caused resolve_allocator to fall back to the title allocator A after an allocator swap (current(A) == B), so a later title Reset() reusing A would call dispatch_chain::allocator_reset(A) and drop scratch/retained PSOs while the split segment on B was still alive (caught by @pvfreis).
  3. Retain Arc<Chain> (and its bound whole PSO) until allocator_reset: Changed Recording::{scratch, first} to Option<Arc<Scratch>> / Option<ID3D12PipelineState>, updated dispatch_chain::whole(list, pso, allocator) (and its bind.rs ExecuteIndirect callsite), and added retain_whole(allocator, chain) on both the dispatch() whole fallback and ExecuteIndirect's whole() path. Whenever allocator != 0, Arc<Chain> is retained in RECORDINGS[allocator] (deduplicated per allocator, dropping any duplicate Arc<Chain> outside RECORDINGS.lock()) so forget(pso) while the command list is still in flight does not destroy the bound whole ID3D12PipelineState before allocator_reset(allocator).
  4. Update allocator type on alloc_pool::created_on: Changed s.types.entry(raw).or_insert(ty) to s.types.insert(raw, ty) (matching reset_list), so recycling a non-adopted test allocator address under a different command-list type does not keep a stale allocator type across parallel tests (caught by @ivall).

(Rebased onto origin/main 6d12f58a.)

Tested

  • Pre-fix reproductions:
    • whole_fallback_retains_chain_until_allocator_reset_preflight: confirmed unmodified dispatch() whole fallback failed (0 passed; 1 failed — Chain and its whole PSO dropped immediately on forget(pso)).
    • wait_split_fresh_segment_tracks_swapped_backing_allocator (WARP, before created_on): failed 0 passed; 1 failed (recording_backing_for_test(seg1) was None instead of Some(pc_alloc_b)).
  • Post-fix targeted tests (--release -- --test-threads=1 --nocapture, commit a7b93a85):
    • hle::d3d12x::real::dispatch_chain::tests: 4 passed, 0 failed, 0 ignored (0 skipped) on both RTX 4060 (0.41 s) and WARP (0.40 s), including a_list_recorded_after_another_goes_on_in_its_scratch.
    • hle::d3d12x::list_x::tests::wait_split_fresh_segment_tracks_swapped_backing_allocator: 1 passed, 0 failed, 0 ignored (0 skipped) on both RTX 4060 (0.23 s) and WARP (0.23 s), verifying a real alloc_pool swap A -> B, fresh mid-list split segment tracking on B, resolve_allocator returning B, and reuse/reset of A leaving seg1 keyed to B.
  • Parallel flake stress (cargo test --release -p xcl --lib -- dispatch_chain list_x::tests alloc_pool --test-threads=8): 20 consecutive runs, 0/20 failures (57 passed, 0 failed per run).
  • Full release workspace (cargo test --release --workspace --no-fail-fast -- --test-threads=4 --nocapture on RTX 4060): 37 test binaries, 1426 passed, 0 failed, 46 ignored (29 pre-existing hardware/debug-layer SKIPPED: 21 no wave64, 3 wave32 per-lane refused, 3 missing D3D12 debug layer, 1 driver cache toggle, 1 no heap windows; 0 skipped in our tests).

Regression run

Paired 60 s scripts/smoke.ps1 runs on the same RTX 4060 host against origin/main (889ef3e8aa7f267323ab4879e735e65da6bcef10) and PR head (a7b93a853ec56621bdef65a695cd858094878bfe):

Baseline (origin/main):

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

PR head:

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

Not tested

  • Retail title run with XCL_CONSOLE_LISTS=1 or D3D12 debug-layer execution (d3d12SDKLayers.dll is not installed on this host; allocator fallback, Wait-split alloc_pool registration, and whole PSO lifetime retention are verified directly by the unit/D3D12 tests).
  • AMD/Intel GPUs and native wave64 hardware (this host has an NVIDIA RTX 4060).

AI use

Implemented and verified with Google Antigravity (Gemini 4 Neon).

Part of #2088
Part of #1269

<!-- greyfinch-sync:ivall/xcl:issue:5493773918 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2333). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-25T14:57:39Z. --- **What is in it** Follow-up to #2080 (`Part of #2088`, `Part of #1269`) fixing four runtime allocator/lifetime bugs across `crates/xcl/src/hle/d3d12x/real/dispatch_chain.rs`, `crates/xcl/src/hle/d3d12x/bind.rs`, `crates/xcl/src/hle/d3d12x/list_x.rs`, and `crates/xcl/src/hle/d3d12x/alloc_pool.rs`: 1. **Preserve caller allocator for lists not tracked by `alloc_pool`**: Extracted `resolve_allocator` (`resolve_allocator_with`) so when `alloc_pool::enabled()` is true and `alloc_pool::recording_backing(list)` returns `None` (as for console command lists created via `dev_create_command_list_x` and bundles), `dispatch_chain` falls back to the caller's `allocator` instead of `0`. Previously, zeroing the allocator forced every console-list split compute dispatch onto the synchronous unsplit `chain.whole()` fallback. 2. **Register fresh mid-list split segments on their active `alloc_pool` backing**: In `list_x::split`, when no idle spare exists and a fresh segment is created on `pc_alloc = alloc_pool::current(alloc)`, call `alloc_pool::created_on(p as usize, pc_alloc, ty.0)` (and `real::dispatch_chain::list_reset(p as usize)`). Previously, leaving the new segment unregistered caused `resolve_allocator` to fall back to the title allocator `A` after an allocator swap (`current(A) == B`), so a later title `Reset()` reusing `A` would call `dispatch_chain::allocator_reset(A)` and drop scratch/retained PSOs while the split segment on `B` was still alive (caught by `@pvfreis`). 3. **Retain `Arc<Chain>` (and its bound `whole` PSO) until `allocator_reset`**: Changed `Recording::{scratch, first}` to `Option<Arc<Scratch>>` / `Option<ID3D12PipelineState>`, updated `dispatch_chain::whole(list, pso, allocator)` (and its `bind.rs` `ExecuteIndirect` callsite), and added `retain_whole(allocator, chain)` on both the `dispatch()` `whole` fallback and `ExecuteIndirect`'s `whole()` path. Whenever `allocator != 0`, `Arc<Chain>` is retained in `RECORDINGS[allocator]` (deduplicated per allocator, dropping any duplicate `Arc<Chain>` outside `RECORDINGS.lock()`) so `forget(pso)` while the command list is still in flight does not destroy the bound `whole` `ID3D12PipelineState` before `allocator_reset(allocator)`. 4. **Update allocator type on `alloc_pool::created_on`**: Changed `s.types.entry(raw).or_insert(ty)` to `s.types.insert(raw, ty)` (matching `reset_list`), so recycling a non-adopted test allocator address under a different command-list type does not keep a stale allocator type across parallel tests (caught by `@ivall`). *(Rebased onto `origin/main` `6d12f58a`.)* **Tested** - Pre-fix reproductions: - `whole_fallback_retains_chain_until_allocator_reset_preflight`: confirmed unmodified `dispatch()` `whole` fallback failed (`0 passed; 1 failed` — `Chain` and its `whole` PSO dropped immediately on `forget(pso)`). - `wait_split_fresh_segment_tracks_swapped_backing_allocator` (WARP, before `created_on`): failed `0 passed; 1 failed` (`recording_backing_for_test(seg1)` was `None` instead of `Some(pc_alloc_b)`). - Post-fix targeted tests (`--release -- --test-threads=1 --nocapture`, commit `a7b93a85`): - `hle::d3d12x::real::dispatch_chain::tests`: `4 passed, 0 failed, 0 ignored` (`0` skipped) on both RTX 4060 (`0.41 s`) and WARP (`0.40 s`), including `a_list_recorded_after_another_goes_on_in_its_scratch`. - `hle::d3d12x::list_x::tests::wait_split_fresh_segment_tracks_swapped_backing_allocator`: `1 passed, 0 failed, 0 ignored` (`0` skipped) on both RTX 4060 (`0.23 s`) and WARP (`0.23 s`), verifying a real `alloc_pool` swap `A -> B`, fresh mid-list split segment tracking on `B`, `resolve_allocator` returning `B`, and reuse/reset of `A` leaving `seg1` keyed to `B`. - Parallel flake stress (`cargo test --release -p xcl --lib -- dispatch_chain list_x::tests alloc_pool --test-threads=8`): **20 consecutive runs, `0/20` failures** (`57 passed, 0 failed` per run). - Full release workspace (`cargo test --release --workspace --no-fail-fast -- --test-threads=4 --nocapture` on RTX 4060): `37` test binaries, **`1426 passed, 0 failed, 46 ignored`** (`29` pre-existing hardware/debug-layer `SKIPPED`: `21` `no wave64`, `3` wave32 per-lane `refused`, `3` missing D3D12 debug layer, `1` driver cache toggle, `1` `no heap windows`; `0` skipped in our tests). **Regression run** Paired 60 s `scripts/smoke.ps1` runs on the same RTX 4060 host against `origin/main` (`889ef3e8aa7f267323ab4879e735e65da6bcef10`) and PR head (`a7b93a853ec56621bdef65a695cd858094878bfe`): Baseline (`origin/main`): ``` xcl-smoke v1 commit: 889ef3e8aa7f267323ab4879e735e65da6bcef10 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1550 (PresentX 1550) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13981 MB ``` PR head: ``` xcl-smoke v1 commit: a7b93a853ec56621bdef65a695cd858094878bfe gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1522 (PresentX 1522) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14022 MB ``` **Not tested** - Retail title run with `XCL_CONSOLE_LISTS=1` or D3D12 debug-layer execution (`d3d12SDKLayers.dll` is not installed on this host; allocator fallback, Wait-split `alloc_pool` registration, and `whole` PSO lifetime retention are verified directly by the unit/D3D12 tests). - AMD/Intel GPUs and native wave64 hardware (this host has an NVIDIA RTX 4060). **AI use** Implemented and verified with Google Antigravity (Gemini 4 Neon). Part of #2088 Part of #1269
nnonno91 commented 2026-11-25 15:08:10 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by nnonno91 on 2026-11-25T15:06:37Z.


Independent Radeon and RTX 5090 verification of af0b6672d1ed51a7d8855c61050262ad9c470464.

Tested

  • Windows 11 25H2 build 26200.9974, Ryzen 7 9800X3D, Rust 1.100.0 MSVC, unoptimized profile. AMD Radeon(TM) Graphics driver 32.0.21042.62 and RTX 5090 driver 32.0.16.1742.
  • cargo test --locked -p xcl --lib hle::d3d12x::real::dispatch_chain::tests:: -- --nocapture --test-threads=1 with each adapter selected by XCL_ADAPTER. The checked-in GPU fixture uses the default device, so I temporarily changed only its adapter lookup and printed the selected device. Both runs gave 2 passed, 0 failed, 0 ignored and no skips.
  • The CPU test checked caller and tracked allocator selection. On both devices, the whole-fallback and indirect fixture retained the chain across forget(pso), deduplicated repeated recording, then released it on allocator reset. The adapter selection edit was restored.

Not tested

Submitted in-flight work outside the unit fixture, the parent, retail smoke and the full workspace suite.

AI use

OpenAI Codex (GPT-6.2 Sol) adapted the test's adapter lookup, ran the tests and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7166316822 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2333#issuecomment-7166316822). Originally posted by [nnonno91](https://github.com/nnonno91) on 2026-11-25T15:06:37Z. --- Independent Radeon and RTX 5090 verification of `af0b6672d1ed51a7d8855c61050262ad9c470464`. **Tested** - Windows 11 25H2 build 26200.9974, Ryzen 7 9800X3D, Rust 1.100.0 MSVC, unoptimized profile. AMD Radeon(TM) Graphics driver 32.0.21042.62 and RTX 5090 driver 32.0.16.1742. - `cargo test --locked -p xcl --lib hle::d3d12x::real::dispatch_chain::tests:: -- --nocapture --test-threads=1` with each adapter selected by `XCL_ADAPTER`. The checked-in GPU fixture uses the default device, so I temporarily changed only its adapter lookup and printed the selected device. Both runs gave 2 passed, 0 failed, 0 ignored and no skips. - The CPU test checked caller and tracked allocator selection. On both devices, the whole-fallback and indirect fixture retained the chain across `forget(pso)`, deduplicated repeated recording, then released it on allocator reset. The adapter selection edit was restored. **Not tested** Submitted in-flight work outside the unit fixture, the parent, retail smoke and the full workspace suite. **AI use** OpenAI Codex (GPT-6.2 Sol) adapted the test's adapter lookup, ran the tests and wrote this report.
fromthemoonx commented 2026-11-25 16:12:00 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-11-25T15:08:39Z.


Rerun on the new head a7b93a8 (rebased onto main 6d12f58, created_on now inserts): the new test no longer flakes in parallel on NVIDIA: it did not fail in 290 parallel runs (--test-threads=8) where failures were logged by name.

result
cargo test --workspace --no-fail-fast -- --test-threads=4 at a7b93a8 (on current main) 1426 passed, 0 failed, 46 ignored; 25 SKIPPED lines
list_x::tests:: (41 tests), --test-threads=8, 40 runs 40 of 40
dispatch_chain::tests:: list_x::tests:: alloc_pool:: (49 tests), --test-threads=8, 330 runs in the 290 runs logged by name, the new test passed every time; 8 runs failed on older tests (plus 1 failure in the first 30 runs, run with -q, whose name I did not keep), which fail the same way on main 6d12f58 (6 of 200 runs): rotating_queue_self_deadlock_and_non_monotonic_rescue_do_not_hang (E_OUTOFMEMORY at list_x.rs:6777 with 8 threads), a_dispatch_with_a_pipeline_still_building_waits_at_the_submit (from #2118), once write_buffer_immediate_on_open_existing_heap_visible_to_cpu. Not this PR.
wait_split_fresh_segment_tracks_swapped_backing_allocator alone, 30 runs 30 of 30

My first rerun below repeated the module only 5 times at 4 threads, too few to catch what @ivall found.


Rerun on 02ba2f9: The new wait_split_fresh_segment_tracks_swapped_backing_allocator passed 30 of 30 alone, failed without the created_on line, and recorded no debug-layer messages.

result
cargo test --workspace --no-fail-fast -- --test-threads=4, 02ba2f9 merged onto main 2898511 (clean) 1366 passed, 0 failed, 46 ignored; 25 SKIPPED lines; the new test ran and passed
same at the head 02ba2f9 1322 passed, 1 failed, 46 ignored: a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier, from the base; passes on current main (c828d8c), not this PR
the new test alone, 30 runs; list_x::tests:: (37 tests), 5 runs; dispatch_chain::tests:: (3 tests), 30 runs 30 / 5 / 30 of 30
without alloc_pool::created_on(p as usize, pc_alloc, ty.0) (scratch) the new test fails 3 of 3 at list_x.rs:6987, recording_backing None
without only real::dispatch_chain::list_reset(p as usize) (scratch) the new test still passes: it does not cover that line
the new test with a scratch EnableDebugLayer() and an info-queue dump 0 stored messages

Earlier rerun, on e406771: Passed on NVIDIA, and with the debug layer on, the new D3D12 test was clean (0 messages). The fixture change (a bundle with SetComputeRootSignature, dispatching [1, 1, 1]) resolves the two messages reported below.

result
cargo test --workspace --no-fail-fast -- --test-threads=4 1274 passed, 0 failed, 46 ignored; 25 SKIPPED lines; test_title_draws_with_a_root_signature_under_the_debug_layer ran and passed
hle::d3d12x::real::dispatch_chain::tests:: (3 tests, now with main's a_chains_scratch_is_bounded_by_what_all_recordings_hold), 30 runs 30 of 30
whole_fallback_and_indirect_retain_chain_until_allocator_reset with a scratch EnableDebugLayer() and an info-queue dump passes, 0 stored messages

First run, on af0b667: Passed on NVIDIA with the D3D12 debug layer installed, and the e2e debug-layer messages were the same as on main 06c9f55. 1267 passed, 0 failed, 46 ignored. dispatch_chain::tests:: passed 30 of 30. With the layer turned on inside the new D3D12 test, its fixture recorded error id 952 (Dispatch with no root signature set) and warning id 1296 (group count 4294967295 > 65535), from dispatch(&list, p1, a1, [u32::MAX, 1, 1]) on a list with no root signature. The list was never executed, so nothing broke.

Tested: 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.

Not tested: a title with XCL_CONSOLE_LISTS=1, a release build, AMD / Intel.

AI use: Claude Code (Claude Opus 5.5) ran the tests and the scratch debug-layer check, and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7166371514 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2333#issuecomment-7166371514). Originally posted by [fromthemoonx](https://github.com/fromthemoonx) on 2026-11-25T15:08:39Z. --- **Rerun on the new head `a7b93a8` (rebased onto `main` `6d12f58`, `created_on` now `insert`s): the new test no longer flakes in parallel on NVIDIA: it did not fail in 290 parallel runs (`--test-threads=8`) where failures were logged by name.** | | result | |---|---| | `cargo test --workspace --no-fail-fast -- --test-threads=4` at `a7b93a8` (on current `main`) | 1426 passed, 0 failed, 46 ignored; 25 `SKIPPED` lines | | `list_x::tests::` (41 tests), `--test-threads=8`, 40 runs | 40 of 40 | | `dispatch_chain::tests:: list_x::tests:: alloc_pool::` (49 tests), `--test-threads=8`, 330 runs | in the 290 runs logged by name, the new test passed every time; 8 runs failed on older tests (plus 1 failure in the first 30 runs, run with `-q`, whose name I did not keep), which fail the same way on `main` `6d12f58` (6 of 200 runs): `rotating_queue_self_deadlock_and_non_monotonic_rescue_do_not_hang` (`E_OUTOFMEMORY` at `list_x.rs:6777` with 8 threads), `a_dispatch_with_a_pipeline_still_building_waits_at_the_submit` (from #2118), once `write_buffer_immediate_on_open_existing_heap_visible_to_cpu`. Not this PR. | | `wait_split_fresh_segment_tracks_swapped_backing_allocator` alone, 30 runs | 30 of 30 | My first rerun below repeated the module only 5 times at 4 threads, too few to catch what @ivall found. --- *Rerun on `02ba2f9`:* The new `wait_split_fresh_segment_tracks_swapped_backing_allocator` passed 30 of 30 alone, failed without the `created_on` line, and recorded no debug-layer messages. | | result | |---|---| | `cargo test --workspace --no-fail-fast -- --test-threads=4`, `02ba2f9` merged onto `main` `2898511` (clean) | 1366 passed, 0 failed, 46 ignored; 25 `SKIPPED` lines; the new test ran and passed | | same at the head `02ba2f9` | 1322 passed, 1 failed, 46 ignored: `a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier`, from the base; passes on current `main` (c828d8c), not this PR | | the new test alone, 30 runs; `list_x::tests::` (37 tests), 5 runs; `dispatch_chain::tests::` (3 tests), 30 runs | 30 / 5 / 30 of 30 | | without `alloc_pool::created_on(p as usize, pc_alloc, ty.0)` (scratch) | the new test fails 3 of 3 at `list_x.rs:6987`, `recording_backing` `None` | | without only `real::dispatch_chain::list_reset(p as usize)` (scratch) | the new test still passes: it does not cover that line | | the new test with a scratch `EnableDebugLayer()` and an info-queue dump | 0 stored messages | --- *Earlier rerun, on `e406771`:* Passed on NVIDIA, and with the debug layer on, the new D3D12 test was clean (0 messages). The fixture change (a bundle with `SetComputeRootSignature`, dispatching `[1, 1, 1]`) resolves the two messages reported below. | | result | |---|---| | `cargo test --workspace --no-fail-fast -- --test-threads=4` | 1274 passed, 0 failed, 46 ignored; 25 `SKIPPED` lines; `test_title_draws_with_a_root_signature_under_the_debug_layer` ran and passed | | `hle::d3d12x::real::dispatch_chain::tests::` (3 tests, now with `main`'s `a_chains_scratch_is_bounded_by_what_all_recordings_hold`), 30 runs | 30 of 30 | | `whole_fallback_and_indirect_retain_chain_until_allocator_reset` with a scratch `EnableDebugLayer()` and an info-queue dump | passes, `0` stored messages | --- *First run, on `af0b667`:* **Passed on NVIDIA with the D3D12 debug layer installed, and the e2e debug-layer messages were the same as on `main` `06c9f55`.** 1267 passed, 0 failed, 46 ignored. `dispatch_chain::tests::` passed 30 of 30. With the layer turned on inside the new D3D12 test, its fixture recorded error id 952 (`Dispatch` with no root signature set) and warning id 1296 (group count 4294967295 > 65535), from `dispatch(&list, p1, a1, [u32::MAX, 1, 1])` on a list with no root signature. The list was never executed, so nothing broke. **Tested:** 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. **Not tested:** a title with `XCL_CONSOLE_LISTS=1`, a release build, AMD / Intel. **AI use:** Claude Code (Claude Opus 5.5) ran the tests and the scratch debug-layer check, and wrote this report.
luckyteagirl commented 2026-11-25 16:12:13 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-25T15:30:14Z.


Independent RX 6800M check on exact head af0b6672d1ed51a7d8855c61050262ad9c470464.

Tested

  • Windows 11 build 26200, discrete AMD Radeon RX 6800M (driver 30.0.13002.13003), Rust 1.99 MSVC, DXC/DXIL 1.9.2609.5.
  • Clean checkout: cargo test --locked -p xcl --lib hle::d3d12x::real::dispatch_chain::tests:: -- --test-threads=1 --show-output: 2 passed, 0 failed, 0 ignored, 0 explicit skips. The checked-in fixture uses the default D3D12 device, so this run alone does not identify the adapter.
  • Local test-only change to the GPU fixture selected via XCL_ADAPTER=6800M and printed dispatch_chain test adapter: AMD Radeon RX 6800M. With XCL_REQUIRE_GPU=wave64, the same filter gave 2 passed, 0 failed, 0 ignored, 0 explicit skips. The GPU fixture exercised both dispatch() whole fallback and repeated whole() calls, including retention across forget(pso), deduplication, and release at allocator reset. The selector change was restored; the checkout is clean.

This adds a discrete RDNA2 and older AMD driver to the existing Radeon/NVIDIA checks. I did not run the full workspace suite or a retail-title smoke comparison for this PR, and these focused tests do not cover an in-flight console command list.

AI use: OpenAI Codex (GPT-6) ran the checks and prepared this report.

<!-- greyfinch-sync:ivall/xcl:comment:7166944027 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2333#issuecomment-7166944027). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-25T15:30:14Z. --- Independent RX 6800M check on exact head `af0b6672d1ed51a7d8855c61050262ad9c470464`. **Tested** - Windows 11 build 26200, discrete AMD Radeon RX 6800M (driver `30.0.13002.13003`), Rust 1.99 MSVC, DXC/DXIL 1.9.2609.5. - Clean checkout: `cargo test --locked -p xcl --lib hle::d3d12x::real::dispatch_chain::tests:: -- --test-threads=1 --show-output`: **2 passed, 0 failed, 0 ignored, 0 explicit skips**. The checked-in fixture uses the default D3D12 device, so this run alone does not identify the adapter. - Local test-only change to the GPU fixture selected via `XCL_ADAPTER=6800M` and printed `dispatch_chain test adapter: AMD Radeon RX 6800M`. With `XCL_REQUIRE_GPU=wave64`, the same filter gave **2 passed, 0 failed, 0 ignored, 0 explicit skips**. The GPU fixture exercised both `dispatch()` whole fallback and repeated `whole()` calls, including retention across `forget(pso)`, deduplication, and release at allocator reset. The selector change was restored; the checkout is clean. This adds a discrete RDNA2 and older AMD driver to the existing Radeon/NVIDIA checks. I did not run the full workspace suite or a retail-title smoke comparison for this PR, and these focused tests do not cover an in-flight console command list. **AI use:** OpenAI Codex (GPT-6) ran the checks and prepared this report.
Decodere commented 2026-11-25 17:07:18 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-25T16:14:19Z.


Thank you @nnonno91, @fromthemoonx, and @luckyteagirl for testing across RTX 5090, RX 7900 XTX / Arc A770, and RX 6800M!

Rebased #2333 cleanly onto origin/main (08294413 -> e406771b) to integrate with e9ddf17/0829441 slabbed bounded scratch:

  • Adapted Recording::scratch to Option<Arc<Scratch>> while keeping the SLABS / scratch_for / record_dispatch_chain design and a_chains_scratch_is_bounded_by_what_all_recordings_hold intact.
  • Updated whole_fallback_and_indirect_retain_chain_until_allocator_reset so the dispatch() whole fallback test uses a D3D12_COMMAND_LIST_TYPE_BUNDLE command list with SetComputeRootSignature and [1, 1, 1] groups (deterministically hitting the fallback without huge grid args, addressing @fromthemoonx's note about D3D12 debug layer ID 952/1296).
  • Re-verified dispatch_chain::tests (3 passed, 0 failed on both RTX 4060 and WARP), full release workspace (1274 passed, 0 failed), and paired 60 s smoke (1553 -> 1624, 0 device removals/crashes).
<!-- greyfinch-sync:ivall/xcl:comment:7167713480 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2333#issuecomment-7167713480). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-25T16:14:19Z. --- Thank you @nnonno91, @fromthemoonx, and @luckyteagirl for testing across RTX 5090, RX 7900 XTX / Arc A770, and RX 6800M! Rebased `#2333` cleanly onto `origin/main` (`08294413` -> `e406771b`) to integrate with `e9ddf17`/`0829441` slabbed bounded scratch: - Adapted `Recording::scratch` to `Option<Arc<Scratch>>` while keeping the `SLABS` / `scratch_for` / `record_dispatch_chain` design and `a_chains_scratch_is_bounded_by_what_all_recordings_hold` intact. - Updated `whole_fallback_and_indirect_retain_chain_until_allocator_reset` so the `dispatch()` `whole` fallback test uses a `D3D12_COMMAND_LIST_TYPE_BUNDLE` command list with `SetComputeRootSignature` and `[1, 1, 1]` groups (deterministically hitting the fallback without huge grid args, addressing @fromthemoonx's note about D3D12 debug layer ID 952/1296). - Re-verified `dispatch_chain::tests` (`3 passed, 0 failed` on both RTX 4060 and WARP), full release workspace (`1274 passed, 0 failed`), and paired 60 s smoke (`1553 -> 1624`, `0` device removals/crashes).
pvfreis commented 2026-11-25 18:04:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by pvfreis on 2026-11-25T17:40:16Z.


By reading only, on e406771:

With default switches this fallback also reaches Wait-split segments, and after an allocator swap the title's allocator is the wrong key for them.

  • With no idle spare, try_split_for_wait creates the segment on alloc_pool::current(alloc) without registering it, so recording_backing is None. On main its split dispatches go whole; here they chain.
  • After a swap it records on PC allocator B, but its scratch is in RECORDINGS[A]. A title Reset with B busy and A free reuses A (title_reset_in); reset_pc_allocator(A) drops scratch and chain, while the recording on B can be submitted again.

Fix: register it where it is made, alloc_pool::created_on(p as usize, pc_alloc, ty.0); #1071 (draft, conflicting) has that hunk.

Tested: nothing run. Not tested: whether a retail title hits it.

AI use: Claude Code (Claude Opus 5.5) found it, Claude Fable 5.2 checked it; checked by a person before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7169834140 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2333#issuecomment-7169834140). Originally posted by [pvfreis](https://github.com/pvfreis) on 2026-11-25T17:40:16Z. --- By reading only, on `e406771`: **With default switches this fallback also reaches Wait-split segments, and after an allocator swap the title's allocator is the wrong key for them.** - With no idle spare, `try_split_for_wait` creates the segment on `alloc_pool::current(alloc)` without registering it, so `recording_backing` is `None`. On `main` its split dispatches go whole; here they chain. - After a swap it records on PC allocator B, but its scratch is in `RECORDINGS[A]`. A title Reset with B busy and A free reuses A (`title_reset_in`); `reset_pc_allocator(A)` drops scratch and chain, while the recording on B can be submitted again. Fix: register it where it is made, `alloc_pool::created_on(p as usize, pc_alloc, ty.0)`; #1071 (draft, conflicting) has that hunk. **Tested:** nothing run. **Not tested:** whether a retail title hits it. AI use: Claude Code (Claude Opus 5.5) found it, Claude Fable 5.2 checked it; checked by a person before posting.
DavidM1911 commented 2026-11-25 18:04:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T18:04:42Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7170406848 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2333#issuecomment-7170406848). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T18:04:42Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
Decodere commented 2026-11-25 19:09:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-25T18:46:14Z.


Good catch @pvfreis — verified directly in list_x::try_split_for_wait (None spare branch): creating a fresh mid-list Wait split segment on alloc_pool::current(alloc) without calling alloc_pool::created_on(p as usize, pc_alloc, ty.0) left recording_backing(seg1) as None, so after an allocator swap (A -> B) resolve_allocator fell back to title allocator A instead of B.

Updated the branch to 02ba2f94 (rebased onto be67bfcf):

  • Register newly created Wait-split segments via alloc_pool::created_on(p as usize, pc_alloc, ty.0) (and real::dispatch_chain::list_reset(p as usize)).
  • Added a WARP- and hardware-runnable regression test wait_split_fresh_segment_tracks_swapped_backing_allocator in list_x.rs (confirmed failing before the fix with recording_backing == None, passing 1/0 on RTX 4060 and WARP after, including across an A -> B -> A allocator swap/reuse cycle).
  • Re-verified dispatch_chain::tests (3/0 RTX 4060 & WARP), mid_list_write64_wait64_split_avoids_cycle_and_reuses_spares (1/0), full release workspace (1322/1 — sole failure is origin/main's pre-existing #2074 test), and paired 60 s smoke (be67bfcf 1525 frames / 13969 MB vs 02ba2f94 1544 frames / 13976 MB, 0 removals/crashes).
<!-- greyfinch-sync:ivall/xcl:comment:7171373826 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2333#issuecomment-7171373826). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-25T18:46:14Z. --- Good catch `@pvfreis` — verified directly in `list_x::try_split_for_wait` (`None` spare branch): creating a fresh mid-list Wait split segment on `alloc_pool::current(alloc)` without calling `alloc_pool::created_on(p as usize, pc_alloc, ty.0)` left `recording_backing(seg1)` as `None`, so after an allocator swap (`A -> B`) `resolve_allocator` fell back to title allocator `A` instead of `B`. Updated the branch to `02ba2f94` (rebased onto `be67bfcf`): - Register newly created Wait-split segments via `alloc_pool::created_on(p as usize, pc_alloc, ty.0)` (and `real::dispatch_chain::list_reset(p as usize)`). - Added a WARP- and hardware-runnable regression test `wait_split_fresh_segment_tracks_swapped_backing_allocator` in `list_x.rs` (confirmed failing before the fix with `recording_backing == None`, passing `1/0` on RTX 4060 and WARP after, including across an `A -> B -> A` allocator swap/reuse cycle). - Re-verified `dispatch_chain::tests` (`3/0` RTX 4060 & WARP), `mid_list_write64_wait64_split_avoids_cycle_and_reuses_spares` (`1/0`), full release workspace (`1322/1` — sole failure is `origin/main`'s pre-existing `#2074` test), and paired 60 s smoke (`be67bfcf` `1525` frames / `13969 MB` vs `02ba2f94` `1544` frames / `13976 MB`, `0` removals/crashes).
ivall commented 2026-11-25 20:08:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ivall on 2026-11-25T19:43:46Z.


Read in full (body, thread, diff) and tested on AMD RDNA4 (native wave64), Windows, DXC 1.8.2502.11, debug. The three fixes look right to me. One thing holds the merge: the new test wait_split_fresh_segment_tracks_swapped_backing_allocator is flaky when tests run in parallel, and the cause is in created_on.

What happens (02ba2f9 alone, no other PR)

  • wait_split_fresh_segment --test-threads=1: 40 of 40 runs pass.
  • list_x::tests --test-threads=8: 11 of 40 runs fail; dispatch_chain list_x::tests --test-threads=8: 13 of 40. Always this test, at assert_eq!(reset_fn(wrap_c, a_raw, 0), 0) (list_x.rs:6963), E_INVALIDARG. No other test failed in those runs.

Cause

  • alloc_pool::created_on does s.types.entry(raw).or_insert(ty). Other list_x tests make lists on allocators that are never adopted, so forget never runs for them and their type stays in types under that address.
  • When a_title gets such an address, its type stays the old one. The title Reset then makes the backing allocator with that type (DIRECT), and the COMPUTE list cannot be reset on it.
  • Logged in 20 more runs: the recorded type was 0 (DIRECT) in the 4 that failed and 2 (COMPUTE) in the 16 that passed. Tests that left the entry: e.g. cross_queue_wait64_before_signal_does_not_deadlock_submit_thread, cross_queue_cycle_and_same_queue_fifo_do_not_deadlock.
  • I did not find a way to reach it in a title, where allocators are adopted and forget removes the entry. I only checked that by reading.

Fix I tried

  • In created_on, s.types.insert(raw, ty); instead of or_insert: a list that was just made on the allocator has the allocator's type, so the newer value is the right one.
  • With it: list_x::tests --test-threads=8 0 of 60 runs failed, dispatch_chain list_x::tests alloc_pool --test-threads=8 0 of 60.

@Decodere, could you take that line (or forget the address in the test) and rerun your smoke for the new head? main at 06055a7 with this PR, #2097, #2368, #2408 and #2383: whole suite 1422 passed, 2 failed, 46 ignored (fuzz_validate_and_gpu_1 and _3, the same on main here); with XCL_DIRECT_DXIL=1, gpu:: hle::d3d12x 952 passed, the same 2 failed. I will merge it once the test is stable. #2404 and #2372 touch the same code and then rebase over it.

Not tested: a title run with this PR; the two fixed cases that the tests do not reach.

AI use: Claude Code (Claude Opus 5.5) read the thread and the diff, ran the tests, found the cause and wrote this on the maintainer's behalf.

<!-- greyfinch-sync:ivall/xcl:comment:7172689111 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2333#issuecomment-7172689111). Originally posted by [ivall](https://github.com/ivall) on 2026-11-25T19:43:46Z. --- Read in full (body, thread, diff) and tested on AMD RDNA4 (native wave64), Windows, DXC 1.8.2502.11, debug. The three fixes look right to me. **One thing holds the merge: the new test `wait_split_fresh_segment_tracks_swapped_backing_allocator` is flaky when tests run in parallel, and the cause is in `created_on`.** **What happens** (`02ba2f9` alone, no other PR) - `wait_split_fresh_segment --test-threads=1`: 40 of 40 runs pass. - `list_x::tests --test-threads=8`: 11 of 40 runs fail; `dispatch_chain list_x::tests --test-threads=8`: 13 of 40. Always this test, at `assert_eq!(reset_fn(wrap_c, a_raw, 0), 0)` (`list_x.rs:6963`), `E_INVALIDARG`. No other test failed in those runs. **Cause** - `alloc_pool::created_on` does `s.types.entry(raw).or_insert(ty)`. Other `list_x` tests make lists on allocators that are never adopted, so `forget` never runs for them and their type stays in `types` under that address. - When `a_title` gets such an address, its type stays the old one. The title Reset then makes the backing allocator with that type (DIRECT), and the COMPUTE list cannot be reset on it. - Logged in 20 more runs: the recorded type was 0 (DIRECT) in the 4 that failed and 2 (COMPUTE) in the 16 that passed. Tests that left the entry: e.g. `cross_queue_wait64_before_signal_does_not_deadlock_submit_thread`, `cross_queue_cycle_and_same_queue_fifo_do_not_deadlock`. - I did not find a way to reach it in a title, where allocators are adopted and `forget` removes the entry. I only checked that by reading. **Fix I tried** - In `created_on`, `s.types.insert(raw, ty);` instead of `or_insert`: a list that was just made on the allocator has the allocator's type, so the newer value is the right one. - With it: `list_x::tests --test-threads=8` 0 of 60 runs failed, `dispatch_chain list_x::tests alloc_pool --test-threads=8` 0 of 60. @Decodere, could you take that line (or forget the address in the test) and rerun your smoke for the new head? `main` at `06055a7` with this PR, #2097, #2368, #2408 and #2383: whole suite 1422 passed, 2 failed, 46 ignored (`fuzz_validate_and_gpu_1` and `_3`, the same on `main` here); with `XCL_DIRECT_DXIL=1`, `gpu:: hle::d3d12x` 952 passed, the same 2 failed. I will merge it once the test is stable. #2404 and #2372 touch the same code and then rebase over it. **Not tested:** a title run with this PR; the two fixed cases that the tests do not reach. AI use: Claude Code (Claude Opus 5.5) read the thread and the diff, ran the tests, found the cause and wrote this on the maintainer's behalf.
bmjask commented 2026-11-25 20:08:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-11-25T19:52:51Z.


Testing PR comment access.

<!-- greyfinch-sync:ivall/xcl:comment:7172889385 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2333#issuecomment-7172889385). Originally posted by [bmjask](https://github.com/bmjask) on 2026-11-25T19:52:51Z. --- Testing PR comment access.
bmjask commented 2026-11-25 20:16:29 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-11-25T20:16:29Z.

Review: COMMENTED


No source-level defect found in the reviewed paths. The untracked-list allocator fallback and retained whole-PSO lifetime both line up with the backing-list registration and allocator-reset release paths, and the tests cover the main fallback/dedup cases. The head is mergeable_state=dirty, so please rebase and refresh CI before merge.

<!-- greyfinch-sync:ivall/xcl:review:6064333555 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2333#pullrequestreview-6064333555). Originally posted by [bmjask](https://github.com/bmjask) on 2026-11-25T20:16:29Z. **Review:** COMMENTED --- No source-level defect found in the reviewed paths. The untracked-list allocator fallback and retained whole-PSO lifetime both line up with the backing-list registration and allocator-reset release paths, and the tests cover the main fallback/dedup cases. The head is mergeable_state=dirty, so please rebase and refresh CI before merge.
Decodere commented 2026-11-25 21:05:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-25T20:16:55Z.


Thanks for tracking that down! Updated alloc_pool::created_on to s.types.insert(raw, ty) (matching reset_list), rebased cleanly onto 6d12f58a (a7b93a85), verified 0/20 failures across 20 consecutive --test-threads=8 runs of dispatch_chain list_x::tests alloc_pool (57 passed, 0 failed each), full release workspace 1426 passed, 0 failed, and fresh paired 60 s RTX 4060 smoke (889ef3e8 1550 frames vs a7b93a85 1522 frames, 0 device removals/crashes). Ready to merge!

<!-- greyfinch-sync:ivall/xcl:comment:7173437611 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2333#issuecomment-7173437611). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-25T20:16:55Z. --- Thanks for tracking that down! Updated `alloc_pool::created_on` to `s.types.insert(raw, ty)` (matching `reset_list`), rebased cleanly onto `6d12f58a` (`a7b93a85`), verified `0/20` failures across 20 consecutive `--test-threads=8` runs of `dispatch_chain list_x::tests alloc_pool` (`57 passed, 0 failed` each), full release workspace `1426 passed, 0 failed`, and fresh paired 60 s RTX 4060 smoke (`889ef3e8` `1550` frames vs `a7b93a85` `1522` frames, `0` device removals/crashes). Ready to merge!
thehollowedone commented 2026-11-25 21:05:29 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-25T21:02:36Z.


Independent Windows/RTX 3080 Ti verification of #2333 head a7b93a8 in a clean, isolated checkout.

Tested — Windows 11 Pro build 26300, RTX 3080 Ti 12 GB / driver 621.35, Ryzen 7 9800X3D, 32 GB RAM, Rust 1.99.1 MSVC, DXC 1.8.2502.11.

  • cargo build --offline --locked --release --workspace, then cargo test --offline --locked --release --workspace --no-fail-fast -- --test-threads=4 --nocapture: 1,426 passed, 0 failed, 46 ignored; 26 explicit SKIPPED (21 no wave64, 3 unsupported per-lane forms, 1 heap-window case, 1 driver-cache control). The workspace build supplied the test-title fixtures before the passing run.
  • The nine dispatch_chain::tests, alloc_pool::tests, and wait_split_fresh_segment_tracks_swapped_backing_allocator tests passed 20/20 parallel repetitions (9 passed, 0 failed each, --test-threads=8) using a PR-specific build directory.
  • The author's broader stress selection was 2/3 before cross_queue_cycle_and_same_queue_fifo_do_not_deadlock failed at CreateCommandQueue with 0x8007000E. The same test failed at CreateCommandQueue on untouched main 6d12f58 in its first matching parallel run. This is a baseline/environment limitation, not evidence that this PR introduced that failure. The queue-cycle test passed 10/10 when run alone on the PR head.

Not tested — paired retail smoke, XCL_CONSOLE_LISTS=1 in a title, or native-wave64 hardware. This confirms the previously flaky allocator tests and full GPU suite here; it does not establish a first-frame speedup.

AI-assisted: Codex (GPT-6, exact variant unavailable) inspected the change, ran the tests, and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7174531556 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2333#issuecomment-7174531556). Originally posted by [thehollowedone](https://github.com/thehollowedone) on 2026-11-25T21:02:36Z. --- Independent Windows/RTX 3080 Ti verification of [#2333 head `a7b93a8`](https://github.com/xcl-dev/xcl/commit/a7b93a853ec56621bdef65a695cd858094878bfe) in a clean, isolated checkout. **Tested** — Windows 11 Pro build 26300, RTX 3080 Ti 12 GB / driver 621.35, Ryzen 7 9800X3D, 32 GB RAM, Rust 1.99.1 MSVC, DXC 1.8.2502.11. - `cargo build --offline --locked --release --workspace`, then `cargo test --offline --locked --release --workspace --no-fail-fast -- --test-threads=4 --nocapture`: **1,426 passed, 0 failed, 46 ignored; 26 explicit SKIPPED** (21 no wave64, 3 unsupported per-lane forms, 1 heap-window case, 1 driver-cache control). The workspace build supplied the test-title fixtures before the passing run. - The nine `dispatch_chain::tests`, `alloc_pool::tests`, and `wait_split_fresh_segment_tracks_swapped_backing_allocator` tests passed **20/20 parallel repetitions** (`9 passed, 0 failed` each, `--test-threads=8`) using a PR-specific build directory. - The author's broader stress selection was **2/3** before `cross_queue_cycle_and_same_queue_fifo_do_not_deadlock` failed at `CreateCommandQueue` with `0x8007000E`. The same test failed at `CreateCommandQueue` on untouched [main `6d12f58`](https://github.com/xcl-dev/xcl/commit/6d12f58a229bc73889878a448c64dc3af25eeba0) in its first matching parallel run. This is a baseline/environment limitation, not evidence that this PR introduced that failure. The queue-cycle test passed 10/10 when run alone on the PR head. **Not tested** — paired retail smoke, `XCL_CONSOLE_LISTS=1` in a title, or native-wave64 hardware. This confirms the previously flaky allocator tests and full GPU suite here; it does not establish a first-frame speedup. AI-assisted: Codex (GPT-6, exact variant unavailable) inspected the change, ran the tests, and drafted this report.
oni-swr commented 2026-11-25 22:06:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by oni-swr on 2026-11-25T21:11:56Z.


Tested

  • Windows 11 Pro build 26200; AMD Radeon RX 7800 XT 16 GB (driver 32.0.31035.1003); AMD Ryzen 7 5700X3D CPU; Rust 1.100.0 MSVC; DXC/DXIL 1.8.2502.11 from Windows SDK 10.0.26100.0. Debug profile. XCL_ADAPTER=radeon.
  • Tested exact PR head a7b93a853ec56621bdef65a695cd858094878bfe. Baseline origin/main was 6d12f58a229bc73889878a448c64dc3af25eeba0.
  • cargo test --workspace --no-fail-fast -- --test-threads=4: 1,425 passed, 1 failed, 46 ignored, 25 SKIPPED notices (exit 101). The sole failure was gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1, also the sole baseline failure.
  • Focused cargo test -p xcl --lib hle::d3d12x::real::dispatch_chain::tests -- --test-threads=1: 4 passed, 0 failed, 0 ignored.
  • Focused cargo test -p xcl --lib hle::d3d12x::list_x::tests::wait_split_fresh_segment_tracks_swapped_backing_allocator -- --test-threads=1: 1 passed, 0 failed, 0 ignored.
  • Current-main baseline cargo test --workspace --no-fail-fast -- --test-threads=4: 1,422 passed, 1 failed, 46 ignored, 25 SKIPPED notices (exit 101).

Not tested

  • A retail title or game data; no dumps were used.

AI use

  • Codex (gpt-6-luna) ran the tests and prepared this report.
<!-- greyfinch-sync:ivall/xcl:comment:7174744324 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2333#issuecomment-7174744324). Originally posted by [oni-swr](https://github.com/oni-swr) on 2026-11-25T21:11:56Z. --- **Tested** - Windows 11 Pro build 26200; AMD Radeon RX 7800 XT 16 GB (driver 32.0.31035.1003); AMD Ryzen 7 5700X3D CPU; Rust 1.100.0 MSVC; DXC/DXIL 1.8.2502.11 from Windows SDK 10.0.26100.0. Debug profile. `XCL_ADAPTER=radeon`. - Tested exact PR head `a7b93a853ec56621bdef65a695cd858094878bfe`. Baseline `origin/main` was `6d12f58a229bc73889878a448c64dc3af25eeba0`. - `cargo test --workspace --no-fail-fast -- --test-threads=4`: 1,425 passed, 1 failed, 46 ignored, 25 `SKIPPED` notices (exit 101). The sole failure was `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`, also the sole baseline failure. - Focused `cargo test -p xcl --lib hle::d3d12x::real::dispatch_chain::tests -- --test-threads=1`: 4 passed, 0 failed, 0 ignored. - Focused `cargo test -p xcl --lib hle::d3d12x::list_x::tests::wait_split_fresh_segment_tracks_swapped_backing_allocator -- --test-threads=1`: 1 passed, 0 failed, 0 ignored. - Current-main baseline `cargo test --workspace --no-fail-fast -- --test-threads=4`: 1,422 passed, 1 failed, 46 ignored, 25 `SKIPPED` notices (exit 101). **Not tested** - A retail title or game data; no dumps were used. **AI use** - Codex (gpt-6-luna) ran the tests and prepared this report.
DavidM1911 commented 2026-11-26 09:07:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T08:15:35Z.


Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: 1 failure under parallel scheduling; clean on --test-threads=1 rerun (1312 passed, 0 failed, 27 ignored, 82s). Intermittent single-test flake — tracked in #1978.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7186378792 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2333#issuecomment-7186378792). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T08:15:35Z. --- Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: 1 failure under parallel scheduling; clean on `--test-threads=1` rerun (**1312 passed, 0 failed, 27 ignored**, 82s). Intermittent single-test flake — tracked in #1978. Thanks! — Devin
throny commented 2026-11-27 19:44:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-27T19:44:12Z.


merge-check claim
head: a7b93a853e

<!-- greyfinch-sync:ivall/xcl:comment:7226820563 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2333#issuecomment-7226820563). Originally posted by [throny](https://github.com/throny) on 2026-11-27T19:44:12Z. --- merge-check claim head: a7b93a853ec56621bdef65a695cd858094878bfe
throny commented 2026-11-27 20:00:58 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-27T20:00:58Z.


merge-check
base: 6089122a
head: a7b93a853e
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1468 passed, 0 failed, 47 ignored (26 SKIPPED lines); base alone: 1465 passed, 0 failed, 47 ignored
review: none blocking. Keying by the caller's allocator matches how its Reset or Release drops the recordings; a console list built with a null allocator still keys 0 and gets no retention. retain_whole scans the allocator's entries in full on every call. The list_x test returns without checking anything when XCL_ALLOC_SWAP=0.
performance: changes the default: fresh Wait-split segments (and console lists) now run chained with scratch (bounded) instead of the whole pipeline: one whole-pipeline compile fewer, more dispatches and barriers, and an O(n) scan per ExecuteIndirect with a split pipeline. Reasoned, not measured here; a world-run comparison would be worth having before or after the merge.
verdict: safe to merge
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).

<!-- greyfinch-sync:ivall/xcl:comment:7227091012 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2333#issuecomment-7227091012). Originally posted by [throny](https://github.com/throny) on 2026-11-27T20:00:58Z. --- merge-check base: 6089122a head: a7b93a853ec56621bdef65a695cd858094878bfe merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1468 passed, 0 failed, 47 ignored (26 SKIPPED lines); base alone: 1465 passed, 0 failed, 47 ignored review: none blocking. Keying by the caller's allocator matches how its Reset or Release drops the recordings; a console list built with a null allocator still keys 0 and gets no retention. retain_whole scans the allocator's entries in full on every call. The list_x test returns without checking anything when XCL_ALLOC_SWAP=0. performance: changes the default: fresh Wait-split segments (and console lists) now run chained with scratch (bounded) instead of the whole pipeline: one whole-pipeline compile fewer, more dispatches and barriers, and an O(n) scan per ExecuteIndirect with a split pipeline. Reasoned, not measured here; a world-run comparison would be worth having before or after the merge. verdict: safe to merge hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
KOLESNiii commented 2026-11-28 00:18:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-28T00:18:44Z.


merge-check claim
head: a7b93a853e

<!-- greyfinch-sync:ivall/xcl:comment:7230813656 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2333#issuecomment-7230813656). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-11-28T00:18:44Z. --- merge-check claim head: a7b93a853ec56621bdef65a695cd858094878bfe
KOLESNiii commented 2026-11-28 01:10:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-28T01:10:45Z.


merge-check
base: 2c717a043c
head: a7b93a853e
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1469 passed, 0 failed, 47 ignored, 25 SKIPPED: 21 no wave64, 3 per-lane f16/f32 forms refused (#1426 semantics), 1 no heap windows; failing: none. The suite ran on this PC at the same time as 5 other PRs' suites, in one queued job.
review: none. Whole diff read (alloc_pool.rs created_on, bind.rs execute_indirect, list_x.rs split() + test, dispatch_chain.rs whole()/retain_whole/resolve_allocator + 2 tests). A split segment made fresh now gets the same alloc_pool tracking a reused spare gets through reset_list, whole() retains its chain on the resolved allocator until allocator_reset, and untracked lists now key retained chains to the caller's allocator instead of key 0 (which no allocator_reset ever cleared).
performance: reasoned, not measured: only dispatch-chain (split compute) pipelines; whole() now takes RECORDINGS' lock and scans that allocator's entries once per ExecuteIndirect / whole-fallback dispatch; no cost for other pipelines.
verdict: safe to merge
hardware / tool and model: Windows 11 build 26300.9974, NVIDIA GeForce RTX 2070 SUPER 8 GB (driver 621.40, wave32 only), AMD Ryzen 5 3600XT; rustc 1.100.1 (20ddd0171 2026-11-25) x86_64-pc-windows-msvc, debug test profile; trial merge f2779e4e28fde51dd3e1c96827f198cd7dcb64cd (local, not pushed). Claude Code: Claude Opus 5.5 (coordination, full-diff review, draft).

<!-- greyfinch-sync:ivall/xcl:comment:7231477732 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2333#issuecomment-7231477732). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-11-28T01:10:45Z. --- merge-check base: 2c717a043c8488938179fca81da4bb9e7913a358 head: a7b93a853ec56621bdef65a695cd858094878bfe merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1469 passed, 0 failed, 47 ignored, 25 SKIPPED: 21 no wave64, 3 per-lane f16/f32 forms refused (#1426 semantics), 1 no heap windows; failing: none. The suite ran on this PC at the same time as 5 other PRs' suites, in one queued job. review: none. Whole diff read (alloc_pool.rs created_on, bind.rs execute_indirect, list_x.rs split() + test, dispatch_chain.rs whole()/retain_whole/resolve_allocator + 2 tests). A split segment made fresh now gets the same alloc_pool tracking a reused spare gets through reset_list, whole() retains its chain on the resolved allocator until allocator_reset, and untracked lists now key retained chains to the caller's allocator instead of key 0 (which no allocator_reset ever cleared). performance: reasoned, not measured: only dispatch-chain (split compute) pipelines; whole() now takes RECORDINGS' lock and scans that allocator's entries once per ExecuteIndirect / whole-fallback dispatch; no cost for other pipelines. verdict: safe to merge hardware / tool and model: Windows 11 build 26300.9974, NVIDIA GeForce RTX 2070 SUPER 8 GB (driver 621.40, wave32 only), AMD Ryzen 5 3600XT; rustc 1.100.1 (20ddd0171 2026-11-25) x86_64-pc-windows-msvc, debug test profile; trial merge f2779e4e28fde51dd3e1c96827f198cd7dcb64cd (local, not pushed). Claude Code: Claude Opus 5.5 (coordination, full-diff review, draft).
Foniass commented 2026-12-01 07:51:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:51:16Z.


Triage (#1607) – head a7b93a8

No open or merged PR makes the same change. The alloc_pool::created_on call for the fresh split segment in list_x::split also appears in commit fb81714 (raylitebull, carried by amd-dev-based PRs), but that does not target main and does not retain whole PSOs or keep the caller's allocator for untracked lists. The PR conflicts with main: since then dispatch_chain has changed a lot (whole(pso) now whole(true) / whole_ready, a new chain-based execute_indirect, and bind.rs no longer calls dispatch_chain::whole). Main still has the recording_backing(..).unwrap_or(0) fallback in dispatch and execute_indirect and does not retain the whole-form chain, so the fix is still needed but must be redone on the new code. No problems found in the diff itself.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7304564218 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2333#issuecomment-7304564218). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T07:51:16Z. --- **Triage (#1607)** – head a7b93a8 No open or merged PR makes the same change. The `alloc_pool::created_on` call for the fresh split segment in `list_x::split` also appears in commit fb81714 (raylitebull, carried by amd-dev-based PRs), but that does not target main and does not retain whole PSOs or keep the caller's allocator for untracked lists. The PR conflicts with main: since then `dispatch_chain` has changed a lot (`whole(pso)` now `whole(true)` / `whole_ready`, a new chain-based `execute_indirect`, and bind.rs no longer calls `dispatch_chain::whole`). Main still has the `recording_backing(..).unwrap_or(0)` fallback in `dispatch` and `execute_indirect` and does not retain the whole-form chain, so the fix is still needed but must be redone on the new code. No problems found in the diff itself. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2333:upstream-pr/2333'
git switch 'upstream-pr/2333'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2333'
git switch 'upstream-pr/2333'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2333'
git switch 'upstream-pr/2333'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2333'
git switch 'main'
git merge --squash 'upstream-pr/2333'
git switch 'main'
git merge --ff-only 'upstream-pr/2333'
git switch 'main'
git merge 'upstream-pr/2333'
git push origin 'main'
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!2323
No description provided.