D3D12.X: drop alloc_pool fences on queue release and skip real::FENCES #1945

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

@⁠Decodere on GitHub · 2026-11-24 23:46 UTC · original
Decodere:fix-1909-alloc-pool-fence-leak → main · +324 −15 · 2 files · 1 commits · open

Stops allocator-pool internal fences from leaking with Refcount: 2 across released command queues.

Two compounding paths kept every fence created in alloc_pool::executed alive after its command queue hit final Release:

  1. Calling d.CreateFence on the adopted title device went through real::dev_create_fence, which permanently AddRefd the fence into real::FENCES (alloc_pool only signals and polls these internal fences and never waits on them, so end_title does not need them).
  2. alloc_pool::State.fences (and State.last_submit, added in #2163) kept the per-queue ID3D12Fence after queue release because real::q_release never notified alloc_pool when a queue's refcount reached zero.

Fixes #1909

What is in it

  • crates/xcl/src/hle/d3d12x/real.rs: add create_pc_fence calling the native CreateFence slot via orig_fn on adopted devices (falling back to dev.CreateFence on unhooked test devices), notify alloc_pool::forget_queue in q_release when n == 0, and expose is_fence as pub(super) for testing.
  • crates/xcl/src/hle/d3d12x/alloc_pool.rs: use real::create_pc_fence in executed, add forget_queue to remove State.fences, prune completed Backing.marks (moving still-pending GPU marks to Backing.retired so queue-address reuse cannot overwrite in-flight work before completion), and prune completed State.last_submit entries for the released queue (clearing last.queue = 0 on still-in-flight entries so queue-address reuse cannot report same_queue in note_resubmits, and reaping orphaned completed entries on subsequent releases). Clear retired on backing reuse in title_reset_in, drop removed/replaced fences outside STATE.lock() in forget_list, forget_queue, and executed, clean up the unadopted list and queue in a_recording_outlives_the_reset_of_the_titles_allocator via forget_list/forget_queue before dropping them so recycled addresses do not inherit stale state across tests, and add CPU (AtomicU64/AtomicU32 fake COM fence) and GPU regression tests (forget_queue_prunes_completed_and_preserves_pending_across_address_reuse and released_queue_frees_alloc_pool_fence_and_skips_title_fences).

Tested

  • NVIDIA GeForce RTX 4060 8 GB (driver 621.14), Intel Core i5-11400F, 32 GB RAM, Windows 11 Home 26200, Rust 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5; release build.
  • Pre-fix reproduction: confirmed released_queue_frees_alloc_pool_fence_and_skips_title_fences fails independently without create_pc_fence (fence registered in real::FENCES) and without q_release → alloc_pool::forget_queue (State.fences and State.last_submit retain released queue's fence), and reproduced the deterministic left: 4, right: 1 test-order failure under --test-threads=1 before adding forget_queue cleanup to a_recording_outlives_the_reset_of_the_titles_allocator.
  • cargo test --release -p xcl --lib hle::d3d12x::alloc_pool::tests:
    • -- --test-threads=1 --nocapture (3 consecutive runs, RTX 4060): 6 passed, 0 failed, 0 ignored each run.
    • -- --test-threads=4 --nocapture (RTX 4060): 6 passed, 0 failed, 0 ignored.
    • XCL_ADAPTER="Microsoft Basic Render Driver" -- --test-threads=1 --nocapture (WARP): 6 passed, 0 failed, 0 ignored.
  • cargo build --release --workspace + cargo test --release --workspace --no-fail-fast -- --test-threads=4 --nocapture: 1243 passed, 2 pre-existing failures on parent 96331383 (fixed on main immediately after in #2245: 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), 46 ignored across 23 test binaries.
  • SKIPPED lines on stderr (27 total):
    • 20 no wave64 (gpu::recomp::lower::tests (4), gpu::recomp::lower_dxil::tests (14), gpu::recomp::tests (2))
    • 3 wave32 per-lane #1426 refusals (gpu::recomp::lower_dxil::tests: f16_programs_on_the_gpu (2), f32_programs_on_the_gpu (1))
    • 1 shaders::tests::pso_measurement_compiles_an_exact_synthetic_record (cannot disable driver cache without Windows Developer Mode)
    • 1 heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows)
    • 2 D3D12 debug-layer tests (test_title_draws_with_a_root_signature_under_the_debug_layer, uploads_start_from_each_subresources_state: no d3d12SDKLayers.dll)

Regression run

main:

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

this PR:

xcl-smoke v1
commit: ace754ce635c06a03068601c12afcdc1ff60770c
gpu: NVIDIA GeForce RTX 4060
title: 29640639
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: 14468 MB

Not tested

  • AMD and Intel GPUs, or wave64-capable hardware (this pass ran on RTX 4060 and WARP only).
  • Running with the D3D12 Debug Layer live-object reporter (d3d12SDKLayers.dll is not installed on this machine), debug-profile full workspace test run, or stacked on top of open #1691's queue-retention fix across multi-cycle synthetic copy workloads; the smoke run above is a regression check only.

AI use

  • Google Antigravity (Gemini 4 Neon): investigated #1909, the CI test-order failure, and the #2163 State.last_submit rebase integration, wrote the fix, CPU/GPU regression tests, and this description, and ran the workspace test suite and paired smoke runs on the hardware listed above.
**@⁠Decodere** on GitHub · 2026-11-24 23:46 UTC · [original](https://github.com/xcl-dev/xcl/pull/1945) `Decodere:fix-1909-alloc-pool-fence-leak` → `main` · +324 −15 · 2 files · 1 commits · open Stops allocator-pool internal fences from leaking with `Refcount: 2` across released command queues. Two compounding paths kept every fence created in `alloc_pool::executed` alive after its command queue hit final `Release`: 1. Calling `d.CreateFence` on the adopted title device went through `real::dev_create_fence`, which permanently `AddRef`d the fence into `real::FENCES` (`alloc_pool` only signals and polls these internal fences and never waits on them, so `end_title` does not need them). 2. `alloc_pool::State.fences` (and `State.last_submit`, added in #2163) kept the per-queue `ID3D12Fence` after queue release because `real::q_release` never notified `alloc_pool` when a queue's refcount reached zero. Fixes #1909 **What is in it** - `crates/xcl/src/hle/d3d12x/real.rs`: add `create_pc_fence` calling the native `CreateFence` slot via `orig_fn` on adopted devices (falling back to `dev.CreateFence` on unhooked test devices), notify `alloc_pool::forget_queue` in `q_release` when `n == 0`, and expose `is_fence` as `pub(super)` for testing. - `crates/xcl/src/hle/d3d12x/alloc_pool.rs`: use `real::create_pc_fence` in `executed`, add `forget_queue` to remove `State.fences`, prune completed `Backing.marks` (moving still-pending GPU marks to `Backing.retired` so queue-address reuse cannot overwrite in-flight work before completion), and prune completed `State.last_submit` entries for the released queue (clearing `last.queue = 0` on still-in-flight entries so queue-address reuse cannot report `same_queue` in `note_resubmits`, and reaping orphaned completed entries on subsequent releases). Clear `retired` on backing reuse in `title_reset_in`, drop removed/replaced fences outside `STATE.lock()` in `forget_list`, `forget_queue`, and `executed`, clean up the unadopted list and queue in `a_recording_outlives_the_reset_of_the_titles_allocator` via `forget_list`/`forget_queue` before dropping them so recycled addresses do not inherit stale state across tests, and add CPU (`AtomicU64`/`AtomicU32` fake COM fence) and GPU regression tests (`forget_queue_prunes_completed_and_preserves_pending_across_address_reuse` and `released_queue_frees_alloc_pool_fence_and_skips_title_fences`). **Tested** - NVIDIA GeForce RTX 4060 8 GB (driver 621.14), Intel Core i5-11400F, 32 GB RAM, Windows 11 Home 26200, Rust 1.100.0 (`stable-x86_64-pc-windows-msvc`), DXC 1.9.2609.5; release build. - Pre-fix reproduction: confirmed `released_queue_frees_alloc_pool_fence_and_skips_title_fences` fails independently without `create_pc_fence` (fence registered in `real::FENCES`) and without `q_release` → `alloc_pool::forget_queue` (`State.fences` and `State.last_submit` retain released queue's fence), and reproduced the deterministic `left: 4, right: 1` test-order failure under `--test-threads=1` before adding `forget_queue` cleanup to `a_recording_outlives_the_reset_of_the_titles_allocator`. - `cargo test --release -p xcl --lib hle::d3d12x::alloc_pool::tests`: - `-- --test-threads=1 --nocapture` (3 consecutive runs, RTX 4060): 6 passed, 0 failed, 0 ignored each run. - `-- --test-threads=4 --nocapture` (RTX 4060): 6 passed, 0 failed, 0 ignored. - `XCL_ADAPTER="Microsoft Basic Render Driver"` `-- --test-threads=1 --nocapture` (WARP): 6 passed, 0 failed, 0 ignored. - `cargo build --release --workspace` + `cargo test --release --workspace --no-fail-fast -- --test-threads=4 --nocapture`: 1243 passed, 2 pre-existing failures on parent `96331383` (fixed on `main` immediately after in #2245: `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`), 46 ignored across 23 test binaries. - `SKIPPED` lines on stderr (27 total): - 20 `no wave64` (`gpu::recomp::lower::tests` (4), `gpu::recomp::lower_dxil::tests` (14), `gpu::recomp::tests` (2)) - 3 wave32 per-lane `#1426` refusals (`gpu::recomp::lower_dxil::tests`: `f16_programs_on_the_gpu` (2), `f32_programs_on_the_gpu` (1)) - 1 `shaders::tests::pso_measurement_compiles_an_exact_synthetic_record` (cannot disable driver cache without Windows Developer Mode) - 1 `heap_window_out_of_memory_falls_back_to_the_switch_form` (`no heap windows`) - 2 D3D12 debug-layer tests (`test_title_draws_with_a_root_signature_under_the_debug_layer`, `uploads_start_from_each_subresources_state`: no `d3d12SDKLayers.dll`) **Regression run** main: ``` xcl-smoke v1 commit: 963313835813f475037b3a9f5fcc3cb591696928 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1526 (PresentX 1526) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14482 MB ``` this PR: ``` xcl-smoke v1 commit: ace754ce635c06a03068601c12afcdc1ff60770c gpu: NVIDIA GeForce RTX 4060 title: 29640639 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: 14468 MB ``` **Not tested** - AMD and Intel GPUs, or wave64-capable hardware (this pass ran on RTX 4060 and WARP only). - Running with the D3D12 Debug Layer live-object reporter (`d3d12SDKLayers.dll` is not installed on this machine), debug-profile full workspace test run, or stacked on top of open `#1691`'s queue-retention fix across multi-cycle synthetic copy workloads; the smoke run above is a regression check only. **AI use** - Google Antigravity (Gemini 4 Neon): investigated #1909, the CI test-order failure, and the #2163 `State.last_submit` rebase integration, wrote the fix, CPU/GPU regression tests, and this description, and ran the workspace test suite and paired smoke runs on the hardware listed above.
Internal per-queue fences created in alloc_pool::executed leaked with
Refcount: 2 across released command queues for two compounding reasons:
1. Calling ID3D12Device::CreateFence on the adopted title device went
   through real::dev_create_fence, which permanently AddRef'd the fence
   into real::FENCES (alloc_pool never waits on these fences, so
   end_title does not need them).
2. alloc_pool::State.fences (and State.last_submit) retained each
   queue's ID3D12Fence forever because real::q_release never notified
   alloc_pool on final release.

Bypass dev_create_fence with real::create_pc_fence (invoking the
original native CreateFence on adopted devices), add
alloc_pool::forget_queue called from real::q_release when n == 0 to drop
State.fences, completed Backing.marks, and completed State.last_submit
entries outside STATE while moving still-pending GPU marks to
Backing.retired and clearing last_submit.queue on in-flight entries so
queue-address reuse cannot clobber or spoof them, and cover both leak
paths with CPU and GPU regression tests.

Fixes #1909
Assisted-by: Google Antigravity (Gemini 4 Neon)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:10:53 +00:00
Author
Owner

@⁠DEViANCEVxXXxM on GitHub · 2026-11-24 23:55 UTC · original

Independent validation — PASS

Tested exact commit 907cf34cc587eb74c763ce87de4911c55037cbf1 on my RTX 3090, driver 621.01, Windows 26H1.

  • All five allocator-pool tests passed.
  • Both new regression tests passed.
  • No skipped GPU tests.
  • No reported device errors.
  • No local source modifications.

I also checked three-way merge compatibility with #1691 (81f6397). The only reported content conflict is in real.rs, inside q_release().

When integrating both PRs, allocator-pool cleanup needs to be preserved on both final-release paths introduced by #1691.

I have a prepared three-cycle synthetic workload with D3D12 live-object reporting that can validate the combined fix once this integration is resolved.

Thanks for addressing #1909!

AI assistance: ChatGPT (GPT-6.2). Synthetic tests only.

**@⁠DEViANCEVxXXxM** on GitHub · 2026-11-24 23:55 UTC · [original](https://github.com/xcl-dev/xcl/pull/1945#issuecomment-7147936230) **Independent validation — PASS** Tested exact commit `907cf34cc587eb74c763ce87de4911c55037cbf1` on my RTX 3090, driver 621.01, Windows 26H1. - All five allocator-pool tests passed. - Both new regression tests passed. - No skipped GPU tests. - No reported device errors. - No local source modifications. I also checked three-way merge compatibility with #1691 (`81f6397`). The only reported content conflict is in `real.rs`, inside `q_release()`. When integrating both PRs, allocator-pool cleanup needs to be preserved on both final-release paths introduced by #1691. I have a prepared three-cycle synthetic workload with D3D12 live-object reporting that can validate the combined fix once this integration is resolved. Thanks for addressing #1909! AI assistance: ChatGPT (GPT-6.2). Synthetic tests only.
Author
Owner

@⁠upipibi on GitHub · 2026-11-24 23:57 UTC · original

Heads-up from reading the diff (not run): alloc_pool::forget_queue goes in the if n == 0 branch of q_release. #1819 and #1899 put their hooks on that same line, so the four PRs conflict there (git merge-tree of this head 907cf34 with each of #1691, #1819 and #1899 reports a conflict).

The other point is when that branch runs. On main, present keeps a reference to every queue the title submitted to (#1668), so a queue the title submitted to rarely gets to n == 0, and forget_queue would rarely run until #1691 is in. #1691 adds a second path, n == 1 && present::forget_queue(this), which releases again and calls list_x::on_queue_release when the count reaches 0. A hook only in the first branch misses that path. Details are in #1899. A single per-queue cleanup function, called from both places where n reaches 0, would let these PRs merge in any order.

AI-assisted (Claude Code).

**@⁠upipibi** on GitHub · 2026-11-24 23:57 UTC · [original](https://github.com/xcl-dev/xcl/pull/1945#issuecomment-7147978597) Heads-up from reading the diff (not run): `alloc_pool::forget_queue` goes in the `if n == 0` branch of `q_release`. #1819 and #1899 put their hooks on that same line, so the four PRs conflict there (`git merge-tree` of this head `907cf34` with each of #1691, #1819 and #1899 reports a conflict). The other point is when that branch runs. On `main`, `present` keeps a reference to every queue the title submitted to (#1668), so a queue the title submitted to rarely gets to `n == 0`, and `forget_queue` would rarely run until #1691 is in. #1691 adds a second path, `n == 1 && present::forget_queue(this)`, which releases again and calls `list_x::on_queue_release` when the count reaches 0. A hook only in the first branch misses that path. Details are in https://git.gtahub.st/github/xcl-dev--xcl/pulls/1899. A single per-queue cleanup function, called from both places where `n` reaches 0, would let these PRs merge in any order. AI-assisted (Claude Code).
Author
Owner

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

Full-suite run, since this PR has no test report yet. Tested exact head 907cf34 (on its base 20cf130).

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::dxil::fuzz_tests: 968 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: forget_queue_prunes_completed_and_preserves_pending_across_address_reuse, released_queue_frees_alloc_pool_fence_and_skips_title_fences.
  • 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: 977 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 62265d3 too, not because of this PR. On NVIDIA: heap_window_out_of_memory_falls_back_to_the_switch_form (#1651) and the four gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu tests (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-24 23:57 UTC · [original](https://github.com/xcl-dev/xcl/pull/1945#issuecomment-7147975903) · edited 2026-11-25 00:11 UTC Full-suite run, since this PR has no test report yet. Tested exact head `907cf34` (on its base `20cf130`). **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::dxil::fuzz_tests`: **968 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: `forget_queue_prunes_completed_and_preserves_pending_across_address_reuse`, `released_queue_frees_alloc_pool_fence_and_skips_title_fences`. - 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`: **977 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 `62265d3` too, not because of this PR. On NVIDIA: `heap_window_out_of_memory_falls_back_to_the_switch_form` (#1651) and the four `gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu` tests ([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

@⁠raylitebull on GitHub · 2026-11-25 01:54 UTC · original

Code review on 907cf34:

  • forget_queue + Backing.retired + create_pc_fence (crates/xcl/src/hle/d3d12x/alloc_pool.rs, real.rs) cleanly handles queue address reuse while marks are still in flight and keeps internal tracking fences out of real::FENCES, with strong unit and GPU test coverage (forget_queue_prunes_completed_and_preserves_pending_across_address_reuse, released_queue_frees_alloc_pool_fence_and_skips_title_fences).
  • Diff audited and CI workflow approved (running). Note #1967 touches the same q_release hook.

Remaining before merge: Build and test finishing green plus AMD verification on 907cf34.

**@⁠raylitebull** on GitHub · 2026-11-25 01:54 UTC · [original](https://github.com/xcl-dev/xcl/pull/1945#issuecomment-7150095168) Code review on `907cf34`: - `forget_queue` + `Backing.retired` + `create_pc_fence` (`crates/xcl/src/hle/d3d12x/alloc_pool.rs`, `real.rs`) cleanly handles queue address reuse while marks are still in flight and keeps internal tracking fences out of `real::FENCES`, with strong unit and GPU test coverage (`forget_queue_prunes_completed_and_preserves_pending_across_address_reuse`, `released_queue_frees_alloc_pool_fence_and_skips_title_fences`). - Diff audited and `CI` workflow approved (running). Note `#1967` touches the same `q_release` hook. **Remaining before merge:** `Build and test` finishing green plus **AMD** verification on `907cf34`.
Author
Owner

@⁠raylitebull on GitHub · 2026-11-25 02:04 UTC · original

CI update on 907cf34:

  • Build and test (Windows, no GPU) failed in hle::d3d12x::alloc_pool::tests::released_queue_frees_alloc_pool_fence_and_skips_title_fences at crates/xcl/src/hle/d3d12x/alloc_pool.rs:646 (left: 4, right: 1 on the no-GPU/WARP runner — likely WARP retaining internal fence references across queue/command work before device destruction).
  • Also note @upipibi's point above about q_release's present::forget_queue(this) branch (n == 1) if #1691 lands alongside this.
**@⁠raylitebull** on GitHub · 2026-11-25 02:04 UTC · [original](https://github.com/xcl-dev/xcl/pull/1945#issuecomment-7150280094) CI update on `907cf34`: - `Build and test (Windows, no GPU)` failed in `hle::d3d12x::alloc_pool::tests::released_queue_frees_alloc_pool_fence_and_skips_title_fences` at `crates/xcl/src/hle/d3d12x/alloc_pool.rs:646` (`left: 4, right: 1` on the no-GPU/WARP runner — likely WARP retaining internal fence references across queue/command work before device destruction). - Also note `@upipibi`'s point above about `q_release`'s `present::forget_queue(this)` branch (`n == 1`) if `#1691` lands alongside this.
Author
Owner

@⁠Decodere on GitHub · 2026-11-25 02:14 UTC · original

@⁠raylitebull Found and fixed the exact cause of the Build and test failure (alloc_pool.rs:646: left: 4, right: 1) and rebased cleanly onto main (3da2abb8) at f5810578:

  • Root cause (signaled == 4 vs 1): Under --test-threads=1 (as on CI), a_recording_outlives_the_reset_of_the_titles_allocator ran earlier without real::adopt(dev), called executed(queue, ...) 3 times, and dropped queue without going through q_release, leaving (q_key -> (fence, 3)) in STATE.fences. When released_queue_frees_alloc_pool_fence_and_skips_title_fences then created a queue at the recycled pointer q_key, executed incremented 3 -> 4 (rather than WARP retaining a fence ref).
  • Fix: Cleaned up forget_queue(queue.as_raw() as usize); before drop(queue); in a_recording_outlives_the_reset_of_the_titles_allocator and added defensive forget_queue(q_key) / forget_queue(q2_key) guards in released_queue_frees_alloc_pool_fence_and_skips_title_fences; runtime code in alloc_pool.rs and real.rs is unchanged from 907cf34.
  • Re-verified (release): Reproduced left: 4, right: 1 deterministically under --test-threads=1; after the fix, hle::d3d12x::alloc_pool::tests passed 5/5 x3 under --test-threads=1 (RTX 4060), 5/5 parallel (RTX 4060), and 5/5 under --test-threads=1 on WARP (XCL_ADAPTER="Microsoft Basic Render Driver"), plus full workspace 1,113 passed, 0 failed, 46 ignored and paired 60 s scripts/smoke.ps1 (1,582 -> 1,547 frames, 0 crashes/removals).
  • #1691 / #1967 note: Checked live main (#1691 is still open so present::forget_queue(this) is not in q_release yet); if #1691 merges first, we will rebase immediately so both paths stay intact on final queue release. (Note futurepro62 also verified the identical runtime fix on AMD Radeon iGPU in #issuecomment-7147975903.)

Ready for CI re-run!

AI use: Google Antigravity (Gemini 4 Neon).

**@⁠Decodere** on GitHub · 2026-11-25 02:14 UTC · [original](https://github.com/xcl-dev/xcl/pull/1945#issuecomment-7150475891) @⁠raylitebull Found and fixed the exact cause of the `Build and test` failure (`alloc_pool.rs:646`: `left: 4, right: 1`) and rebased cleanly onto `main` (`3da2abb8`) at `f5810578`: - **Root cause (`signaled == 4` vs `1`):** Under `--test-threads=1` (as on CI), `a_recording_outlives_the_reset_of_the_titles_allocator` ran earlier without `real::adopt(dev)`, called `executed(queue, ...)` 3 times, and dropped `queue` without going through `q_release`, leaving `(q_key -> (fence, 3))` in `STATE.fences`. When `released_queue_frees_alloc_pool_fence_and_skips_title_fences` then created a queue at the recycled pointer `q_key`, `executed` incremented `3 -> 4` (rather than WARP retaining a fence ref). - **Fix:** Cleaned up `forget_queue(queue.as_raw() as usize);` before `drop(queue);` in `a_recording_outlives_the_reset_of_the_titles_allocator` and added defensive `forget_queue(q_key)` / `forget_queue(q2_key)` guards in `released_queue_frees_alloc_pool_fence_and_skips_title_fences`; runtime code in `alloc_pool.rs` and `real.rs` is unchanged from `907cf34`. - **Re-verified (release):** Reproduced `left: 4, right: 1` deterministically under `--test-threads=1`; after the fix, `hle::d3d12x::alloc_pool::tests` passed `5/5` x3 under `--test-threads=1` (RTX 4060), `5/5` parallel (RTX 4060), and `5/5` under `--test-threads=1` on WARP (`XCL_ADAPTER="Microsoft Basic Render Driver"`), plus full workspace `1,113 passed, 0 failed, 46 ignored` and paired 60 s `scripts/smoke.ps1` (`1,582 -> 1,547` frames, `0` crashes/removals). - **`#1691` / `#1967` note:** Checked live `main` (`#1691` is still open so `present::forget_queue(this)` is not in `q_release` yet); if `#1691` merges first, we will rebase immediately so both paths stay intact on final queue release. (Note `futurepro62` also verified the identical runtime fix on AMD Radeon iGPU in `#issuecomment-7147975903`.) Ready for CI re-run! AI use: Google Antigravity (Gemini 4 Neon).
Author
Owner

@⁠DEViANCEVxXXxM on GitHub · 2026-11-25 02:38 UTC · original

Independent validation of f5810578ae1da2a34808ea6c75373cc9e5b36050 on RTX 3090 / Windows.

  • Release build: successful.
  • Individual allocator-pool tests in separate processes: 5/5 passed.
  • Three runs with --test-threads=1: 15/15 passed.
  • Three runs with --test-threads=5: 15/15 passed.
  • No detected device errors, timeouts, or skipped tests.

Total: 35/35 passed.

The exact upstream revision was tested without source modifications.

The updated test cleanup appears stable in these runs. However, passing repeated tests does not establish the absence of data races or resolve the separate Cell<u64> synchronization concern.

Testing and report analysis assisted by ChatGPT (GPT-6.2).

**@⁠DEViANCEVxXXxM** on GitHub · 2026-11-25 02:38 UTC · [original](https://github.com/xcl-dev/xcl/pull/1945#issuecomment-7150996871) Independent validation of `f5810578ae1da2a34808ea6c75373cc9e5b36050` on RTX 3090 / Windows. - Release build: successful. - Individual allocator-pool tests in separate processes: 5/5 passed. - Three runs with `--test-threads=1`: 15/15 passed. - Three runs with `--test-threads=5`: 15/15 passed. - No detected device errors, timeouts, or skipped tests. Total: **35/35 passed**. The exact upstream revision was tested without source modifications. The updated test cleanup appears stable in these runs. However, passing repeated tests does not establish the absence of data races or resolve the separate `Cell<u64>` synchronization concern. Testing and report analysis assisted by ChatGPT (GPT-6.2).
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 02:50 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. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 02:50 UTC · [original](https://github.com/xcl-dev/xcl/pull/1945#issuecomment-7151255980) 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!
Author
Owner

@⁠DEViANCEVxXXxM on GitHub · 2026-11-25 04:36 UTC · original

Follow-up validation for #1909.

I tested the updated PR revision f581057, both independently and combined with #1691 (81f6397), against main cbc296ab.

Results:

  • All five allocator-pool tests passed.
  • The combined D3D12.X regression suite passed: 181 passed, 0 failed, 2 expected timing tests ignored.
  • 210/210 focused stress test executions passed.
  • 96 completed-fence lifecycle cycles passed.
  • 96 simulated pending-fence lifecycle cycles passed.

The additional cross-PR tests exercised submit tracking and allocator-pool cleanup on the same command queue, with and without an outstanding reader reference.

Verified behavior includes:

  • Internal allocator fences are not registered in real::FENCES.
  • Completed marks are removed on final queue release.
  • Pending marks survive queue release in Backing.retired.
  • Pending marks prevent premature allocator reuse.
  • Retired marks are reclaimed after completion.
  • The internal fence reaches COM reference count zero after cleanup.

Pending completion was modeled using a native D3D12 fence with CPU signaling, rather than deliberately blocking outstanding GPU work.

Integration note: #1691 and #1945 conflict in real.rs::q_release. Moving the final-zero cleanup after #1691's tracking-reference removal preserves both fixes. The resulting combined tree (81f0dbb) passed all the above checks.

The retail-title crash remains present on main, both individual PRs, and the combined build. This should be investigated separately and does not invalidate the allocator lifecycle test results.

AI assistance: ChatGPT (GPT-6.2). All reported builds and tests were executed on actual Windows hardware.

**@⁠DEViANCEVxXXxM** on GitHub · 2026-11-25 04:36 UTC · [original](https://github.com/xcl-dev/xcl/pull/1945#issuecomment-7152992810) Follow-up validation for #1909. I tested the updated PR revision `f581057`, both independently and combined with #1691 (`81f6397`), against main `cbc296ab`. **Results:** - All five allocator-pool tests passed. - The combined D3D12.X regression suite passed: 181 passed, 0 failed, 2 expected timing tests ignored. - 210/210 focused stress test executions passed. - 96 completed-fence lifecycle cycles passed. - 96 simulated pending-fence lifecycle cycles passed. The additional cross-PR tests exercised submit tracking and allocator-pool cleanup on the same command queue, with and without an outstanding reader reference. Verified behavior includes: - Internal allocator fences are not registered in `real::FENCES`. - Completed marks are removed on final queue release. - Pending marks survive queue release in `Backing.retired`. - Pending marks prevent premature allocator reuse. - Retired marks are reclaimed after completion. - The internal fence reaches COM reference count zero after cleanup. Pending completion was modeled using a native D3D12 fence with CPU signaling, rather than deliberately blocking outstanding GPU work. **Integration note:** #1691 and #1945 conflict in `real.rs::q_release`. Moving the final-zero cleanup after #1691's tracking-reference removal preserves both fixes. The resulting combined tree (`81f0dbb`) passed all the above checks. The retail-title crash remains present on main, both individual PRs, and the combined build. This should be investigated separately and does not invalidate the allocator lifecycle test results. AI assistance: ChatGPT (GPT-6.2). All reported builds and tests were executed on actual Windows hardware.
Author
Owner

@⁠Decodere on GitHub · 2026-11-25 11:28 UTC · original

Rebased onto 96331383 (clean against main 426a5a74) -> ace754ce:

  • Resolved the alloc_pool.rs conflict with #2163 (State.last_submit / note_resubmits): forget_queue now also prunes completed State.last_submit entries for the released queue (and completed orphaned entries), zeroes last.queue = 0 on still-in-flight entries so queue-address reuse cannot report same_queue, and drops all removed/replaced COM fence handles outside STATE.lock().
  • Re-verified alloc_pool::tests (6/6 x3 --test-threads=1, 6/6 --test-threads=4, 6/6 WARP) and paired 60 s RTX 4060 smoke (1526 -> 1530 frames, 0 removals/crashes, 14482 -> 14468 MB).

AI use: rebased, tested, and drafted with Google Antigravity (Gemini 4 Neon).

**@⁠Decodere** on GitHub · 2026-11-25 11:28 UTC · [original](https://github.com/xcl-dev/xcl/pull/1945#issuecomment-7161099864) Rebased onto `96331383` (clean against `main` `426a5a74`) -> `ace754ce`: - Resolved the `alloc_pool.rs` conflict with #2163 (`State.last_submit` / `note_resubmits`): `forget_queue` now also prunes completed `State.last_submit` entries for the released queue (and completed orphaned entries), zeroes `last.queue = 0` on still-in-flight entries so queue-address reuse cannot report `same_queue`, and drops all removed/replaced COM fence handles outside `STATE.lock()`. - Re-verified `alloc_pool::tests` (`6/6` x3 `--test-threads=1`, `6/6` `--test-threads=4`, `6/6` WARP) and paired 60 s RTX 4060 smoke (`1526 -> 1530` frames, `0` removals/crashes, `14482 -> 14468 MB`). _AI use: rebased, tested, and drafted with Google Antigravity (Gemini 4 Neon)._
Author
Owner

@⁠thehollowedone on GitHub · 2026-11-25 11:42 UTC · original

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

cargo build --offline --locked --workspace passed on the exact revision. cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --nocapture reported 1,243 passed, 2 failed, 46 ignored. Both failures were the stale assertions fixed by #2245. With this revision merged locally into 426a5a7, the same commands reported 1,245 passed, 0 failed, 46 ignored. Each run had 25 runtime skips included in Cargo's pass count.

I reran the simulated queue-key reuse check with native D3D12 fences. Releasing the old key left its old list marked in flight and cleared the queue identity from that submission. Finishing the newer native submission kept both the older list in flight and the backing busy. Signaling the old fence cleared both conditions, and the next queue cleanup removed the old submission record. No live work was blocked and no allocator was reset.

On the exact revision, cargo test --offline --locked -p xcl --lib released_queue_key_reuse_keeps_the_older_pending_fence -- --test-threads=1 --nocapture passed 1/0/0 with zero skips. Earlier side-by-side check on #1967.

Synthetic coverage only. AI-assisted. Codex (GPT-6, exact variant unavailable) extended the fixture, ran the tests, and drafted this report.

**@⁠thehollowedone** on GitHub · 2026-11-25 11:42 UTC · [original](https://github.com/xcl-dev/xcl/pull/1945#issuecomment-7161392639) Independent Windows run on [ace754c](https://github.com/xcl-dev/xcl/commit/ace754ce635c06a03068601c12afcdc1ff60770c). Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (621.35), Rust 1.99.1 MSVC, debug. `cargo build --offline --locked --workspace` passed on the exact revision. `cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --nocapture` reported **1,243 passed, 2 failed, 46 ignored**. Both failures were the stale assertions fixed by #2245. With this revision merged locally into [426a5a7](https://github.com/xcl-dev/xcl/commit/426a5a745db4d5e4b037449ede0b70cb342f5192), the same commands reported **1,245 passed, 0 failed, 46 ignored**. Each run had 25 runtime skips included in Cargo's pass count. I reran the simulated queue-key reuse check with native D3D12 fences. Releasing the old key left its old list marked in flight and cleared the queue identity from that submission. Finishing the newer native submission kept both the older list in flight and the backing busy. Signaling the old fence cleared both conditions, and the next queue cleanup removed the old submission record. No live work was blocked and no allocator was reset. On the exact revision, `cargo test --offline --locked -p xcl --lib released_queue_key_reuse_keeps_the_older_pending_fence -- --test-threads=1 --nocapture` passed 1/0/0 with zero skips. [Earlier side-by-side check on #1967](https://git.gtahub.st/github/xcl-dev--xcl/pulls/1967). Synthetic coverage only. AI-assisted. Codex (GPT-6, exact variant unavailable) extended the fixture, ran the tests, and drafted this report.
Author
Owner

@⁠Decodere on GitHub · 2026-11-25 22:52 UTC · original

@CalvyPZ Could you please reopen #1945? (GitHub returns HTTP 422 when a non-collaborator PR author attempts to reopen a PR closed by a collaborator.)

  • Both PRs in #1607 group D72 (#1945 and #1967) were closed in the 22:44Z sweep, leaving #1909 open with no active PR.
  • #1607's own D72 row is rated different approaches across all 4 checks (oni-swr, upipibi, iggyvilla, safesearch77), and #1909's comparison (JJAutoCompare) explicitly recommended advancing #1945 over #1967 (ace754ce creates internal allocator-pool fences via the native slot outside real::FENCES, preserves still-pending marks in Backing::retired across queue-address reuse, and prunes State::last_submit).
  • #1945 (ace754ce) is MERGEABLE/CLEAN with green CI and independent RTX 3080 Ti verification (thehollowedone).
**@⁠Decodere** on GitHub · 2026-11-25 22:52 UTC · [original](https://github.com/xcl-dev/xcl/pull/1945#issuecomment-7176878859) `@CalvyPZ` Could you please reopen `#1945`? (GitHub returns `HTTP 422` when a non-collaborator PR author attempts to reopen a PR closed by a collaborator.) - Both PRs in `#1607` group `D72` (`#1945` and `#1967`) were closed in the `22:44Z` sweep, leaving `#1909` open with no active PR. - `#1607`'s own `D72` row is rated `different approaches` across all 4 checks (`oni-swr`, `upipibi`, `iggyvilla`, `safesearch77`), and `#1909`'s comparison (`JJAutoCompare`) explicitly recommended advancing `#1945` over `#1967` (`ace754ce` creates internal allocator-pool fences via the native slot outside `real::FENCES`, preserves still-pending marks in `Backing::retired` across queue-address reuse, and prunes `State::last_submit`). - `#1945` (`ace754ce`) is `MERGEABLE`/`CLEAN` with green CI and independent RTX 3080 Ti verification (`thehollowedone`).
Author
Owner

@⁠upipibi on GitHub · 2026-11-25 06:26 UTC · original · edited 2026-11-26 00:57 UTC

Update, merged with main: ace754c merged --no-ff onto main 08db802 (merge commit 0548a52, clean), same card and settings: cargo test -p xcl --lib -- --skip hle::xaudio2 --test-threads=4: 1302 passed, 0 failed, 27 ignored (the same 25 SKIPPED lines as main); cargo test -p xcl --lib -- hle::d3d12x --test-threads=4, 3 runs: 256 passed, 0 failed each time. This is the merge, not the head: ace754c on its own base still fails the two base tests below until it is rebased.

Update, head ace754c (on base 9633138; RTX 3070, driver 616.56, Windows 11, debug, --skip hle::xaudio2):

  • cargo test -p xcl --lib -- --test-threads=4: 1165 passed, 2 failed, 26 ignored: hle::d3d12x::device_x::tests::pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa ("format 85 kept", left 28, right 85) and gpu::recomp::pso::shader_cache_tests::rerouted_disk_entries_follow_the_direct_translator.
  • cargo test -p xcl --lib -- hle::d3d12x --test-threads=4, 3 runs: 207 passed, 1 failed each time (the pc_resource_desc_… test).
  • Both tests also fail 3 of 3 on the base 9633138 alone, and this PR touches neither file (alloc_pool.rs, real.rs only). main has since changed device_x.rs and pso.rs; on main 08db802 the full suite passes (1295 passed, 0 failed) and the hle::d3d12x filter passed in 2 of 3 runs, with an unrelated a_dispatch_with_a_pipeline_still_building_waits_at_the_submit failure once. So the two failures belong to the base; a rebase onto main should clear them. I haven't run the rebased branch.

Test report at the current head f581057: RTX 3070 (Ampere, driver 616.56), Windows 11, debug.

  • cargo test -p xcl --lib -- hle::d3d12x --test-threads=4, 3 runs: 166 passed, 0 failed each time. main 6ea813a with the same command, alternated with these runs: 177 passed, 0 failed each time.
  • One earlier full cargo test -p xcl --lib -- --test-threads=4 run ended in a device hang (0x887a0006) right after a Wait64BitValueX was bridged to a GPU queue wait. That is the fence area this PR changes, but it didn't come back in the 3 targeted runs above, so I can't attribute it to the PR.
  • XCL_DIRECT_DXIL=1 ... gpu_: 125 passed, 2 failed. Both come from the PR's older base: gpu_fmt_encode_int_sat_and_f16_rtz is fixed on main by #2043, and gpu_image_get_resinfo_1d_array also fails on main (#2046).

AI-assisted (Claude Code). Synthetic tests only.

**@⁠upipibi** on GitHub · 2026-11-25 06:26 UTC · [original](https://github.com/xcl-dev/xcl/pull/1945#issuecomment-7154794162) · edited 2026-11-26 00:57 UTC **Update, merged with `main`:** `ace754c` merged `--no-ff` onto `main` `08db802` (merge commit `0548a52`, clean), same card and settings: `cargo test -p xcl --lib -- --skip hle::xaudio2 --test-threads=4`: 1302 passed, 0 failed, 27 ignored (the same 25 `SKIPPED` lines as `main`); `cargo test -p xcl --lib -- hle::d3d12x --test-threads=4`, 3 runs: 256 passed, 0 failed each time. This is the merge, not the head: `ace754c` on its own base still fails the two base tests below until it is rebased. **Update, head `ace754c`** (on base `9633138`; RTX 3070, driver 616.56, Windows 11, debug, `--skip hle::xaudio2`): - `cargo test -p xcl --lib -- --test-threads=4`: 1165 passed, **2 failed**, 26 ignored: `hle::d3d12x::device_x::tests::pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa` ("format 85 kept", left 28, right 85) and `gpu::recomp::pso::shader_cache_tests::rerouted_disk_entries_follow_the_direct_translator`. - `cargo test -p xcl --lib -- hle::d3d12x --test-threads=4`, 3 runs: 207 passed, 1 failed each time (the `pc_resource_desc_…` test). - Both tests also fail 3 of 3 on the base `9633138` alone, and this PR touches neither file (`alloc_pool.rs`, `real.rs` only). `main` has since changed `device_x.rs` and `pso.rs`; on `main` `08db802` the full suite passes (1295 passed, 0 failed) and the `hle::d3d12x` filter passed in 2 of 3 runs, with an unrelated `a_dispatch_with_a_pipeline_still_building_waits_at_the_submit` failure once. So the two failures belong to the base; a rebase onto `main` should clear them. I haven't run the rebased branch. --- Test report at the current head `f581057`: RTX 3070 (Ampere, driver 616.56), Windows 11, debug. - `cargo test -p xcl --lib -- hle::d3d12x --test-threads=4`, 3 runs: 166 passed, 0 failed each time. `main` `6ea813a` with the same command, alternated with these runs: 177 passed, 0 failed each time. - One earlier full `cargo test -p xcl --lib -- --test-threads=4` run ended in a device hang (`0x887a0006`) right after a `Wait64BitValueX` was bridged to a GPU queue wait. That is the fence area this PR changes, but it didn't come back in the 3 targeted runs above, so I can't attribute it to the PR. - `XCL_DIRECT_DXIL=1 ... gpu_`: 125 passed, 2 failed. Both come from the PR's older base: `gpu_fmt_encode_int_sat_and_f16_rtz` is fixed on `main` by #2043, and `gpu_image_get_resinfo_1d_array` also fails on `main` (#2046). AI-assisted (Claude Code). Synthetic tests only.
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-26 05:51 UTC · original

NVIDIA and AMD full-suite run of head ace754ce, on its own base 9633138 and merged with current main b49be183, to go with the reports above by thehollowedone, upipibi, since none of them covers AMD. On its base, the 3 failures come from changes made on main after that base (#2245 and ea088a5); merged with main, both cards pass. The bare-head runs come first.

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: 1163 passed, 2 failed, 24 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.
  • Failed: gpu::recomp::pso::shader_cache_tests::rerouted_disk_entries_follow_the_direct_translator, hle::d3d12x::device_x::tests::pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa. (stale on this base, fixed on main by #2245; see the merged run below)
  • The new tests ran and passed: forget_queue_prunes_completed_and_preserves_pending_across_address_reuse, released_queue_frees_alloc_pool_fence_and_skips_title_fences.
  • 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: 1172 passed, 3 failed, 26 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))).
  • --skip leaves out tests that fail on main b49be183 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.
  • AMD failures on this base: rerouted_disk_entries_follow_the_direct_translator (#2245), gpu_image_get_resinfo_past_last_level (ea088a5), pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa (#2245).
  • Merged with main b49be183 (git merge --no-ff, clean, local only): NVIDIA XCL_REQUIRE_GPU=mesh cargo test --workspace with the same skips: 1425 passed, 0 failed, 45 ignored; AMD Radeon iGPU (XCL_ADAPTER=radeon, same skips): 1436 passed, 0 failed, 47 ignored.

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-26 05:51 UTC · [original](https://github.com/xcl-dev/xcl/pull/1945#issuecomment-7183865108) NVIDIA and AMD full-suite run of head `ace754ce`, on its own base `9633138` and merged with current `main` `b49be183`, to go with the reports above by thehollowedone, upipibi, since none of them covers AMD. On its base, the 3 failures come from changes made on `main` after that base (#2245 and `ea088a5`); merged with `main`, both cards pass. The bare-head runs come first. **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`: **1163 passed, 2 failed, 24 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`. - Failed: `gpu::recomp::pso::shader_cache_tests::rerouted_disk_entries_follow_the_direct_translator`, `hle::d3d12x::device_x::tests::pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa`. (stale on this base, fixed on `main` by #2245; see the merged run below) - The new tests ran and passed: `forget_queue_prunes_completed_and_preserves_pending_across_address_reuse`, `released_queue_frees_alloc_pool_fence_and_skips_title_fences`. - 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`: **1172 passed, 3 failed, 26 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))). - `--skip` leaves out tests that fail on main `b49be183` 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`. - AMD failures on this base: `rerouted_disk_entries_follow_the_direct_translator` (#2245), `gpu_image_get_resinfo_past_last_level` (`ea088a5`), `pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa` (#2245). - **Merged with `main` `b49be183`** (`git merge --no-ff`, clean, local only): NVIDIA `XCL_REQUIRE_GPU=mesh cargo test --workspace` with the same skips: **1425 passed, 0 failed, 45 ignored**; AMD Radeon iGPU (`XCL_ADAPTER=radeon`, same skips): **1436 passed, 0 failed, 47 ignored**. **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-26 06:41 UTC · original

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

**@⁠DavidM1911** on GitHub · 2026-11-26 06:41 UTC · [original](https://github.com/xcl-dev/xcl/pull/1945#issuecomment-7184683128) 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
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/1945/head:github-bot/gh-1945'
git switch 'github-bot/gh-1945'

Merge

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