D3D12.X: a buffer released during a placement keeps the new one (#2457) #2518

Closed
xpatfussy69x wants to merge 1 commit from upstream-pr/2528 into main
xpatfussy69x commented 2026-11-25 21:45:54 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by xpatfussy69x on 2026-11-25T21:45:54Z.


Part of #2457 (item 2 only; item 1 is claimed on the issue). place_buffer holds the sparse STATE across CreateReservedResource. A placed buffer whose last Release runs meanwhile cannot take STATE, so forget_buffer queues it in FORGOTTEN for the next lock_state. When the new reserved resource gets the released one's address, place_buffer recorded the new buffer under it, and the next lock_state let it go: its tiles were unpinned while the buffer was live on the GPU. The new buffer is now recorded by record_buffer, which lets the queued buffers go first (the issue's second fix direction).

What is in it

  • crates/xcl/src/hle/d3d12x/sparse.rs: record_buffer (pins the new buffer's tiles and records it, after forget_released); place_buffer uses it
  • crates/xcl/src/hle/d3d12x/sparse.rs: a_buffer_released_during_a_placement_does_not_take_the_new_one_with_it: an old buffer at an address is queued as released, a new one is recorded there, then lock_state's drain runs. Fails without the fix (the new buffer's entry is gone), passes with it. test_state() builds a State over a D3D12 device (WARP without a GPU) as a_pool_retired_a_moment_ago_is_taken_back does

Tested

  • NVIDIA GeForce RTX 3060 (driver 32.0.16.2124, 32-lane waves only), AMD Ryzen 5 7500F, Windows 11, Rust 1.100.0, debug build for the tests, release for the smoke runs
  • cargo test --workspace -- --test-threads=4: 1424 passed, 0 failed, 46 ignored
  • SKIPPED (25): 21 × no wave64; 1 × no heap windows; 3 × per-lane form refused V_MUL_F16 / V_PK_MUL_F16 / V_CVT_F16_F32 (on main too; #2182 removes them)
  • cargo test -p xcl --lib d3d12x::sparse: 18 passed, 0 failed, 1 ignored

Regression run

main:

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

PR:

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

Not tested

  • The race itself in a title: the test drives the bookkeeping directly, and the smoke run does not show whether a release ever landed during a placement at the same address. A regression check only
  • AMD / native wave64

AI use

  • Claude Code, Claude Opus 5.5: wrote the fix, the test and this description, ran the tests and both smoke runs on the hardware above
<!-- greyfinch-sync:ivall/xcl:issue:5499710886 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2528). Originally posted by [xpatfussy69x](https://github.com/xpatfussy69x) on 2026-11-25T21:45:54Z. --- Part of #2457 (item 2 only; item 1 is claimed on the issue). `place_buffer` holds the sparse `STATE` across `CreateReservedResource`. A placed buffer whose last `Release` runs meanwhile cannot take `STATE`, so `forget_buffer` queues it in `FORGOTTEN` for the next `lock_state`. When the new reserved resource gets the released one's address, `place_buffer` recorded the new buffer under it, and the next `lock_state` let it go: its tiles were unpinned while the buffer was live on the GPU. The new buffer is now recorded by `record_buffer`, which lets the queued buffers go first (the issue's second fix direction). **What is in it** - `crates/xcl/src/hle/d3d12x/sparse.rs`: `record_buffer` (pins the new buffer's tiles and records it, after `forget_released`); `place_buffer` uses it - `crates/xcl/src/hle/d3d12x/sparse.rs`: `a_buffer_released_during_a_placement_does_not_take_the_new_one_with_it`: an old buffer at an address is queued as released, a new one is recorded there, then `lock_state`'s drain runs. Fails without the fix (the new buffer's entry is gone), passes with it. `test_state()` builds a `State` over a D3D12 device (WARP without a GPU) as `a_pool_retired_a_moment_ago_is_taken_back` does **Tested** - NVIDIA GeForce RTX 3060 (driver 32.0.16.2124, 32-lane waves only), AMD Ryzen 5 7500F, Windows 11, Rust 1.100.0, debug build for the tests, release for the smoke runs - `cargo test --workspace -- --test-threads=4`: 1424 passed, 0 failed, 46 ignored - SKIPPED (25): 21 × no wave64; 1 × no heap windows; 3 × per-lane form refused `V_MUL_F16` / `V_PK_MUL_F16` / `V_CVT_F16_F32` (on `main` too; #2182 removes them) - `cargo test -p xcl --lib d3d12x::sparse`: 18 passed, 0 failed, 1 ignored **Regression run** main: ``` xcl-smoke v1 commit: 6d12f58a229bc73889878a448c64dc3af25eeba0 gpu: NVIDIA GeForce RTX 3060 title: c3f791f3 seconds: 60 exit: 0x0 frames shown: 1130 (PresentX 1130) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14808 MB ``` PR: ``` xcl-smoke v1 commit: 237882e85be2919904333b6b084baee4cc4c4411 gpu: NVIDIA GeForce RTX 3060 title: c3f791f3 seconds: 60 exit: 0x0 frames shown: 1119 (PresentX 1119) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14807 MB ``` **Not tested** - The race itself in a title: the test drives the bookkeeping directly, and the smoke run does not show whether a release ever landed during a placement at the same address. A regression check only - AMD / native wave64 **AI use** - Claude Code, Claude Opus 5.5: wrote the fix, the test and this description, ran the tests and both smoke runs on the hardware above
DavidM1911 commented 2026-11-25 23:09:05 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T22:10:32Z.


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

  • cargo test -p xcl --lib: 1038 passed, 1 failed in one parallel run; the failing test passes on a single-threaded rerun (1039/0). Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7176030977 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2528#issuecomment-7176030977). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T22:10:32Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: 1038 passed, 1 failed in one parallel run; the failing test passes on a single-threaded rerun (1039/0). Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun. Thanks!
emirduran707 commented 2026-11-25 23:09:08 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by emirduran707 on 2026-11-25T22:24:21Z.


Independent AMD RDNA4 (native wave64) test report on exact head 237882e85be2919904333b6b084baee4cc4c4411 (clean detached checkout, no local changes).

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64, driver 32.0.31044.16), Ryzen 5 5600, 32 GB RAM, Windows 11 Pro 26300, Rust 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.9.2602.17; tests debug, smoke release.
  • cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4: 1422 passed, 2 failed, 46 ignored; 8 SKIPPED (6 in lower_dxil::tests::{f16,f32}_programs_on_the_gpu refused by per-lane form; heap_window_out_of_memory_falls_back_to_the_switch_form; pso_measurement_compiles_an_exact_synthetic_record). All native wave64 GPU tests ran and passed.
    • The PR's test passed: hle::d3d12x::sparse::tests::a_buffer_released_during_a_placement_does_not_take_the_new_one_with_it.
    • The 2 failures (gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 seed 722 and fuzz_validate_and_gpu_3 seed 1599) are pre-existing on unmodified main on this GPU.

Regression run (60 s retail-title smoke, XCL_NETWORK=0, release)

xcl-smoke v1
commit: 237882e85be2919904333b6b084baee4cc4c4411
gpu: AMD Radeon RX 9060 XT
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1612 (PresentX 1612)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13969 MB

(Matched main 68a284a baseline on the same machine today: 1573 frames, 14420 MB peak, 0 device removals, 0 crashes.)

Not tested

  • D3D12 debug layer; Intel GPUs.

AI use

  • Antigravity with Gemini 4 Neon ran the build, test suite, and smoke run and drafted this report.
<!-- greyfinch-sync:ivall/xcl:comment:7176321058 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2528#issuecomment-7176321058). Originally posted by [emirduran707](https://github.com/emirduran707) on 2026-11-25T22:24:21Z. --- Independent AMD RDNA4 (native wave64) test report on exact head `237882e85be2919904333b6b084baee4cc4c4411` (clean detached checkout, no local changes). **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64, driver 32.0.31044.16), Ryzen 5 5600, 32 GB RAM, Windows 11 Pro 26300, Rust 1.100.0 (`stable-x86_64-pc-windows-msvc`), DXC 1.9.2602.17; tests debug, smoke release. - `cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4`: **1422 passed, 2 failed, 46 ignored; 8 SKIPPED** (6 in `lower_dxil::tests::{f16,f32}_programs_on_the_gpu` refused by per-lane form; `heap_window_out_of_memory_falls_back_to_the_switch_form`; `pso_measurement_compiles_an_exact_synthetic_record`). All native wave64 GPU tests ran and passed. - The PR's test passed: `hle::d3d12x::sparse::tests::a_buffer_released_during_a_placement_does_not_take_the_new_one_with_it`. - The 2 failures (`gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` seed 722 and `fuzz_validate_and_gpu_3` seed 1599) are pre-existing on unmodified `main` on this GPU. **Regression run** (60 s retail-title smoke, `XCL_NETWORK=0`, release) ``` xcl-smoke v1 commit: 237882e85be2919904333b6b084baee4cc4c4411 gpu: AMD Radeon RX 9060 XT title: 21222967 seconds: 60 exit: 0x0 frames shown: 1612 (PresentX 1612) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13969 MB ``` (Matched `main` `68a284a` baseline on the same machine today: 1573 frames, 14420 MB peak, 0 device removals, 0 crashes.) **Not tested** - D3D12 debug layer; Intel GPUs. **AI use** - Antigravity with Gemini 4 Neon ran the build, test suite, and smoke run and drafted this report.
SlopTart commented 2026-11-25 23:09:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-25T23:07:53Z.


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

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

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

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

<!-- greyfinch-sync:ivall/xcl:comment:7177182323 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2528#issuecomment-7177182323). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-25T23:07:53Z. --- **Tested**: current PR head merged onto current `origin/main` (clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo target `x86_64-pc-windows-gnu` run under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29). `gpu_` suite (cold cache): 164 passed / 3 failed, no crashes. The three are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, promoted-UAV-clear driver gap, PR #2490); none caused by this PR. Targeted run of `a_buffer_released_during_a_placement_does_not_take_the_new_one_with_it`: passed. **Not tested**: retail titles (no title data on this lane, counts only). **AI use**: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.
xpatfussy69x commented 2026-11-26 01:05:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by xpatfussy69x on 2026-11-26T00:18:18Z.


Heads-up for merge order: #2531 renames State::quarantined to retirement. This PR's test_state() builds a State with quarantined: VecDeque::new(). Git merges the two without a textual conflict, but the merged tree's tests do not build: error[E0560]: struct sparse::State has no field named quarantined (sparse.rs:1946, a local merge of 6d7f8b9 and 237882e, cargo test -p xcl --lib --no-run). Whichever lands second needs that one field renamed; I'll rebase this one if #2531 goes first.

AI use: Claude Code (Claude Opus 5.5) found this by building the merge.

<!-- greyfinch-sync:ivall/xcl:comment:7178616425 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2528#issuecomment-7178616425). Originally posted by [xpatfussy69x](https://github.com/xpatfussy69x) on 2026-11-26T00:18:18Z. --- Heads-up for merge order: #2531 renames `State::quarantined` to `retirement`. This PR's `test_state()` builds a `State` with `quarantined: VecDeque::new()`. Git merges the two without a textual conflict, but the merged tree's tests do not build: `error[E0560]: struct sparse::State has no field named quarantined` (`sparse.rs:1946`, a local merge of `6d7f8b9` and `237882e`, `cargo test -p xcl --lib --no-run`). Whichever lands second needs that one field renamed; I'll rebase this one if #2531 goes first. AI use: Claude Code (Claude Opus 5.5) found this by building the merge.
throny commented 2026-11-26 01:05:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-26T00:58:33Z.


Two contributors checked independently and found that #2539 solves the same problem (for #2457) in a different way: #1607, group D122. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.

This is a hint from the community triage in #1607, not a maintainer decision.

AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.

<!-- greyfinch-sync:ivall/xcl:comment:7179299865 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2528#issuecomment-7179299865). Originally posted by [throny](https://github.com/throny) on 2026-11-26T00:58:33Z. --- <!-- xcl-1607-hint:D122 --> Two contributors checked independently and found that #2539 solves the same problem (for #2457) in a different way: #1607, group D122. You may want to compare them with the other author and agree on one, or say in the PR why both are needed. This is a hint from the community triage in #1607, not a maintainer decision. AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
xpatfussy69x commented 2026-11-26 02:08:18 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by xpatfussy69x on 2026-11-26T01:17:30Z.


Thanks for the hint. #2539 and this PR fix the same item (2) of #2457 the two ways the issue suggests; this one was opened first (21:45 vs 22:12 UTC).

  • This PR (+88/−4) keeps STATE across CreateReservedResource and only lets the queued releases go (forget_released) before the new buffer is recorded – the smallest change that closes the race.
  • #2539 (+201/−16) also stops holding STATE across the driver call, which needs the window to be checked again afterwards and an abort path when it went away.

If not holding the lock across the driver call is wanted for its own sake, #2539 is the more complete fix and I'm happy to close this one in its favour; if the minimal fix is preferred, this one. I'll leave the choice to the maintainer and won't push either way.

AI use: Claude Code (Claude Opus 5.5) compared the two diffs; I checked the comparison.

<!-- greyfinch-sync:ivall/xcl:comment:7179626454 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2528#issuecomment-7179626454). Originally posted by [xpatfussy69x](https://github.com/xpatfussy69x) on 2026-11-26T01:17:30Z. --- Thanks for the hint. #2539 and this PR fix the same item (2) of #2457 the two ways the issue suggests; this one was opened first (21:45 vs 22:12 UTC). - This PR (+88/−4) keeps `STATE` across `CreateReservedResource` and only lets the queued releases go (`forget_released`) before the new buffer is recorded – the smallest change that closes the race. - #2539 (+201/−16) also stops holding `STATE` across the driver call, which needs the window to be checked again afterwards and an abort path when it went away. If not holding the lock across the driver call is wanted for its own sake, #2539 is the more complete fix and I'm happy to close this one in its favour; if the minimal fix is preferred, this one. I'll leave the choice to the maintainer and won't push either way. AI use: Claude Code (Claude Opus 5.5) compared the two diffs; I checked the comparison.
upipibi commented 2026-11-26 05:05:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by upipibi on 2026-11-26T04:25:34Z.


NVIDIA test report for 237882e: RTX 3070 8 GB (Ampere, driver 616.56), Windows 11 26100, Rust 1.100.0, debug.

  • cargo test -p xcl --lib -- --skip hle::xaudio2 --test-threads=4 (the hle::xaudio2 tests hang on this machine, on main too):
  • this PR, run 1: 1289 passed, 1 failed, 26 ignored; 25 SKIPPED lines (no wave64, two refused per-lane forms, the driver-cache measurement that needs Developer Mode). The failure is this PR's new test: hle::d3d12x::sparse::tests::a_buffer_released_during_a_placement_does_not_take_the_new_one_with_it panicked at sparse.rs:1838:9, "the old buffer's tile is still pinned".
  • this PR, run 2 (same command): 1290 passed, 0 failed, 26 ignored. So it is intermittent.
  • the new test alone, --test-threads=1 --nocapture, 3 runs: passes each time.
  • base 6d12f58, same command: 1289 passed, 0 failed, 26 ignored (it does not have the test).
  • Possible cause, from reading the code: the test pushes RES into the global FORGOTTEN and then drains it into its own state, but another test that calls lock_state() in parallel can take FORGOTTEN first, so the test's state never lets the old buffer go.

Lib tests only; no title run.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7182584079 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2528#issuecomment-7182584079). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-26T04:25:34Z. --- NVIDIA test report for `237882e`: RTX 3070 8 GB (Ampere, driver 616.56), Windows 11 26100, Rust 1.100.0, debug. - `cargo test -p xcl --lib -- --skip hle::xaudio2 --test-threads=4` (the `hle::xaudio2` tests hang on this machine, on `main` too): - this PR, run 1: 1289 passed, **1 failed**, 26 ignored; 25 SKIPPED lines (no wave64, two refused per-lane forms, the driver-cache measurement that needs Developer Mode). The failure is this PR's new test: `hle::d3d12x::sparse::tests::a_buffer_released_during_a_placement_does_not_take_the_new_one_with_it` panicked at `sparse.rs:1838:9`, "the old buffer's tile is still pinned". - this PR, run 2 (same command): 1290 passed, 0 failed, 26 ignored. So it is intermittent. - the new test alone, `--test-threads=1 --nocapture`, 3 runs: passes each time. - base `6d12f58`, same command: 1289 passed, 0 failed, 26 ignored (it does not have the test). - Possible cause, from reading the code: the test pushes `RES` into the global `FORGOTTEN` and then drains it into its own state, but another test that calls `lock_state()` in parallel can take `FORGOTTEN` first, so the test's state never lets the old buffer go. Lib tests only; no title run. AI-assisted (Claude Code, Claude Opus 5.5).
Decodere commented 2026-11-27 03:31:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-27T03:31:27Z.


Independent desktop NVIDIA verification of PR #2528 at head 237882e85be2919904333b6b084baee4cc4c4411 (1 commit; exact parent & merge-base: 6d12f58a229bc73889878a448c64dc3af25eeba0, pre-#2555 ancestor of main).

Environment

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6C / 12T), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200 (Developer Mode off)
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC, DXC 1.9.2609.5, --release

