D3D12.X: a reused spare keeps the allocator of deferred work still on the GPU #2549

Open
github-bot wants to merge 1 commit from github-bot/gh-2549 into main AGit
Owner

@⁠tiagonleal on GitHub · 2026-11-25 22:41 UTC · original
tiagonleal:own-allocator-kept-until-work-done → main · +68 −1 · 1 files · 1 commits · open

Since #2118 a dispatch whose pipeline is still being built gets a segment of its own, recorded at the submit on an allocator that deferred_segment creates and keeps in the ListState of the recording's first segment (own_alloc). That ListState holds the only reference. When the first segment is a stand-in (#1452: the title reset the list while its last submit was on the GPU), the next Reset puts it among the wrapper's spares. A later split takes the spare as soon as its own submit is done, removes its ListState and drops it, and the allocator is released. on_release keeps such an allocator while alloc_pool::allocator_in_flight says the GPU may still use it; split had no such guard.

The deferred segments can still be running then. With a Wait64BitValueX between the first segment and a deferred dispatch, execute_with_waits_on submits them in two blocks with their own fence values, so the first segment's block can finish while the block with the deferred segment is still waiting for its producer. The GPU then runs a list whose allocator was destroyed.

split now moves own_alloc from the old state of a reused spare into its new one, so the allocator stays with the PC list it belonged to, as it already did while the list was a spare. It is reset again when that list next starts a recording (reset_own_alloc in reset_pc), and released with the list through on_release, which already keeps it while it is in flight. No tracked issue covers this; #2118 added the allocator, and #2320 and #2417 touch the same code without changing how it is kept.

What is in it

  • list_x.rs: split keeps the own_alloc of a spare it reuses; test a_spare_reused_by_a_split_keeps_an_own_allocator_still_on_the_gpu (a spare holding the allocator of a deferred segment held on the GPU by a queue Wait is reused by a split; the allocator must still be referenced, and the device is not removed)

Tested

  • Windows 11 Pro 10.0.26300, NVIDIA GeForce RTX 5070 Ti 16 GB (driver 617.42), AMD Ryzen 7 9800X3D, 32 GB RAM, rustc 1.100.0
  • New test before the fix: cargo test -p xcl --lib a_spare_reused_by_a_split: 0 passed, 1 failed (the allocator's reference count is 2 where 3 is expected: the spare's state had dropped its reference). After the fix, run 5 times: 1 passed, 0 failed each time.
  • cargo test -p xcl --lib -- hle::d3d12x --test-threads=4, run 3 times: 254 passed, 0 failed, 2 ignored in two runs; in one run 253 passed, 1 failed (a_dispatch_with_a_pipeline_still_building_waits_at_the_submit, 289 segments of 421). That test fails the same way now and then on main 6d12f58a without this change (127 of 421 in an earlier run here).
  • cargo build --workspace and cargo test --workspace --no-fail-fast -j 4 -- --test-threads=4, run twice: 1420 passed, 4 failed, 46 ignored both times (25 SKIPPED lines). The 4 failures are gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3, which fail the same way on this machine without this change.

Regression run
60 s each, the same retail title, release builds from clean trees, one after the other.

main (e1d84b7d):

xcl-smoke v1
commit: e1d84b7d9153f86a97d2ec5d209d196046fc0bea
gpu: NVIDIA GeForce RTX 5070 Ti
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1596 (PresentX 1597)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15545 MB

This PR:

xcl-smoke v1
commit: a041834420f21e8d80e3eb76ee85d180b6509993
gpu: NVIDIA GeForce RTX 5070 Ti
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1614 (PresentX 1614)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15652 MB

Not tested

  • Whether the retail title records a deferred dispatch after a Wait64BitValueX on a list with a stand-in first segment: not known. No device removal on the retail title has been traced to this; the fix comes from reading the code and the unit test.
  • The same unguarded drop in on_create (a list created at the address of one whose release was not seen) is left as it is: it needs a lost Release and has no test here.
  • AMD, other drivers, Wine; the debug layer was not run.

AI use

  • Claude Code with Claude Fable 5.2 and Anthropic subagents (Claude Opus 5.5) helped developing.

🤖 Generated with Claude Code

