D3D12.X: release alloc_pool queue fence on queue release #1957

Closed
n-romanovich wants to merge 1 commit from upstream-pr/1967 into main
n-romanovich commented 2026-11-25 00:04:04 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by n-romanovich on 2026-11-25T00:04:04Z.


Fixes #1909.

alloc_pool::State.fences previously retained (ID3D12Fence, u64) per command queue indefinitely with no cleanup when real::q_release released the queue at refcount 0.

This PR adds alloc_pool::on_queue_release(queue), called from real::q_release when n == 0, to drop the queue's retained fence from State.fences and clear any already-completed Backing.marks entries for that queue (while leaving in-flight marks alive until completion/reset).

What is in it

  • crates/xcl/src/hle/d3d12x/alloc_pool.rs: add on_queue_release(queue) and unit test released_queue_drops_retained_fence_from_state.
  • crates/xcl/src/hle/d3d12x/real.rs: call super::alloc_pool::on_queue_release(this as usize) in q_release when n == 0.

Tested
Hardware: Windows 11 x64, NVIDIA GeForce RTX 5060 Ti.

  • cargo test -p xcl --lib alloc_pool -- --test-threads=4: 4 passed, 0 failed, 0 ignored (961 filtered out)
  • cargo test --workspace -- --test-threads=4: 989 passed, 0 failed, 45 ignored
    • SKIPPED: 22 gpu::recomp wave64 / refused per-lane f16 tests (no wave64 / refused per-lane f16), shaders::tests::pso_measurement_compiles_an_exact_synthetic_record (Windows Developer Mode is required, 0x887A002D), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows)

Regression run
Main (5478c4a7c1ae5adba127c8d27018d7fdbf3a8725):

xcl-smoke v1
commit: 5478c4a7c1ae5adba127c8d27018d7fdbf3a8725
gpu: NVIDIA GeForce RTX 5060 Ti
title: FILES
seconds: 60
exit: 0x0
frames shown: 1541 (PresentX 1541)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15701 MB

PR (4fffef38d1edb0be45b3c51859b0f711e7f85098):

xcl-smoke v1
commit: 4fffef38d1edb0be45b3c51859b0f711e7f85098
gpu: NVIDIA GeForce RTX 5060 Ti
title: FILES
seconds: 60
exit: 0x0
frames shown: 1533 (PresentX 1534)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14706 MB

Not tested

  • macOS / Linux (crate targets Windows only).
  • AMD / wave64-capable GPU.

AI use

  • Antigravity (model name not provided): implemented the fix and unit test, ran the test suite and smoke.ps1 runs.