Targeted release tests & build (237882e8)

Command Result
cargo test --release -p xcl --lib a_buffer_released_during_a_placement_does_not_take_the_new_one_with_it -- --nocapture (3 consecutive runs) 1 passed; 0 failed; 0 ignored; 1324 filtered out × 3 (0.22s, 0.19s, 0.19s, 0 skipped — live D3D12 execution on RTX 4060)
cargo test --release -p xcl --lib hle::d3d12x::sparse:: -- --test-threads=1 (3 consecutive runs) 18 passed; 0 failed; 1 ignored; 1306 filtered out × 3 (1.32s, 1.34s, 1.32s, 0 skipped)
cargo build --release -p xcl Clean build (1m 07s, exit 0, 0 new warnings)

Paired quiet 60 s retail smoke (title: 29640639)

Exact parent & merge-base (6d12f58a229bc73889878a448c64dc3af25eeba0, cached baseline on the same machine):

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

PR #2528 (237882e85be2919904333b6b084baee4cc4c4411):

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

Runtime log observations (xcl.log)

  • 9225 log lines, 0 [ERROR] / device-removal / panic lines.
  • Final draw/memory telemetry in log: 18508 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped); last memory sample 14006 MB committed by the process; video memory 6116 MB local, 4682 MB non-local.