**@⁠tiagonleal** on GitHub · 2026-11-25 22:41 UTC · [original](https://github.com/xcl-dev/xcl/pull/2549) `tiagonleal:own-allocator-kept-until-work-done` → `main` · +68 −1 · 1 files · 1 commits · open Since #2118 a dispatch whose pipeline is still being built gets a segment of its own, recorded at the submit on an allocator that `deferred_segment` creates and keeps in the `ListState` of the recording's first segment (`own_alloc`). That `ListState` holds the only reference. When the first segment is a stand-in (#1452: the title reset the list while its last submit was on the GPU), the next Reset puts it among the wrapper's spares. A later `split` takes the spare as soon as its own submit is done, removes its `ListState` and drops it, and the allocator is released. `on_release` keeps such an allocator while `alloc_pool::allocator_in_flight` says the GPU may still use it; `split` had no such guard. The deferred segments can still be running then. With a `Wait64BitValueX` between the first segment and a deferred dispatch, `execute_with_waits_on` submits them in two blocks with their own fence values, so the first segment's block can finish while the block with the deferred segment is still waiting for its producer. The GPU then runs a list whose allocator was destroyed. `split` now moves `own_alloc` from the old state of a reused spare into its new one, so the allocator stays with the PC list it belonged to, as it already did while the list was a spare. It is reset again when that list next starts a recording (`reset_own_alloc` in `reset_pc`), and released with the list through `on_release`, which already keeps it while it is in flight. No tracked issue covers this; #2118 added the allocator, and #2320 and #2417 touch the same code without changing how it is kept. **What is in it** - `list_x.rs`: `split` keeps the `own_alloc` of a spare it reuses; test `a_spare_reused_by_a_split_keeps_an_own_allocator_still_on_the_gpu` (a spare holding the allocator of a deferred segment held on the GPU by a queue Wait is reused by a split; the allocator must still be referenced, and the device is not removed) **Tested** - Windows 11 Pro 10.0.26300, NVIDIA GeForce RTX 5070 Ti 16 GB (driver 617.42), AMD Ryzen 7 9800X3D, 32 GB RAM, rustc 1.100.0 - New test before the fix: `cargo test -p xcl --lib a_spare_reused_by_a_split`: 0 passed, 1 failed (the allocator's reference count is 2 where 3 is expected: the spare's state had dropped its reference). After the fix, run 5 times: 1 passed, 0 failed each time. - `cargo test -p xcl --lib -- hle::d3d12x --test-threads=4`, run 3 times: 254 passed, 0 failed, 2 ignored in two runs; in one run 253 passed, 1 failed (`a_dispatch_with_a_pipeline_still_building_waits_at_the_submit`, 289 segments of 421). That test fails the same way now and then on `main` 6d12f58a without this change (127 of 421 in an earlier run here). - `cargo build --workspace` and `cargo test --workspace --no-fail-fast -j 4 -- --test-threads=4`, run twice: 1420 passed, 4 failed, 46 ignored both times (25 `SKIPPED` lines). The 4 failures are `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3`, which fail the same way on this machine without this change. **Regression run** 60 s each, the same retail title, release builds from clean trees, one after the other. `main` (e1d84b7d): ``` xcl-smoke v1 commit: e1d84b7d9153f86a97d2ec5d209d196046fc0bea gpu: NVIDIA GeForce RTX 5070 Ti title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1596 (PresentX 1597) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15545 MB ``` This PR: ``` xcl-smoke v1 commit: a041834420f21e8d80e3eb76ee85d180b6509993 gpu: NVIDIA GeForce RTX 5070 Ti title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1614 (PresentX 1614) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15652 MB ``` **Not tested** - Whether the retail title records a deferred dispatch after a `Wait64BitValueX` on a list with a stand-in first segment: not known. No device removal on the retail title has been traced to this; the fix comes from reading the code and the unit test. - The same unguarded drop in `on_create` (a list created at the address of one whose release was not seen) is left as it is: it needs a lost Release and has no test here. - AMD, other drivers, Wine; the debug layer was not run. **AI use** - Claude Code with Claude Fable 5.2 and Anthropic subagents (Claude Opus 5.5) helped developing. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Since #2118 a dispatch whose pipeline is still being built is recorded at
the submit on an allocator kept in the ListState of the recording's first
segment (own_alloc), which holds its only reference. When that first
segment is a stand-in (#1452), the next Reset puts it among the spares, and
a later split reuses it as soon as its own submit is done: split removed and
dropped its ListState, releasing the allocator without the in-flight guard
on_release has. With a Wait64BitValueX between the first segment and the
deferred dispatch, the two are submitted in blocks with their own fence
values, so the deferred segment can still be on the GPU then, recorded on a
destroyed allocator.

split now moves own_alloc from the reused spare's old state into its new
one, so the allocator stays with its PC list as it did while the list was a
spare; reset_pc resets it when that list next starts a recording, and
on_release keeps it while it is in flight.

Test a_spare_reused_by_a_split_keeps_an_own_allocator_still_on_the_gpu:
before the fix 0 passed, 1 failed (reference count 2, expected 3); after it
1 passed in each of 5 runs. cargo test -p xcl --lib -- hle::d3d12x
--test-threads=4, 3 runs: 254 passed, 0 failed, 2 ignored twice; once 253
passed, 1 failed (a_dispatch_with_a_pipeline_still_building_waits_at_the_submit,
segment count 289 of 421, also seen on 6d12f58a without this change).
cargo build --workspace and cargo test --workspace --no-fail-fast -j 4 --
--test-threads=4, twice: 1420 passed, 4 failed, 46 ignored, 25 SKIPPED both
times; the 4 failures are gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3,
failing on this machine without this change too.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:33:32 +00:00
Author
Owner

@⁠xpatfussy69x on GitHub · 2026-11-25 22:57 UTC · original

Test run on exact head a041834 (a041834420f21e8d80e3eb76ee85d180b6509993, on its base e1d84b7, current main), clean tree.

Tested

  • NVIDIA GeForce RTX 3060 12 GB (driver 32.0.16.2124, 32-lane waves only), AMD Ryzen 5 7500F, Windows 11, Rust 1.100.0; debug build for the tests, release for the smoke runs
  • cargo test --workspace -- --test-threads=4: 1424 passed, 0 failed, 46 ignored
  • SKIPPED (25): 21 × no wave64; 1 × no heap windows; 3 × per-lane form refused V_MUL_F16 / V_PK_MUL_F16 / V_CVT_F16_F32 (on main too)
  • cargo test -p xcl --lib a_spare_reused_by_a_split: 1 passed, 0 failed
  • This PR's new tests in the workspace run:
    • a_spare_reused_by_a_split_keeps_an_own_allocator_still_on_the_gpu: ok
  • Conflicts with #2548 in crates/xcl/src/hle/d3d12x/list_x.rs (git merge-tree of both heads); whichever lands second needs a rebase

Regression run (60 s, default settings, a retail title)

main:

xcl-smoke v1
commit: e1d84b7d9153f86a97d2ec5d209d196046fc0bea
gpu: NVIDIA GeForce RTX 3060
title: c3f791f3
seconds: 60
exit: 0x0
frames shown: 1091 (PresentX 1091)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14814 MB

this PR:

xcl-smoke v1
commit: a041834420f21e8d80e3eb76ee85d180b6509993
gpu: NVIDIA GeForce RTX 3060
title: c3f791f3
seconds: 60
exit: 0x0
frames shown: 1099 (PresentX 1099)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14787 MB

No crash or device removal; frames 101 % of main's, peak commit 100 %.

Not tested

  • Whether the title reuses a spare list for a split dispatch in this run: a regression check only
  • AMD / native wave64

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and both smoke runs on the machine above and wrote this report.
**@⁠xpatfussy69x** on GitHub · 2026-11-25 22:57 UTC · [original](https://github.com/xcl-dev/xcl/pull/2549#issuecomment-7176975883) Test run on exact head `a041834` (`a041834420f21e8d80e3eb76ee85d180b6509993`, on its base `e1d84b7`, current `main`), clean tree. **Tested** - NVIDIA GeForce RTX 3060 12 GB (driver 32.0.16.2124, 32-lane waves only), AMD Ryzen 5 7500F, Windows 11, Rust 1.100.0; debug build for the tests, release for the smoke runs - `cargo test --workspace -- --test-threads=4`: 1424 passed, 0 failed, 46 ignored - SKIPPED (25): 21 × no wave64; 1 × no heap windows; 3 × per-lane form refused `V_MUL_F16` / `V_PK_MUL_F16` / `V_CVT_F16_F32` (on `main` too) - `cargo test -p xcl --lib a_spare_reused_by_a_split`: 1 passed, 0 failed - This PR's new tests in the workspace run: - `a_spare_reused_by_a_split_keeps_an_own_allocator_still_on_the_gpu`: ok - Conflicts with #2548 in `crates/xcl/src/hle/d3d12x/list_x.rs` (`git merge-tree` of both heads); whichever lands second needs a rebase **Regression run** (60 s, default settings, a retail title) main: ``` xcl-smoke v1 commit: e1d84b7d9153f86a97d2ec5d209d196046fc0bea gpu: NVIDIA GeForce RTX 3060 title: c3f791f3 seconds: 60 exit: 0x0 frames shown: 1091 (PresentX 1091) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14814 MB ``` this PR: ``` xcl-smoke v1 commit: a041834420f21e8d80e3eb76ee85d180b6509993 gpu: NVIDIA GeForce RTX 3060 title: c3f791f3 seconds: 60 exit: 0x0 frames shown: 1099 (PresentX 1099) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14787 MB ``` No crash or device removal; frames 101 % of `main`'s, peak commit 100 %. **Not tested** - Whether the title reuses a spare list for a split dispatch in this run: a regression check only - AMD / native wave64 **AI use** - Claude Code (Claude Opus 5.5) ran the tests and both smoke runs on the machine above and wrote this report.
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-25 22:55 UTC · original · edited 2026-11-25 23:00 UTC

Full-suite run, since this PR has no test report yet. Tested exact head a041834 (on its base e1d84b7).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 1412 passed, 0 failed, 44 ignored. SKIPPED (no wave64): a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu, a_per_lane_2d_or_3d_group_runs_on_the_gpu, coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu, cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu, dispatch_chain_native_wave64_builds_whole, gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.
  • The new tests ran and passed: a_spare_reused_by_a_split_keeps_an_own_allocator_still_on_the_gpu.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 1423 passed, 0 failed, 46 ignored. SKIPPED: f16_programs_on_the_gpu (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • --skip leaves out tests that fail on main e1d84b7 too, not because of this PR. On NVIDIA: heap_window_out_of_memory_falls_back_to_the_switch_form (#1651), the four gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu tests, const_and_null_mask_operands_agree_with_hlsl_on_the_gpu and mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu (follow-up on #1651) fail because runner::skip_test turns their skips into failures under XCL_REQUIRE_GPU=mesh, and gpu::dxil::fuzz_tests seeds 70, 545, 1019 and 1507 fail CreateComputePipelineState with E_OUTOFMEMORY on this card (drivers 616.64 and 621.40). On AMD: fuzz_validate_and_gpu_1 fails on seed 540 (res[833] 0x7 vs CPU 0x6). The AMD run does not set XCL_REQUIRE_GPU.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-25 22:55 UTC · [original](https://github.com/xcl-dev/xcl/pull/2549#issuecomment-7176947584) · edited 2026-11-25 23:00 UTC Full-suite run, since this PR has no test report yet. Tested exact head `a041834` (on its base `e1d84b7`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests`: **1412 passed, 0 failed, 44 ignored**. SKIPPED (no wave64): `a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu`, `a_per_lane_2d_or_3d_group_runs_on_the_gpu`, `coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu`, `cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu`, `dispatch_chain_native_wave64_builds_whole`, `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`, `the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu`. - The new tests ran and passed: `a_spare_reused_by_a_split_keeps_an_own_allocator_still_on_the_gpu`. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`: **1423 passed, 0 failed, 46 ignored**. SKIPPED: `f16_programs_on_the_gpu` (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), `f32_programs_on_the_gpu` (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), `f32_programs_on_the_gpu` (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - `--skip` leaves out tests that fail on main `e1d84b7` too, not because of this PR. On NVIDIA: `heap_window_out_of_memory_falls_back_to_the_switch_form` (#1651), the four `gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu` tests, `const_and_null_mask_operands_agree_with_hlsl_on_the_gpu` and `mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu` ([follow-up on #1651](https://git.gtahub.st/github/xcl-dev--xcl/issues/1651)) fail because `runner::skip_test` turns their skips into failures under `XCL_REQUIRE_GPU=mesh`, and `gpu::dxil::fuzz_tests` seeds 70, 545, 1019 and 1507 fail `CreateComputePipelineState` with `E_OUTOFMEMORY` on this card (drivers 616.64 and 621.40). On AMD: `fuzz_validate_and_gpu_1` fails on seed 540 (`res[833]` 0x7 vs CPU 0x6). The AMD run does not set `XCL_REQUIRE_GPU`. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 23:06 UTC · original

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

  • cargo test -p xcl --lib: all passed, 0 failed, 26 ignored.

Thanks!

— Devin

**@⁠DavidM1911** on GitHub · 2026-11-25 23:06 UTC · [original](https://github.com/xcl-dev/xcl/pull/2549#issuecomment-7177162184) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 26 ignored. Thanks! — Devin
Author
Owner

@⁠emirduran707 on GitHub · 2026-11-25 23:43 UTC · original

Independent AMD RDNA4 (native wave64) verification of exact PR head a041834420f21e8d80e3eb76ee85d180b6509993 on Windows 11 Pro 26300 (AMD Radeon RX 9060 XT 16 GB, driver 32.0.31044.16, Ryzen 5 5600, Rust 1.100.0 MSVC, DXC 1.9.2602.17).

Tested

  • cargo build --workspace (debug): passed (0 errors).
  • cargo test --workspace --no-fail-fast -- --test-threads=4: 1422 passed, 2 failed, 46 ignored (8 SKIPPED: 6 per-lane DXIL forms refused by host adapter/driver, 1 heap_window_out_of_memory_falls_back_to_the_switch_form no heap windows, 1 pso_measurement_compiles_an_exact_synthetic_record Windows Developer Mode off).
    • The new test hle::d3d12x::list_x::tests::a_spare_reused_by_a_split_keeps_an_own_allocator_still_on_the_gpu passed.
    • The 2 failures (gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 and fuzz_validate_and_gpu_3) are pre-existing on unmodified main on this RX 9060 XT / driver 32.0.31044.16.
  • cargo build --release -p xcl + 60 s retail-title smoke test (scripts/smoke.ps1, offline; first attempt exited early with no frames logged, second 60 s run completed cleanly):
xcl-smoke v1
commit: a041834420f21e8d80e3eb76ee85d180b6509993
gpu: AMD Radeon RX 9060 XT
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1567 (PresentX 1567)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 17703 MB

(Compare against main 08db8020 on this machine: 1553 frames, 13966 MB peak, 0 device removals, 0 crashes.)

Not tested

  • NVIDIA / Intel GPUs, Linux / Wine.

AI use

  • Verification run and report prepared with Antigravity (Gemini 4 Neon); all build, test, and smoke results are from live runs on this machine.
**@⁠emirduran707** on GitHub · 2026-11-25 23:43 UTC · [original](https://github.com/xcl-dev/xcl/pull/2549#issuecomment-7177965976) Independent AMD RDNA4 (native wave64) verification of exact PR head `a041834420f21e8d80e3eb76ee85d180b6509993` on Windows 11 Pro 26300 (AMD Radeon RX 9060 XT 16 GB, driver `32.0.31044.16`, Ryzen 5 5600, Rust 1.100.0 MSVC, DXC `1.9.2602.17`). **Tested** - `cargo build --workspace` (debug): passed (`0` errors). - `cargo test --workspace --no-fail-fast -- --test-threads=4`: `1422 passed, 2 failed, 46 ignored` (`8 SKIPPED`: 6 per-lane DXIL forms refused by host adapter/driver, 1 `heap_window_out_of_memory_falls_back_to_the_switch_form` no heap windows, 1 `pso_measurement_compiles_an_exact_synthetic_record` Windows Developer Mode off). - The new test `hle::d3d12x::list_x::tests::a_spare_reused_by_a_split_keeps_an_own_allocator_still_on_the_gpu` passed. - The 2 failures (`gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` and `fuzz_validate_and_gpu_3`) are pre-existing on unmodified `main` on this RX 9060 XT / driver `32.0.31044.16`. - `cargo build --release -p xcl` + 60 s retail-title smoke test (`scripts/smoke.ps1`, offline; first attempt exited early with no frames logged, second 60 s run completed cleanly): ``` xcl-smoke v1 commit: a041834420f21e8d80e3eb76ee85d180b6509993 gpu: AMD Radeon RX 9060 XT title: 21222967 seconds: 60 exit: 0x0 frames shown: 1567 (PresentX 1567) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 17703 MB ``` (Compare against `main` `08db8020` on this machine: `1553 frames, 13966 MB peak, 0 device removals, 0 crashes`.) **Not tested** - NVIDIA / Intel GPUs, Linux / Wine. **AI use** - Verification run and report prepared with Antigravity (Gemini 4 Neon); all build, test, and smoke results are from live runs on this machine.
Author
Owner

@⁠xpatfussy69x on GitHub · 2026-11-26 00:18 UTC · original

A question on a041834: the moved own_alloc now lives in the state of a split segment, not a recording's first segment. reset_own_alloc runs from reset_pc and deferred_segment reads the first segment's own_alloc, and split segments are reset through alloc_pool::reset_list, so as far as I can see nothing resets the inherited allocator once its GPU work is done. Its split dispatches' scratch (dispatch_chain::RECORDINGS, freed in allocator_reset) would then stay charged against XCL_SPLIT_SCRATCH_TOTAL_MB until that segment's state is removed. Is that intended, or should split reset it (or drop it) once allocator_in_flight says the GPU is done?

AI use: Claude Code (Claude Opus 5.5) reviewed the diff; I checked the reasoning but did not reproduce it.

**@⁠xpatfussy69x** on GitHub · 2026-11-26 00:18 UTC · [original](https://github.com/xcl-dev/xcl/pull/2549#issuecomment-7178617351) A question on `a041834`: the moved `own_alloc` now lives in the state of a split segment, not a recording's first segment. `reset_own_alloc` runs from `reset_pc` and `deferred_segment` reads the first segment's `own_alloc`, and split segments are reset through `alloc_pool::reset_list`, so as far as I can see nothing resets the inherited allocator once its GPU work is done. Its split dispatches' scratch (`dispatch_chain::RECORDINGS`, freed in `allocator_reset`) would then stay charged against `XCL_SPLIT_SCRATCH_TOTAL_MB` until that segment's state is removed. Is that intended, or should `split` reset it (or drop it) once `allocator_in_flight` says the GPU is done? AI use: Claude Code (Claude Opus 5.5) reviewed the diff; I checked the reasoning but did not reproduce it.
Author
Owner

@⁠SlopTart on GitHub · 2026-11-26 05:04 UTC · original

Tested: current PR head merged onto current origin/main (clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo target x86_64-pc-windows-gnu run under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29).

gpu_ suite (cold cache): 165 passed / 3 failed, no crashes. The three are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, promoted-UAV-clear driver gap, PR #2490); none caused by this PR.
Targeted run of a_spare_reused_by_a_split_keeps_an_own_allocator_still_on_the_gpu: passed.

Not tested: retail titles (no title data on this lane, counts only).

AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.

**@⁠SlopTart** on GitHub · 2026-11-26 05:04 UTC · [original](https://github.com/xcl-dev/xcl/pull/2549#issuecomment-7183158868) **Tested**: current PR head merged onto current `origin/main` (clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo target `x86_64-pc-windows-gnu` run under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29). `gpu_` suite (cold cache): 165 passed / 3 failed, no crashes. The three are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, promoted-UAV-clear driver gap, PR #2490); none caused by this PR. Targeted run of `a_spare_reused_by_a_split_keeps_an_own_allocator_still_on_the_gpu`: passed. **Not tested**: retail titles (no title data on this lane, counts only). **AI use**: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.
Author
Owner

@⁠copilot-pull-request-reviewer[bot] on GitHub · 2026-11-25 22:41 UTC · original · reviewed

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

**@⁠copilot-pull-request-reviewer[bot]** on GitHub · 2026-11-25 22:41 UTC · [original](https://github.com/xcl-dev/xcl/pull/2549#pullrequestreview-6065983756) · **reviewed** Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level. An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. [Learn about Copilot code review billing](https://docs.github.com/en/copilot/concepts/agents/code-review#code-review-usage).
Author
Owner

@⁠GodlyBDS on GitHub · 2026-11-26 11:00 UTC · original · edited 2026-11-26 11:08 UTC

RTX 3090 Ti Windows validation of the allocator-lifetime regression

Windows 10, NVIDIA 621.40, Rust 1.98.1 MSVC. Local nvidia-dev af2cecc40886a8682ecf3267f5328c6dc4b66ad7 with the same startup and memory diagnostics on both arms. Backported a041834420f21e8d80e3eb76ee85d180b6509993, adapting the test's list-state access to the NVIDIA branch's per-list shard. The fixture releases the synthetic queue wait before asserting its collected observations.

  • Windows in-box D3D12: a_spare_reused_by_a_split_keeps_an_own_allocator_still_on_the_gpu passes with the two production changes (1 pass, 0 failures, no skips). With those two changes removed, it fails as expected after GPU completion (observed COM count 2, expected 3).
  • Agility SDK v620: the same fixture reaches submission of the gated list, then faults inside split with 0xc0000005 in both the patched and unpatched tree. This predates the backport. Two existing neighboring tests (a_reset_while_the_last_submit_runs_records_on_another_pc_list and a_dispatch_with_a_pipeline_still_building_waits_at_the_submit) passed on the patched tree with the configured SDK directory. Exact cause of the Agility-specific fixture failure remains open.

The unpatched af2 retail run had its render thread in native command-list Reset under record_deferred after the final logged native PSO creation had finished. It was stopped after several minutes with no submits, and did not log device removal. This is a separate observed symptom. The synthetic test confirms the ownership repair, and it does not yet establish a connection to that retail stall. A matched-cache replay with the backport and read-only allocator fence logging is running.

Matched retail replay update. The backport reproduced the same submit-thread native Reset wait on this NVIDIA branch. The last logged native PSO finished at 149.162 s. At 195.037 s the submit thread was in D3D12Core below alloc_pool::reset_list → list_x::record_deferred. Added allocator fence samples show one queue at submitted 6 and completed 5 from 88.317 s through the controlled window close after 323 s. The four other tracked queues were caught up in the static interval. No new device removal was logged. This backport did not resolve that stall in one matched-seed traversal. The pending submission's producer and contributing lifetime remain under investigation. The observed win32u.dll offset is inside that installed binary’s NtGdiDdDDIDestroyAllocation2 export. That places the block in the native allocation-destruction path under Reset, without identifying the destroyed allocation.

AI use: Codex (GPT-6) adapted the backport and fixture, ran these tests and wrote this report.

**@⁠GodlyBDS** on GitHub · 2026-11-26 11:00 UTC · [original](https://github.com/xcl-dev/xcl/pull/2549#issuecomment-7190137295) · edited 2026-11-26 11:08 UTC **RTX 3090 Ti Windows validation of the allocator-lifetime regression** Windows 10, NVIDIA 621.40, Rust 1.98.1 MSVC. Local `nvidia-dev af2cecc40886a8682ecf3267f5328c6dc4b66ad7` with the same startup and memory diagnostics on both arms. Backported `a041834420f21e8d80e3eb76ee85d180b6509993`, adapting the test's list-state access to the NVIDIA branch's per-list shard. The fixture releases the synthetic queue wait before asserting its collected observations. - **Windows in-box D3D12:** `a_spare_reused_by_a_split_keeps_an_own_allocator_still_on_the_gpu` passes with the two production changes (1 pass, 0 failures, no skips). With those two changes removed, it fails as expected after GPU completion (observed COM count 2, expected 3). - **Agility SDK v620:** the same fixture reaches submission of the gated list, then faults inside `split` with `0xc0000005` in both the patched and unpatched tree. This predates the backport. Two existing neighboring tests (`a_reset_while_the_last_submit_runs_records_on_another_pc_list` and `a_dispatch_with_a_pipeline_still_building_waits_at_the_submit`) passed on the patched tree with the configured SDK directory. Exact cause of the Agility-specific fixture failure remains open. The unpatched af2 retail run had its render thread in native command-list Reset under `record_deferred` after the final logged native PSO creation had finished. It was stopped after several minutes with no submits, and did not log device removal. This is a separate observed symptom. The synthetic test confirms the ownership repair, and it does not yet establish a connection to that retail stall. A matched-cache replay with the backport and read-only allocator fence logging is running. **Matched retail replay update.** The backport reproduced the same submit-thread native `Reset` wait on this NVIDIA branch. The last logged native PSO finished at 149.162 s. At 195.037 s the submit thread was in D3D12Core below `alloc_pool::reset_list → list_x::record_deferred`. Added allocator fence samples show one queue at submitted 6 and completed 5 from 88.317 s through the controlled window close after 323 s. The four other tracked queues were caught up in the static interval. No new device removal was logged. This backport did not resolve that stall in one matched-seed traversal. The pending submission's producer and contributing lifetime remain under investigation. The observed `win32u.dll` offset is inside that installed binary’s `NtGdiDdDDIDestroyAllocation2` export. That places the block in the native allocation-destruction path under `Reset`, without identifying the destroyed allocation. AI use: Codex (GPT-6) adapted the backport and fixture, ran these tests and wrote this report.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

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

Merge

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