<!-- greyfinch-sync:ivall/xcl:issue:5482494223 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1967). Originally posted by [n-romanovich](https://github.com/n-romanovich) on 2026-11-25T00:04:04Z. --- Fixes #1909. `alloc_pool::State.fences` previously retained `(ID3D12Fence, u64)` per command queue indefinitely with no cleanup when `real::q_release` released the queue at refcount 0. This PR adds `alloc_pool::on_queue_release(queue)`, called from `real::q_release` when `n == 0`, to drop the queue's retained fence from `State.fences` and clear any already-completed `Backing.marks` entries for that queue (while leaving in-flight marks alive until completion/reset). **What is in it** - `crates/xcl/src/hle/d3d12x/alloc_pool.rs`: add `on_queue_release(queue)` and unit test `released_queue_drops_retained_fence_from_state`. - `crates/xcl/src/hle/d3d12x/real.rs`: call `super::alloc_pool::on_queue_release(this as usize)` in `q_release` when `n == 0`. **Tested** Hardware: Windows 11 x64, NVIDIA GeForce RTX 5060 Ti. - `cargo test -p xcl --lib alloc_pool -- --test-threads=4`: 4 passed, 0 failed, 0 ignored (`961 filtered out`) - `cargo test --workspace -- --test-threads=4`: 989 passed, 0 failed, 45 ignored - `SKIPPED`: 22 `gpu::recomp` wave64 / refused per-lane f16 tests (`no wave64` / refused per-lane f16), `shaders::tests::pso_measurement_compiles_an_exact_synthetic_record` (`Windows Developer Mode is required`, `0x887A002D`), `heap_window_out_of_memory_falls_back_to_the_switch_form` (`no heap windows`) **Regression run** Main (`5478c4a7c1ae5adba127c8d27018d7fdbf3a8725`): ``` xcl-smoke v1 commit: 5478c4a7c1ae5adba127c8d27018d7fdbf3a8725 gpu: NVIDIA GeForce RTX 5060 Ti title: FILES seconds: 60 exit: 0x0 frames shown: 1541 (PresentX 1541) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15701 MB ``` PR (`4fffef38d1edb0be45b3c51859b0f711e7f85098`): ``` xcl-smoke v1 commit: 4fffef38d1edb0be45b3c51859b0f711e7f85098 gpu: NVIDIA GeForce RTX 5060 Ti title: FILES seconds: 60 exit: 0x0 frames shown: 1533 (PresentX 1534) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14706 MB ``` **Not tested** - macOS / Linux (crate targets Windows only). - AMD / wave64-capable GPU. **AI use** - Antigravity (model name not provided): implemented the fix and unit test, ran the test suite and `smoke.ps1` runs.
futurepro62 commented 2026-11-25 01:10:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-25T00:26:02Z.


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

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::dxil::fuzz_tests: 978 passed, 0 failed, 43 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, 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: released_queue_drops_retained_fence_from_state.
  • 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: 988 passed, 0 failed, 45 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 80f4819 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 and const_and_null_mask_operands_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.
<!-- greyfinch-sync:ivall/xcl:comment:7148504841 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1967#issuecomment-7148504841). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-25T00:26:02Z. --- Full-suite run, since this PR has no test report yet. Tested exact head `61db31a` (on its base `fc14fab`). **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::dxil::fuzz_tests`: **978 passed, 0 failed, 43 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`, `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: `released_queue_drops_retained_fence_from_state`. - 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`: **988 passed, 0 failed, 45 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 `80f4819` 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 and `const_and_null_mask_operands_agree_with_hlsl_on_the_gpu` ([follow-up on #1651](https://github.com/xcl-dev/xcl/issues/1651#issuecomment-7146069648)) 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.
raylitebull commented 2026-11-25 02:09:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T01:54:19Z.


Code review on 61db31a:

  • Diff audited (crates/xcl/src/hle/d3d12x/alloc_pool.rs, real.rs) and CI workflow approved (running).
  • Note the overlap with #1945 (alloc_pool.rs + q_release): #1945 additionally moves still-pending queue marks into Backing.retired on forget_queue (so a new queue reusing the same address cannot overwrite an in-flight mark) and uses create_pc_fence to bypass real::FENCES. If #1967 moves forward instead, it still needs Build and test green plus AMD verification.
<!-- greyfinch-sync:ivall/xcl:comment:7150094845 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1967#issuecomment-7150094845). Originally posted by [raylitebull](https://github.com/raylitebull) on 2026-11-25T01:54:19Z. --- Code review on `61db31a`: - Diff audited (`crates/xcl/src/hle/d3d12x/alloc_pool.rs`, `real.rs`) and `CI` workflow approved (running). - Note the overlap with `#1945` (`alloc_pool.rs` + `q_release`): `#1945` additionally moves still-pending queue marks into `Backing.retired` on `forget_queue` (so a new queue reusing the same address cannot overwrite an in-flight mark) and uses `create_pc_fence` to bypass `real::FENCES`. If `#1967` moves forward instead, it still needs `Build and test` green plus **AMD** verification.
JJAutoCompare commented 2026-11-25 03:05:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T02:54:59Z.


PR #1967 compatibility verification

Tested 61db31aacab5bcc912eb8426f180ba6881d12d2f on STOR-WINLAB. The allocator-pool regression test passed in both runs. The workspace suite exited 101 with 25 failures.

Environment

Windows 11 Enterprise Evaluation build 26200.9974, Ryzen 7 3800X, Intel Arc A770 16 GiB with driver 32.0.101.9175. Wave range 8–32, DoublePrecisionFloatShaderOps=0, and no d3d12SDKLayers.dll. Rust 1.100.0 (0ef1bc386, 2026-11-09), DXC/DXIL 1.9.2609.5, unoptimized builds with debug info and incremental compilation disabled, XCL_ADAPTER=A770.

Tested

  • cargo build --workspace and cargo test --workspace --no-run succeeded.
  • cargo test -p xcl hle::d3d12x::alloc_pool::tests -- --nocapture reported 4 passed, 0 failed, 0 ignored, and 0 skip markers. released_queue_drops_retained_fence_from_state submitted a D3D12 list, waited for completion, then called the cleanup directly and verified removal of the retained fence and completed backing mark. Source inspection confirmed that q_release calls the cleanup when the native reference count reaches zero.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 ran once under the shared Arc lock. Across 20 result summaries, Cargo reported 964 passed, 25 failed, 45 ignored. The log contained 23 SKIPPED lines. Some tests emit multiple markers, and skipped paths contribute no coverage.

Of the 25 failures, 20 library tests reported CreateComputePipelineState error 0x80070057, and four library tests had result mismatches in fused FMA, implicit-LOD sampling, f16 VALU, and wave reductions. The test-title e2e case failed its RSSetDepthBiasX check (blue pixel, expected green). Skip markers covered 18 wave64 cases, three refused wave32 lowering cases, one driver-cache prerequisite, and one heap-window case.

Not tested

Baseline on main, retail-title smoke, other GPUs, the D3D12 debug layer, or optional XCL_SAMPLE_* data. The focused test did not exercise the release hook directly, an in-flight mark at release, or queue-address reuse.

AI use

T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr1967-suite.log and published this report.

<!-- greyfinch-sync:ivall/xcl:comment:7151354220 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1967#issuecomment-7151354220). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T02:54:59Z. --- # PR #1967 compatibility verification Tested `61db31aacab5bcc912eb8426f180ba6881d12d2f` on STOR-WINLAB. The allocator-pool regression test passed in both runs. The workspace suite exited 101 with 25 failures. **Environment** Windows 11 Enterprise Evaluation build 26200.9974, Ryzen 7 3800X, Intel Arc A770 16 GiB with driver 32.0.101.9175. Wave range 8–32, `DoublePrecisionFloatShaderOps=0`, and no `d3d12SDKLayers.dll`. Rust 1.100.0 (0ef1bc386, 2026-11-09), DXC/DXIL 1.9.2609.5, unoptimized builds with debug info and incremental compilation disabled, `XCL_ADAPTER=A770`. **Tested** - `cargo build --workspace` and `cargo test --workspace --no-run` succeeded. - `cargo test -p xcl hle::d3d12x::alloc_pool::tests -- --nocapture` reported 4 passed, 0 failed, 0 ignored, and 0 skip markers. `released_queue_drops_retained_fence_from_state` submitted a D3D12 list, waited for completion, then called the cleanup directly and verified removal of the retained fence and completed backing mark. Source inspection confirmed that `q_release` calls the cleanup when the native reference count reaches zero. - `cargo test --workspace --no-fail-fast -- --test-threads=4` ran once under the shared Arc lock. Across 20 result summaries, Cargo reported **964 passed, 25 failed, 45 ignored**. The log contained **23 `SKIPPED ` lines**. Some tests emit multiple markers, and skipped paths contribute no coverage. Of the 25 failures, 20 library tests reported `CreateComputePipelineState` error `0x80070057`, and four library tests had result mismatches in fused FMA, implicit-LOD sampling, f16 VALU, and wave reductions. The test-title e2e case failed its `RSSetDepthBiasX` check (blue pixel, expected green). Skip markers covered 18 wave64 cases, three refused wave32 lowering cases, one driver-cache prerequisite, and one heap-window case. **Not tested** Baseline on `main`, retail-title smoke, other GPUs, the D3D12 debug layer, or optional `XCL_SAMPLE_*` data. The focused test did not exercise the release hook directly, an in-flight mark at release, or queue-address reuse. **AI use** T3 Code / Codex (`gpt-6.2-sol`, `reasoningEffort: high`) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, `gemini-4-neon`) verified counts against `pr1967-suite.log` and published this report.
DavidM1911 commented 2026-11-25 04:10:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T03:09:12Z.


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:7151641317 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1967#issuecomment-7151641317). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T03:09:12Z. --- 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!
thehollowedone commented 2026-11-25 12:06:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-25T11:12:00Z.


Independent Windows check on 4fffef3. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (621.35), Rust 1.99.1 MSVC, debug.

The stock allocator-pool tests passed 5/0/0 with zero skips (cargo test --offline --locked -p xcl --lib hle::d3d12x::alloc_pool::tests -- --test-threads=1 --nocapture).

I also tested simulated queue-key reuse with native D3D12 fences. An unsignaled fence represented the old queue. The backing stayed busy after the release callback. After a new native submission under the same key completed, the backing reported free while the old fence was still unsignaled. The same fixture on #1945’s f581057 kept the backing busy until I signaled the old fence.

The scratch check used cargo test --offline --locked -p xcl --lib released_queue_key_reuse_keeps_the_older_pending_fence -- --test-threads=1 --nocapture (with -j 4 on #1945). It failed the busy-state assertion on #1967 and passed 1/0/0 on #1945, with zero skips in both runs. The fixture only queried eligibility. It never reset a busy allocator or blocked live GPU work. AI-assisted. Codex (GPT-6, exact variant unavailable) wrote the fixture, ran the checks, and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7160727046 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1967#issuecomment-7160727046). Originally posted by [thehollowedone](https://github.com/thehollowedone) on 2026-11-25T11:12:00Z. --- Independent Windows check on [4fffef3](https://github.com/xcl-dev/xcl/commit/4fffef38d1edb0be45b3c51859b0f711e7f85098). Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (621.35), Rust 1.99.1 MSVC, debug. The stock allocator-pool tests passed 5/0/0 with zero skips (`cargo test --offline --locked -p xcl --lib hle::d3d12x::alloc_pool::tests -- --test-threads=1 --nocapture`). I also tested simulated queue-key reuse with native D3D12 fences. An unsignaled fence represented the old queue. The backing stayed busy after the release callback. After a new native submission under the same key completed, the backing reported free while the old fence was still unsignaled. The same fixture on [#1945’s f581057](https://github.com/xcl-dev/xcl/pull/1945/commits/f5810578ae1da2a34808ea6c75373cc9e5b36050) kept the backing busy until I signaled the old fence. The scratch check used `cargo test --offline --locked -p xcl --lib released_queue_key_reuse_keeps_the_older_pending_fence -- --test-threads=1 --nocapture` (with `-j 4` on #1945). It failed the busy-state assertion on #1967 and passed 1/0/0 on #1945, with zero skips in both runs. The fixture only queried eligibility. It never reset a busy allocator or blocked live GPU work. AI-assisted. Codex (GPT-6, exact variant unavailable) wrote the fixture, ran the checks, and drafted this report.
thiagocalile commented 2026-11-25 17:07:28 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thiagocalile on 2026-11-25T16:44:55Z.


Independent test report for head 4fffef38d1edb0be45b3c51859b0f711e7f85098 on an AMD Radeon RX 6600 (8 GB VRAM, RDNA2, native wave64).

Tested

  • Hardware: AMD Radeon RX 6600 (8146 MiB VRAM, RDNA2, native wave64 + mesh shaders, driver 32.0.21045.29003, XCL_ADAPTER=radeon), AMD Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (10.0.26200.0), Rust 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.8.2502.11.
  • XCL_ADAPTER=radeon cargo test --no-fail-fast -p xcl --lib -- alloc_pool --test-threads=4: 5 passed, 0 failed, 0 ignored (0 skipped).

Regression run (scripts/smoke.ps1 -Seconds 60, release builds, XCL_ADAPTER=radeon)

main (06c9f55):

xcl-smoke v1
commit: 06c9f5505f63f10c5ec49ef932d75b2c28177324
gpu: AMD Radeon RX 6600
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1469 (PresentX 1469)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13436 MB

PR #1967 (4fffef3):

xcl-smoke v1
commit: 4fffef38d1edb0be45b3c51859b0f711e7f85098
gpu: AMD Radeon RX 6600
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1530 (PresentX 1530)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 17360 MB

Not tested: full workspace test suite on this head, NVIDIA/Intel GPUs, Linux/Wine, or world load past the 60 s smoke window.

AI use: Antigravity (Gemini 4 Neon) ran the builds, tests, and smoke runs and drafted this report; the account owner reviewed and approved posting.

<!-- greyfinch-sync:ivall/xcl:comment:7168470680 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1967#issuecomment-7168470680). Originally posted by [thiagocalile](https://github.com/thiagocalile) on 2026-11-25T16:44:55Z. --- Independent test report for head `4fffef38d1edb0be45b3c51859b0f711e7f85098` on an **AMD Radeon RX 6600** (8 GB VRAM, RDNA2, native wave64). **Tested** - Hardware: AMD Radeon RX 6600 (8146 MiB VRAM, RDNA2, native wave64 + mesh shaders, driver `32.0.21045.29003`, `XCL_ADAPTER=radeon`), AMD Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (`10.0.26200.0`), Rust `1.100.0` (`stable-x86_64-pc-windows-msvc`), DXC `1.8.2502.11`. - `XCL_ADAPTER=radeon cargo test --no-fail-fast -p xcl --lib -- alloc_pool --test-threads=4`: **5 passed, 0 failed, 0 ignored** (`0` skipped). **Regression run** (`scripts/smoke.ps1 -Seconds 60`, release builds, `XCL_ADAPTER=radeon`) `main` (`06c9f55`): ``` xcl-smoke v1 commit: 06c9f5505f63f10c5ec49ef932d75b2c28177324 gpu: AMD Radeon RX 6600 title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 1469 (PresentX 1469) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13436 MB ``` PR `#1967` (`4fffef3`): ``` xcl-smoke v1 commit: 4fffef38d1edb0be45b3c51859b0f711e7f85098 gpu: AMD Radeon RX 6600 title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 1530 (PresentX 1530) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 17360 MB ``` **Not tested:** full workspace test suite on this head, NVIDIA/Intel GPUs, Linux/Wine, or world load past the 60 s smoke window. **AI use:** Antigravity (Gemini 4 Neon) ran the builds, tests, and smoke runs and drafted this report; the account owner reviewed and approved posting.
oni-swr commented 2026-11-25 19:08:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by oni-swr on 2026-11-25T18:05:03Z.


AMD RX 7800 XT run of 4fffef38d1edb0be45b3c51859b0f711e7f85098 (PR head, as-is).

Tested

  • AMD Radeon RX 7800 XT 16 GB (RDNA3, native 64-lane waves), driver 32.0.31035.1003; Ryzen 7 5700X3D; Windows 11 Pro 26200; Rust 1.100.0 MSVC; Windows SDK DXC; debug build
  • cargo test --workspace --no-fail-fast -- --test-threads=4 on the head: lib 1161 passed, 4 failed, 26 ignored; every other test binary passed. The new alloc_pool::tests::released_queue_drops_retained_fence_from_state passed.
  • The 4 failures: gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 fails (seed 722: res[30] = 0x1, CPU 0x7fffffff); it fails the same way on main in my run, so it is not caused by this PR. The other three (pso::shader_cache_tests::rerouted_disk_entries_follow_the_direct_translator, recomp::tests::gpu_image_get_resinfo_past_last_level, d3d12x::device_x::tests::pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa) pass on current main, so I think they come from the old base (5478c4a): the branch is behind main.
  • To check that, I merged the head onto origin/main 68a284a596bd558b6bd9db6eedda6d6aa178c360 locally (clean merge, cargo test -p xcl --lib): 1219 passed, 2 failed, 26 ignored. The 2 failures are the fuzz test above and lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier; plain main gives the same 2 (1218 passed). So no regression from this change on this card.

Not tested

  • scripts/smoke.ps1 regression run on a real title (no title I can use for a posted smoke block), so the runtime-change requirement is not met by this report.
  • NVIDIA, Intel, other AMD generations.

AI use

  • Test report written and run by Claude Code (Claude Sonnet 5.5); no code changed.
<!-- greyfinch-sync:ivall/xcl:comment:7170414558 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1967#issuecomment-7170414558). Originally posted by [oni-swr](https://github.com/oni-swr) on 2026-11-25T18:05:03Z. --- AMD RX 7800 XT run of `4fffef38d1edb0be45b3c51859b0f711e7f85098` (PR head, as-is). **Tested** - AMD Radeon RX 7800 XT 16 GB (RDNA3, native 64-lane waves), driver 32.0.31035.1003; Ryzen 7 5700X3D; Windows 11 Pro 26200; Rust 1.100.0 MSVC; Windows SDK DXC; debug build - `cargo test --workspace --no-fail-fast -- --test-threads=4` on the head: lib **1161 passed, 4 failed, 26 ignored**; every other test binary passed. The new `alloc_pool::tests::released_queue_drops_retained_fence_from_state` passed. - The 4 failures: `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` fails (seed 722: `res[30] = 0x1, CPU 0x7fffffff`); it fails the same way on `main` in my run, so it is not caused by this PR. The other three (`pso::shader_cache_tests::rerouted_disk_entries_follow_the_direct_translator`, `recomp::tests::gpu_image_get_resinfo_past_last_level`, `d3d12x::device_x::tests::pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa`) pass on current main, so I think they come from the old base (`5478c4a`): the branch is behind main. - To check that, I merged the head onto `origin/main` `68a284a596bd558b6bd9db6eedda6d6aa178c360` locally (clean merge, `cargo test -p xcl --lib`): **1219 passed, 2 failed, 26 ignored**. The 2 failures are the fuzz test above and `lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier`; plain `main` gives the same 2 (1218 passed). So no regression from this change on this card. **Not tested** - `scripts/smoke.ps1` regression run on a real title (no title I can use for a posted smoke block), so the runtime-change requirement is not met by this report. - NVIDIA, Intel, other AMD generations. **AI use** - Test report written and run by Claude Code (Claude Sonnet 5.5); no code changed.
upipibi commented 2026-11-25 19:09:19 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by upipibi on 2026-11-25T19:05:08Z.


NVIDIA test report for 4fffef3. RTX 3070 8 GB (Ampere, 32-lane waves), driver 616.56, Windows 11, debug, after cargo build --workspace, cargo test --workspace --no-fail-fast -- --test-threads=4 --skip hle::xaudio2:

  • As is (base 5478c4a): 1217 passed, 2 failed, 46 ignored. The two are gpu::recomp::pso::shader_cache_tests::rerouted_disk_entries_follow_the_direct_translator and hle::d3d12x::device_x::tests::pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa. Both are stale test expectations that main fixed in 0d13b071, which this PR's base doesn't have. The PR only touches alloc_pool.rs and real.rs, so a rebase onto main fixes both.
  • Merged onto main at 569f0fc: 1320 passed, 1 failed, 46 ignored. The one failure is gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier.
  • main at 569f0fc alone, same machine and command: 1319 passed, 1 failed, 46 ignored, the same test. #2420 (merged 18:45Z) fixed that test on main; main at 2898511 is green. So the merge adds one passing test and no failure.
  • Skipped hle::xaudio2, because its tests fail or hang on this machine on main too. SKIPPED lines: 26 in the merged run, the same as on main.

AI-assisted (Claude Code, Claude Opus 5.5). Synthetic tests only; no title run.

<!-- greyfinch-sync:ivall/xcl:comment:7171798963 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1967#issuecomment-7171798963). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-25T19:05:08Z. --- NVIDIA test report for `4fffef3`. RTX 3070 8 GB (Ampere, 32-lane waves), driver 616.56, Windows 11, debug, after `cargo build --workspace`, `cargo test --workspace --no-fail-fast -- --test-threads=4 --skip hle::xaudio2`: - **As is** (base `5478c4a`): 1217 passed, 2 failed, 46 ignored. The two are `gpu::recomp::pso::shader_cache_tests::rerouted_disk_entries_follow_the_direct_translator` and `hle::d3d12x::device_x::tests::pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa`. Both are stale test expectations that `main` fixed in `0d13b071`, which this PR's base doesn't have. The PR only touches `alloc_pool.rs` and `real.rs`, so a rebase onto `main` fixes both. - **Merged onto `main` at `569f0fc`:** 1320 passed, 1 failed, 46 ignored. The one failure is `gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier`. - **`main` at `569f0fc`** alone, same machine and command: 1319 passed, 1 failed, 46 ignored, the same test. #2420 (merged 18:45Z) fixed that test on `main`; `main` at `2898511` is green. So the merge adds one passing test and no failure. - Skipped `hle::xaudio2`, because its tests fail or hang on this machine on `main` too. SKIPPED lines: 26 in the merged run, the same as on `main`. AI-assisted (Claude Code, Claude Opus 5.5). Synthetic tests only; no title run.
bmjask commented 2026-11-25 21:33:32 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-11-25T21:33:32Z.

Review: COMMENTED


P1 queue-address reuse: on_queue_release removes State.fences[queue] but leaves incomplete backing marks keyed by raw queue address. If new queue reuses address before old work completes, executed() creates new fence and b.marks.insert overwrites old incomplete mark, allowing backing reuse while old queue still uses it. Key marks by queue generation/fence identity or retain multiple marks; add release-with-incomplete-submit then same-address-reuse regression. Current test waits completion before release and misses this.

<!-- greyfinch-sync:ivall/xcl:review:6065276527 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1967#pullrequestreview-6065276527). Originally posted by [bmjask](https://github.com/bmjask) on 2026-11-25T21:33:32Z. **Review:** COMMENTED --- P1 queue-address reuse: on_queue_release removes State.fences[queue] but leaves incomplete backing marks keyed by raw queue address. If new queue reuses address before old work completes, executed() creates new fence and b.marks.insert overwrites old incomplete mark, allowing backing reuse while old queue still uses it. Key marks by queue generation/fence identity or retain multiple marks; add release-with-incomplete-submit then same-address-reuse regression. Current test waits completion before release and misses this.
upstream-sync closed this pull request 2026-11-25 23:07:54 +00:00
CalvyPZ commented 2026-11-25 23:09:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by CalvyPZ on 2026-11-25T22:44:08Z.


This PR has been marked as a duplicate and closed after multiple agreeing checks in #1607. If you believe this is incorrect please re-open with why.

<!-- greyfinch-sync:ivall/xcl:comment:7176725138 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1967#issuecomment-7176725138). Originally posted by [CalvyPZ](https://github.com/CalvyPZ) on 2026-11-25T22:44:08Z. --- This PR has been marked as a duplicate and closed after multiple agreeing checks in #1607. If you believe this is incorrect please re-open with why.
upstream-sync reopened this pull request 2026-11-26 00:04:46 +00:00
LocranKing commented 2026-11-26 05:05:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by LocranKing on 2026-11-26T04:48:50Z.


Independent NVIDIA test report on exact head 4fffef38d1edb0be45b3c51859b0f711e7f85098 (clean detached checkout, no local changes).

Tested

  • Hardware: NVIDIA GeForce RTX 3060 Ti 8 GB (Ampere, wave32, driver 32.0.16.2140 / 621.40), AMD Ryzen 5 5500, 32 GB RAM, Windows 11 Home (build 26300), Rust 1.100.0 (stable-x86_64-pc-windows-msvc), Windows SDK 10.0.26100.0.
  • cargo build --workspace + cargo test --workspace --no-fail-fast -- --test-threads=4 (debug): 1226 passed, 2 failed, 46 ignored (xcl --lib: 1163 passed, 2 failed, 26 ignored).
    • Both failures are pre-existing on the PR's older main base (08db802) and pass on current main (b49be18):
      • gpu::recomp::pso::shader_cache_tests::rerouted_disk_entries_follow_the_direct_translator (left: 68, right: 1)
      • hle::d3d12x::device_x::tests::pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa (left: 28, right: 85)
    • All alloc_pool, integration, and e2e tests passed.
  • 26 SKIPPED GPU tests on this adapter: 20 wave64-only (no wave64), 3 wave32 per-lane f16/f32 semantics, 1 no heap windows, 1 no d3d12SDKLayers.dll, 1 cannot disable driver cache without Developer Mode (0x887A002D).

Regression run
scripts/smoke.ps1 -Seconds 60, release builds of origin/main (b49be18) and this PR's head (4fffef38):

main:

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

PR:

xcl-smoke v1
commit: 4fffef38d1edb0be45b3c51859b0f711e7f85098
gpu: NVIDIA GeForce RTX 3060 Ti
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1569 (PresentX 1569)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14489 MB

Not tested

  • AMD / Intel / Linux GPUs; XCL_SAMPLE_* tests; the 60 s smoke run covers boot/intro/menus and does not enter the 3D world.

AI use

  • Antigravity (Gemini 4 Hydrogen) ran the builds, test suite, and smoke.ps1 commands on this machine and drafted this report from the captured outputs.
<!-- greyfinch-sync:ivall/xcl:comment:7182925065 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1967#issuecomment-7182925065). Originally posted by [LocranKing](https://github.com/LocranKing) on 2026-11-26T04:48:50Z. --- Independent NVIDIA test report on exact head `4fffef38d1edb0be45b3c51859b0f711e7f85098` (clean detached checkout, no local changes). **Tested** - Hardware: NVIDIA GeForce RTX 3060 Ti 8 GB (Ampere, wave32, driver `32.0.16.2140` / 621.40), AMD Ryzen 5 5500, 32 GB RAM, Windows 11 Home (build 26300), Rust 1.100.0 (`stable-x86_64-pc-windows-msvc`), Windows SDK `10.0.26100.0`. - `cargo build --workspace` + `cargo test --workspace --no-fail-fast -- --test-threads=4` (debug): 1226 passed, 2 failed, 46 ignored (`xcl --lib`: 1163 passed, 2 failed, 26 ignored). - Both failures are pre-existing on the PR's older `main` base (`08db802`) and pass on current `main` (`b49be18`): - `gpu::recomp::pso::shader_cache_tests::rerouted_disk_entries_follow_the_direct_translator` (`left: 68, right: 1`) - `hle::d3d12x::device_x::tests::pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa` (`left: 28, right: 85`) - All `alloc_pool`, integration, and `e2e` tests passed. - 26 `SKIPPED` GPU tests on this adapter: 20 wave64-only (`no wave64`), 3 wave32 per-lane f16/f32 semantics, 1 `no heap windows`, 1 `no d3d12SDKLayers.dll`, 1 cannot disable driver cache without Developer Mode (`0x887A002D`). **Regression run** `scripts/smoke.ps1 -Seconds 60`, release builds of `origin/main` (`b49be18`) and this PR's head (`4fffef38`): main: ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 3060 Ti title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1409 (PresentX 1409) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14032 MB ``` PR: ``` xcl-smoke v1 commit: 4fffef38d1edb0be45b3c51859b0f711e7f85098 gpu: NVIDIA GeForce RTX 3060 Ti title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1569 (PresentX 1569) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14489 MB ``` **Not tested** - AMD / Intel / Linux GPUs; `XCL_SAMPLE_*` tests; the 60 s smoke run covers boot/intro/menus and does not enter the 3D world. **AI use** - Antigravity (Gemini 4 Hydrogen) ran the builds, test suite, and `smoke.ps1` commands on this machine and drafted this report from the captured outputs.
DavidM1911 commented 2026-11-26 07:03:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T06:51:34Z.


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

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7184853561 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1967#issuecomment-7184853561). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T06:51:34Z. --- Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
throny commented 2026-11-27 20:52:36 +00:00 (Migrated from github.com)

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


merge-check claim
head: 4fffef38d1

<!-- greyfinch-sync:ivall/xcl:comment:7227923113 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1967#issuecomment-7227923113). Originally posted by [throny](https://github.com/throny) on 2026-11-27T20:52:36Z. --- merge-check claim head: 4fffef38d1edb0be45b3c51859b0f711e7f85098
throny commented 2026-11-27 21:10:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-27T21:10:37Z.


merge-check
base: 6089122a
head: 4fffef38d1
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1466 passed, 0 failed, 47 ignored (26 SKIPPED lines); base alone: 1465 passed, 0 failed, 47 ignored
review: open from the thread and still present on this head: queue-address reuse. After a release, the next execute on a queue at the same address makes a new fence under the same key, and the insert overwrites a mark of the old queue that is still pending; free() and allocator_in_flight then no longer see that work (raised as P1 earlier and confirmed there with a scratch test; read in the code here, not reproduced). The test waits for completion before the release, so it does not reach this case. What it does right: only completed marks are removed, so it does not hide pending work the way #1945's retired list does. Also: on main the presenter keeps a reference to every submitting queue, so this cleanup does not run for them until #1691 lands; and fences made through the hooked device are kept in another table (not verified by a run). #1945 does the same job and the two conflict in alloc_pool.rs and real.rs: one of them.
performance: one scan of the backings per queue release (reasoned).
verdict: not yet: decide between this and #1945; here it needs the address-reuse fix and a test of it.
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:7228205260 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1967#issuecomment-7228205260). Originally posted by [throny](https://github.com/throny) on 2026-11-27T21:10:37Z. --- merge-check base: 6089122a head: 4fffef38d1edb0be45b3c51859b0f711e7f85098 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1466 passed, 0 failed, 47 ignored (26 SKIPPED lines); base alone: 1465 passed, 0 failed, 47 ignored review: open from the thread and still present on this head: queue-address reuse. After a release, the next execute on a queue at the same address makes a new fence under the same key, and the insert overwrites a mark of the old queue that is still pending; free() and allocator_in_flight then no longer see that work (raised as P1 earlier and confirmed there with a scratch test; read in the code here, not reproduced). The test waits for completion before the release, so it does not reach this case. What it does right: only completed marks are removed, so it does not hide pending work the way #1945's retired list does. Also: on main the presenter keeps a reference to every submitting queue, so this cleanup does not run for them until #1691 lands; and fences made through the hooked device are kept in another table (not verified by a run). #1945 does the same job and the two conflict in alloc_pool.rs and real.rs: one of them. performance: one scan of the backings per queue release (reasoned). verdict: not yet: decide between this and #1945; here it needs the address-reuse fix and a test of it. 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:54 +00:00 (Migrated from github.com)

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


merge-check claim
head: 4fffef38d1

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

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


merge-check
base: 2c717a043c
head: 4fffef38d1
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1467 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 on_queue_release + 1 test, real.rs q_release). On the final queue release its retained internal fence is dropped from State.fences and its completed backing marks are cleared; pending marks stay. Note: #1945 changes the same q_release line and covers the same cleanup more fully (pending marks, last_submit); the two conflict.
performance: reasoned, not measured: queue release only; no per-frame cost.
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 79dfca9ba40adcd09a79bb4d5dec0f15c4bb8f0d (local, not pushed). Claude Code: Claude Opus 5.5 (coordination, full-diff review, draft).

<!-- greyfinch-sync:ivall/xcl:comment:7231480308 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1967#issuecomment-7231480308). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-11-28T01:10:58Z. --- merge-check base: 2c717a043c8488938179fca81da4bb9e7913a358 head: 4fffef38d1edb0be45b3c51859b0f711e7f85098 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1467 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 on_queue_release + 1 test, real.rs q_release). On the final queue release its retained internal fence is dropped from State.fences and its completed backing marks are cleared; pending marks stay. Note: #1945 changes the same q_release line and covers the same cleanup more fully (pending marks, last_submit); the two conflict. performance: reasoned, not measured: queue release only; no per-frame cost. 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 79dfca9ba40adcd09a79bb4d5dec0f15c4bb8f0d (local, not pushed). Claude Code: Claude Opus 5.5 (coordination, full-diff review, draft).
akimfomin commented 2026-11-28 01:31:32 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by akimfomin on 2026-11-28T01:31:32Z.


Pinned pair check: 4fffef38d and #1899 conflict in real.rs even though the ordinary individual merge is clean. Both cleanup consumers need the final-release notification if they land together. The control is borrowed reference release versus final release, followed by reuse of the queue address: live cache state should survive the first release, both old entries should disappear on the second. This is a source/Git review of the pair.

<!-- greyfinch-sync:ivall/xcl:comment:7231727207 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1967#issuecomment-7231727207). Originally posted by [akimfomin](https://github.com/akimfomin) on 2026-11-28T01:31:32Z. --- Pinned pair check: `4fffef38d` and [#1899](https://github.com/xcl-dev/xcl/pull/1899) conflict in `real.rs` even though the ordinary individual merge is clean. Both cleanup consumers need the final-release notification if they land together. The control is borrowed reference release versus final release, followed by reuse of the queue address: live cache state should survive the first release, both old entries should disappear on the second. This is a source/Git review of the pair.
vakaobr commented 2026-11-29 16:08:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by vakaobr on 2026-11-29T16:08:50Z.


Mac test of 4fffef3 (D3DMetal): alloc_pool::tests 5 passed, 0 failed, including released_queue_drops_retained_fence_from_state, on the PR head as is (it no longer merges cleanly with main).

Tested

  • MacBook Pro M5 Pro, macOS 27.2.1, CrossOver 26.3 (Wine) with D3DMetal; Rust 1.100, x86_64-pc-windows-gnu, debug.
  • cargo test -p xcl --lib alloc_pool::tests -- --test-threads=1 (the test binary run under CrossOver): 5 passed, 0 failed.

Not tested

  • Windows (others have), the whole suite, the change merged with current main, a title run.

AI use: Claude Code with Claude Opus 5.5 ran the tests on my Mac and drafted this report. I checked it before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7258654182 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1967#issuecomment-7258654182). Originally posted by [vakaobr](https://github.com/vakaobr) on 2026-11-29T16:08:50Z. --- **Mac test of `4fffef3` (D3DMetal):** `alloc_pool::tests` 5 passed, 0 failed, including `released_queue_drops_retained_fence_from_state`, on the PR head as is (it no longer merges cleanly with `main`). **Tested** - MacBook Pro M5 Pro, macOS 27.2.1, CrossOver 26.3 (Wine) with D3DMetal; Rust 1.100, `x86_64-pc-windows-gnu`, debug. - `cargo test -p xcl --lib alloc_pool::tests -- --test-threads=1` (the test binary run under CrossOver): 5 passed, 0 failed. **Not tested** - Windows (others have), the whole suite, the change merged with current `main`, a title run. **AI use:** Claude Code with Claude Opus 5.5 ran the tests on my Mac and drafted this report. I checked it before posting.
Foniass commented 2026-12-01 07:09:46 +00:00 (Migrated from github.com)

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


Triage (#1607) – head 4fffef3

Main now does what this PR does. Commit 4a4c5f7b added alloc_pool::forget_queue(QueueId), which present::invalidate_queue_caches runs from the queue retirement worker once a released queue's GPU work is done. It removes the queue's entry from State.fences, its marks on every backing and its last_submit entries.
That covers on_queue_release here, and it does so after GPU completion instead of at refcount 0. #1945 also touches this, and adds the FENCES part of #1909 that is still missing.
Recommendation: close (superseded by main commit 4a4c5f7b).

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:7303717602 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1967#issuecomment-7303717602). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T07:09:46Z. --- **Triage (#1607)** – head 4fffef3 Main now does what this PR does. Commit 4a4c5f7b added `alloc_pool::forget_queue(QueueId)`, which `present::invalidate_queue_caches` runs from the queue retirement worker once a released queue's GPU work is done. It removes the queue's entry from `State.fences`, its `marks` on every backing and its `last_submit` entries. That covers `on_queue_release` here, and it does so after GPU completion instead of at refcount 0. #1945 also touches this, and adds the `FENCES` part of #1909 that is still missing. Recommendation: close (superseded by main commit 4a4c5f7b). AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
throny commented 2026-12-01 12:50:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-12-01T12:50:06Z.


Closing as superseded: this change is already on main (4a4c5f7b). main alloc_pool::forget_queue (called from present::invalidate_queue_caches) removes State.fences, backing marks and last_submit for the queue; superset of PR's on_queue_release

Two independent checks found this: Foniass's close list on #1607 and ours against current main. If something here is still missing on main, say so and reopen it, or ask and I will.

AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents.

<!-- greyfinch-sync:ivall/xcl:comment:7311714618 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1967#issuecomment-7311714618). Originally posted by [throny](https://github.com/throny) on 2026-12-01T12:50:06Z. --- Closing as superseded: this change is already on `main` (4a4c5f7b). main alloc_pool::forget_queue (called from present::invalidate_queue_caches) removes State.fences, backing marks and last_submit for the queue; superset of PR's on_queue_release Two independent checks found this: Foniass's close list on #1607 and ours against current `main`. If something here is still missing on `main`, say so and reopen it, or ask and I will. AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!1957
No description provided.