Limits of coverage

  • Protecting a newly placed sparse buffer when an earlier buffer at the same pointer address is released concurrently during placement was directly exercised on desktop D3D12 / RTX 4060 via a_buffer_released_during_a_placement_does_not_take_the_new_one_with_it (3/3, 0 skipped) and hle::d3d12x::sparse:: (18/0/1 × 3).
  • The 60 s retail smoke on title: 29640639 exercises live sparse VRAM allocation (7445 MB sparse) with zero device removals or crashes (frame-count delta vs. cached parent reflects single-run startup variance, not this PR).

AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).

<!-- greyfinch-sync:ivall/xcl:comment:7209056547 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2528#issuecomment-7209056547). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-27T03:31:27Z. --- Independent desktop NVIDIA verification of **PR #2528** at head `237882e85be2919904333b6b084baee4cc4c4411` (`1` commit; exact parent & merge-base: `6d12f58a229bc73889878a448c64dc3af25eeba0`, pre-`#2555` ancestor of `main`). ### Environment - **GPU:** NVIDIA GeForce RTX 4060 (8 GB / `7956 MiB` reported by D3D12), driver `32.0.16.2114` (NVIDIA `621.14`, WDDM 3.2) - **CPU / RAM / OS:** Intel Core i5-11400F (6C / 12T), 32 GB RAM (`31.9 GiB` usable), Windows 11 Home `26200` (Developer Mode off) - **Toolchain:** `rustc 1.100.0 (0ef1bc386 2026-11-09)` MSVC, DXC `1.9.2609.5`, `--release` ### Targeted release tests & build (`237882e8`) | Command | Result | | --- | --- | | `cargo test --release -p xcl --lib a_buffer_released_during_a_placement_does_not_take_the_new_one_with_it -- --nocapture` (3 consecutive runs) | `1 passed; 0 failed; 0 ignored; 1324 filtered out` × 3 (`0.22s`, `0.19s`, `0.19s`, `0` skipped — live D3D12 execution on RTX 4060) | | `cargo test --release -p xcl --lib hle::d3d12x::sparse:: -- --test-threads=1` (3 consecutive runs) | `18 passed; 0 failed; 1 ignored; 1306 filtered out` × 3 (`1.32s`, `1.34s`, `1.32s`, `0` skipped) | | `cargo build --release -p xcl` | Clean build (`1m 07s`, exit `0`, `0` new warnings) | ### Paired quiet 60 s retail smoke (`title: 29640639`) Exact parent & merge-base (`6d12f58a229bc73889878a448c64dc3af25eeba0`, cached baseline on the same machine): ``` xcl-smoke v1 commit: 6d12f58a229bc73889878a448c64dc3af25eeba0 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1606 (PresentX 1606) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14004 MB ``` PR #2528 (`237882e85be2919904333b6b084baee4cc4c4411`): ``` xcl-smoke v1 commit: 237882e85be2919904333b6b084baee4cc4c4411 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1610 (PresentX 1610) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 14007 MB ``` ### Runtime log observations (`xcl.log`) - `9225` log lines, `0` `[ERROR]` / device-removal / panic lines. - Final draw/memory telemetry in log: `18508 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped)`; last memory sample `14006 MB committed by the process; video memory 6116 MB local, 4682 MB non-local`. ### Limits of coverage - Protecting a newly placed sparse buffer when an earlier buffer at the same pointer address is released concurrently during placement was directly exercised on desktop D3D12 / RTX 4060 via `a_buffer_released_during_a_placement_does_not_take_the_new_one_with_it` (`3/3`, `0` skipped) and `hle::d3d12x::sparse::` (`18/0/1` × 3). - The 60 s retail smoke on `title: 29640639` exercises live sparse VRAM allocation (`7445 MB` sparse) with zero device removals or crashes (frame-count delta vs. cached parent reflects single-run startup variance, not this PR). *AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).*
throny commented 2026-11-30 20:18:54 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-30T20:18:54Z.


Closing: a97dbe9b on main (adapted from #2539, landed with the #2959 stack) creates placed buffers outside the sparse state and clears released ones before recording the new one, which fixes item (2) of #2457 the other way; you had offered to close in favour of #2539. Checked against current main (ff0c364b), hunk by hunk. 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) checked this; part of the duplicate sweep on #3041.

<!-- greyfinch-sync:ivall/xcl:comment:7290721421 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2528#issuecomment-7290721421). Originally posted by [throny](https://github.com/throny) on 2026-11-30T20:18:54Z. --- Closing: a97dbe9b on `main` (adapted from #2539, landed with the #2959 stack) creates placed buffers outside the sparse state and clears released ones before recording the new one, which fixes item (2) of #2457 the other way; you had offered to close in favour of #2539. Checked against current `main` (`ff0c364b`), hunk by hunk. 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) checked this; part of the duplicate sweep on #3041.

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!2518
No description provided.