D3D12.X: reclaim two-pass buffers on submit fence completion #2805
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2815"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by coolpersonnn on 2026-11-26T14:22:47Z.
Reclaim retired two-pass mesh buffers on submit queue fence completion rather than waiting for the owning command allocator to reset, and rebase cleanly onto
nvidia-dev(eae01502).Part of #2688
What is in it
README.md: documentXCL_TWO_PASS_MBalongside two-pass mesh pool behavior.crates/xcl/src/hle/d3d12x/alloc_pool.rs: pollreclaim_fenced()before freeing idle two-pass buffers so completed recordings can be recycled immediately without holding allocator-lifetime memory, and trackFenceState::Removedso lost devices never recycle in-flight buffers.crates/xcl/src/hle/d3d12x/bind.rs: replace reset-only holding with fence-tracked batches (FencedBatch, monotonic per-queuerecord_queue_fence.max, explicitPending/Completed/Removedpolling withu64::MAXdevice-removal short-circuiting), preserve closed command lists' buffers acrossFREE_RES_IDLEtrims so Reset-less replays remain valid (in_flightlist tracking), track upstreambatch_bufallocations via submit fences, and add 7 unit/GPU tests covering fence reclamation, monotonic queue fence merging, closed-list replay preservation, and device removal.Tested
42ae6051, RTX 5090:cargo build --offline --locked -j 8 --workspacesucceeded.cargo test --offline --locked -j 8 --workspace --no-fail-fast -- --test-threads=4 --nocapturereported 1824 passed, 13 failed, 48 ignored, and 27 GPU skip notices. The failure names and counts match the earliernvidia-devbaseline. The idle-pool regression passed.cargo test --offline --locked -j 6 -p xcl --lib empty_allocator_release_trims_idle_two_pass_buffers -- --nocapture --test-threads=1. The fixture failed on44ed31fcwith only the test applied (0 passed, 1 failed) and passed with the fix (1 passed, 0 failed). Both runs reported zero skips.44ed31fc, RTX 5090:cargo build --offline --locked -j 6 --workspacesucceeded.cargo test --offline --locked -j 6 --workspace --no-fail-fast -- --test-threads=4 --nocapturereported 1823 passed, 13 failed, 48 ignored, and 27 GPU skip notices (excluded from coverage). All failures match the test names and counts in the earliernvidia-devrelease baseline below.fenced_batch_stays_locked_until_its_bytes_are_countedpassed in the full suite.32.0.16.2101,32187 MiBVRAM, wave32 / split wave64), WARP (software renderer), AMD Ryzen 9 9950X3D, Windows 11 Pro (10.0.26300),rustc 1.100.0(0ef1bc386 2026-11-09), DXC1.8.2502.11.42532264:cargo test --offline --locked -p xcl --lib -- hle::d3d12x::bind hle::d3d12x::alloc_pool --test-threads=4(NVIDIA + WARP):68 passed; 0 failed(1opt-inSKIPPED:hle::d3d12x::bind::tests::two_pass_binds_set_the_shared_view_heap: no heap windows (opt-in: XCL_HEAP_WINDOWS=1)).XCL_HEAP_WINDOWS=1:two_pass_binds_set_the_shared_view_heap1 passed; 0 failed.cargo build --offline --locked --release --workspace && cargo test --offline --locked --release --workspace --no-fail-fast -- --test-threads=4) on RTX 5090:42532264(previous head):total_passed=1819, total_failed=13, total_ignored=48, skips=27(xcllib:1692 passed; 7 failed; 28 ignored).nvidia-dev(eae01502):total_passed=1812, total_failed=13, total_ignored=48, skips=27(xcllib:1685 passed; 7 failed; 28 ignored).fuzz_validate_and_gpu_{0,1,2,3},gpu_compute_thread_limits_leave_the_lanes_past_them_out,texture_upload::{pieces_hold_the_texels_of_their_levels, gpu_parts_of_a_texture_go_up_and_the_rest_stays},console_ms_in_as_slot_and_ms_with_as_are_refused_cleanly,async_compute_pso_registers_real_pso_and_not_standin,split_compute_prefers_the_offline_whole_pipelinex2,two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobsx2).SKIPPEDGPU tests on RTX 5090:no wave64(20),wave32, per-lane form: refused(3),no heap windows(2),cannot disable the driver cache(1), plus opt-inXCL_HEAP_WINDOWS=1skip above (1).scripts/smoke.ps1,title: a93b40d7, RTX 5090,XCL_PREPARE=0):42532264produced1671frames (PresentX 1671),0device removals,0crashes,15915 MBpeak commit vsnvidia-deveae01502(1628frames,0removals,0crashes,15793 MBpeak commit) andmainb49be183(1654frames,16446 MBpeak commit).Regression run
Not tested
nvidia-dev(eae01502) and the top of the stack (#2817), not separately on this intermediate commit (targetedbind+alloc_pooltests ran on both NVIDIA and WARP here).0two-pass draws); world loading was verified in 120 s runs on top of the stack (#2817) using synthetic menu-advance inputs.AI use
gemini-pro-orchestrator-neon) and Codex (GPT-6.2 Sol) wrote and reviewed the fence-tracking fixes, tests, and PR description; all builds, tests, and smoke runs were executed directly on local hardware.gpt-6.2-sol) reproduced and fixed the fence-accounting race, added the regression test, and reran validation on the revised stack.gpt-6.2-sol) reproduced the idle-pool regression, applied the suggested fix and reran validation on the revised stack.Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-26T14:45:40Z.
Independent Windows/NVIDIA check of #2815 head
71b1a932against its cleannvidia-devbaseaf2cecc4. I rancargo build --offline --locked --workspace, thencargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4withXCL_ADAPTER=3080and a persistent local DXIL test cache. Windows 11 build 26300, RTX 3080 Ti / driver 621.35, Ryzen 7 9800X3D, rustc 1.99.1 MSVC, DXC 1.8.2502.11.SKIPPEDnoticesaf2cecc471b1a932The same six named tests failed in both runs: two
texture_uploadtests,console_ms_in_as_slot_and_ms_with_as_are_refused_cleanly,async_compute_pso_registers_real_pso_and_not_standin, and twotwo_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobsinstances. The head adds four passing tests. Of the 26 skip notices, 21 require wave64, three per-lane forms were refused, and two heap-window cases were disabled in the default run; I do not count skips as coverage.I also ran the opt-in
two_pass_binds_set_the_shared_view_heapfixture separately on both revisions withXCL_HEAP_WINDOWS=1:cargo test --offline --locked -p xcl --lib two_pass_binds_set_the_shared_view_heap -- --nocapture --test-threads=1. Each passed 1/1 with no skip. This synthetic check exercises the opt-in descriptor-heap binding path; it does not measure an in-world memory saving.Not tested: paired retail-title smoke, sustained world load, AMD/Intel, or the full workspace suite with heap windows enabled. These results alone do not establish merge readiness.
AI use: Codex (GPT-6.2 Sol) ran the builds and tests, compared the exact base and head results, and drafted this report.
Imported from ivall/xcl. Originally posted by GodlyBDS on 2026-11-26T15:36:42Z.
Retail-title A/B on RTX 3090 Ti (24 GiB, driver 621.40), Windows 10 19045, Ryzen 9 5950X, 32 GiB RAM, Agility v620 and rustc 1.98.1 MSVC release. This adds a world-transition sample to the existing smoke and suite reports.
Tested
I replayed
af2cecc40886a8682ecf3267f5328c6dc4b66ad7with the lab's startup, timing, DRED and graceful-stop patches, then the same tree plus71b1a93201456a655a5b23fe45348257c0658018. Separate Cargo targets and identical embedded translator IDs. Each run used its own copy of the same warm shader cache and 11,721 verified native PSOs, the same profile and timed input, 30/32 logical CPUs, a 1 GiB app-specific NVIDIA shader heap,XCL_TWO_PASS_MB=4096,XCL_TEXTURE_LEVEL_PAGES=1,XCL_PSO_WAIT_AT_RECORDING=1andXCL_GPU_PROFILE=1. One run per arm, sequentially, with the same memory guard.71b1a932All five tracked allocator fences on the base were caught up from 100.506 s through the last sample. The base still held 998 MiB for allocator resets at 115.199 s. On the patched arm, all tracked fences were caught up at 156.646 s and live two-pass widths fell from 636 to 243 MiB between 153.694 and 157.585 s while the released buffer count increased from 23 to 46. The sampled fence-wait bucket was 0 MiB throughout. The counters show lower retention and more reuse in this run. Per-recording release order is covered by the existing unit tests.
The base showed loading artwork followed by a black capture and stopped gracefully at 116.4 s on the physical RAM floor. The patched arm captured two very dark world frames with sparse horizon and building lights at 149.869 and 165.276 s. It returned
DXGI_ERROR_DEVICE_HUNGat 182.162 s before the guard requested a stop. Windows logged nvlddmkm 153, Display 4101 and LiveKernelEvent 141. The last tracked q0 fence was 7840/7841. DRED stopped at 3041/3962 on q0, withExecuteIndirectnext and CS1ada490879c33c0ebound. GPU timestamp diagnostics showed eight earlier completions of that program and a later invocation still outstanding after 9.958 s. DRED reported VA zero and no matching allocation.Coverage limits
The arms progressed through different content for different durations. This measures observed buffer retention and records a concrete later hang. It leaves the cause of the hang, matched in-world memory use, steady-state FPS and playability unresolved. AMD and other drivers were outside this replay.
AI use
OpenAI Codex (GPT-6 family) verified the archived build and source identity, ran and analyzed the two replays, and prepared this report.
Focused regression for out-of-order fence notifications
I tested the ordering case described in the earlier source review. The fixture attaches q0 mark 15, q1 mark 2, then a delayed q0 mark 10 to one recording. After retiring the recording and completing q1, the original code makes the buffer reusable with q0 only at 13. A local change that retains the highest mark per queue keeps it out of the reuse pool until q0 reaches 15.
On exact head
71b1a93201456a655a5b23fe45348257c0658018with the test overlay, the new assertion failed (0 passed, 1 failed). With the monotonic mark check, it passed alongside the existing reset, multi-queue resubmission, split-segment, and untracked-submit cases. This fixture uses a real WARP allocation with synthetic fence values to reproduce the callback ordering deterministically.On this Windows 10 19045 host (RTX 3090 Ti, driver 621.40, rustc 1.98.1 MSVC), the broader bind filter returned 37 passed / 1 failed on clean head and 38 passed / 1 failed with the fix and new test, zero ignored and five capability-skip notices in each. The same
gpu_two_pass_indirect_commands_keep_their_own_recordstest failed with0x80070057in both invocations. Command basecargo test --offline --locked -j 30 -p xcl --lib, filterlate_submit_notification_keeps_the_newest_mark_on_each_queueorhle::d3d12x::bind::tests::, and-- --test-threads=1 --nocapture.This test reproduces a lifetime error. Its connection to the retail indirect hang remains unresolved. OpenAI Codex (GPT-6 family) added and ran the test and checked the local change.
Patch for @coolpersonnn on
71b1a932. This applies the per-queue maximum and adds the deterministic regression described above. The allocator pool assigns monotonically increasing values under its lock. Bind notifications occur after it releases that lock. The regression also completes the other queue independently.Minimal fence-order fix and regression
Imported from ivall/xcl. Originally posted by nnonno91 on 2026-11-26T15:21:17Z.
Independent RTX 5090 world-load check of #2815. I ran the clean
nvidia-devbaseaf2cecc40886a8682ecf3267f5328c6dc4b66ad7and the clean PR head71b1a93201456a655a5b23fe45348257c0658018on Windows 11 26200, RTX 5090 32 GB (driver 617.42), Ryzen 7 9800X3D, and 32 GB RAM.One 115 s release smoke run per revision, base first, using workload
9cc6a39e, identical copies of the offline profile, and shared shader and driver caches. Both reached world loading and stopped presenting before playable gameplay. Both timed runs exited0x0. This shows the reuse path firing during loading. Sustained in-world memory and FPS remain unmeasured.Ran
scripts/smoke.ps1 -Game <workload> -Xcl <release exe> -Seconds 115withXCL_ADAPTER=RTX 5090,XCL_NETWORK=0,XCL_ACTIVITY=1,XCL_PREPARE=0,XCL_DIRECT_DXIL=1,XCL_HEAP_WINDOWS=1,XCL_UMA_SHADOW=1,XCL_COHERENT_HEAPS=sparse:16,XCL_LOOK_SKIP=1,XCL_LOOK_STATS=2,XCL_TWO_PASS_MB=1024,XCL_GFX_PSO_WAIT_MS=150, andXCL_PRESS_AT=16:A,23:A,30:A.AI use — Codex built the exact revisions, ran the smoke tests, and summarized the logs.
Imported from ivall/xcl. Originally posted by KDenKC on 2026-11-26T15:34:04Z.
Source review of
71b1a932, no run. One ordering gap:alloc_pool's submit path (aroundalloc_pool.rs:322-340) increments and signals the queue's fence underSTATE, thendrop(g)and callsbind::two_pass_submitted(queue, Some(&fence), value, lists). There, an existing entry for the queue is overwritten unconditionally (bind.rs:~132:m.1 = f.clone(); m.2 = value;). Two threads submitting to the same queue can reachtwo_pass_submittedin the opposite order to theirSignals. The list then keeps the older value, and its two-pass buffers can be reclaimed once that older value completes while the newer submit still runs. Keeping the larger value (m.2 = m.2.max(value)when it is the same fence) closes it. #2816 and #2817 carry the same code, and #2816'smark_indirect_feedback_usedhas the same overwrite onpending_fences.Not tested: no build or run on our side.
AI use: Gemini (Antigravity) flagged it in a review. Claude Code (Claude Opus 5.5) checked it against the source at
71b1a932and wrote this.Imported from ivall/xcl. Originally posted by Decodere on 2026-11-26T15:53:08Z.
Independent RTX 4060 (8 GB) / Windows 11 release verification of PR #2815 at
71b1a93201456a655a5b23fe45348257c0658018(parent & merge-baseorigin/nvidia-devaf2cecc40886a8682ecf3267f5328c6dc4b66ad7). Measurements and targeted test results only; not a full source review.Setup
7956 MiBreported by D3D12), driver32.0.16.2114(NVIDIA621.14, WDDM 3.2)31.9 GiBusable), Windows 11 Home26200rustc 1.100.0 (0ef1bc386 2026-11-09), DXC1.9.2609.5, release builds, warm DXIL/pipeline caches, quiet machine (zero concurrent builds/tests during timed runs)title: 29640639viascripts/smoke.ps1 -Seconds 60(XCL_NETWORK=0, default flags, no input)Targeted RTX 4060 release unit & GPU tests (
71b1a932)cargo test --release -p xcl --lib submitted_two_pass_buffers_reclaim_via_fence_without_allocator_reset -- --nocapture: 1 passed, 0 failed, 0 ignored (0.02 s,0SKIPPED).cargo test --release -p xcl --lib split_segment_without_allocator_reclaims_via_fence_instead_of_aging -- --nocapture: 1 passed, 0 failed, 0 ignored (0.02 s,0SKIPPED).cargo test --release -p xcl --lib untracked_submit_falls_back_to_allocator_res -- --nocapture: 1 passed, 0 failed, 0 ignored (0.02 s,0SKIPPED).cargo test --release -p xcl --lib resubmitted_list_waits_for_all_queue_fences -- --nocapture: 1 passed, 0 failed, 0 ignored (0.02 s,0SKIPPED).cargo test --release -p xcl --lib hle::d3d12x::alloc_pool::(3 consecutive parallel passes): 8 passed, 0 failed, 0 ignored on all 3 passes (0.22 s/0.22 s/0.22 s,0SKIPPED).cargo test --release -p xcl --lib hle::d3d12x::bind::: 38 passed, 0 failed, 0 ignored (0.33 s; 1 opt-inSKIPPEDnotice:two_pass_binds_set_the_shared_view_heapskipped withoutXCL_HEAP_WINDOWS=1).Paired 60 s RTX 4060 smoke (
nvidia-devaf2cecc4vs71b1a932)Both runs completed cleanly at steady 60/2 s pacing with
0device removals and0crashes:nvidia-devbase (af2cecc4)71b1a932)PresentX1547/15471496/149660 60 6061 60 6016342 MB15504 MBxcl.log)15009 MB15308 MB6245 MB/6182 MB6182 MB/6182 MB4749 MB4730 MB18,382draws /1,024dispatches (0skipped)18,640draws /1,024dispatches (0skipped)xcl.logrecorded0two-pass buffer/draw log lines during this 60 s no-input menu/intro smoke, so the lower single-run transient peak commit (15504 MBvs16342 MB, while steady-state end commit was15308 MBvs15009 MBand end local VRAM was6182 MBon both) should not be attributed to two-pass buffer reclamation.Base
origin/nvidia-dev(af2cecc4):PR #2815 head (
71b1a932):Limits of coverage
71b1a932(only the 4 new tests individually, 3 parallel passes ofhle::d3d12x::alloc_pool::,hle::d3d12x::bind::, and the paired 60 s default-flags smokes);hle::d3d12x::bind::tests::two_pass_binds_set_the_shared_view_heapskipped without opt-inXCL_HEAP_WINDOWS=1.alloc_poolsubmit/signal races; two-pass fence reclamation was exercised by the targeted unit tests rather than live world-load telemetry on this host.RTX 4060) on native Windows 11; no AMD, Intel, or Wine/Linux run on this host.AI use
Ran the targeted release tests, paired quiet 60 s smoke runs, and
xcl.logcomparisons with assistance from Google Antigravity (Gemini 4 Neon); all test counts, memory figures, and smoke blocks were extracted directly fromcargo test,xcl.log, andscripts/smoke.ps1outputs.Imported from ivall/xcl. Originally posted by Aniseto on 2026-11-26T16:10:39Z.
Ran the two-pass fence-reclamation tests at
71b1a932serially on a second Blackwell desktop part:System
Results
XCL_ADAPTER=NVIDIA cargo test -p xcl --lib hle::d3d12x::alloc_pool -- --test-threads=1: 8 passed, 0 failed, 0 ignored (1644 filtered out, exit 0)XCL_ADAPTER=NVIDIA cargo test -p xcl --lib hle::d3d12x::bind -- --test-threads=1: 38 passed, 0 failed, 0 ignored (1614 filtered out, exit 0);two_pass_binds_set_the_shared_view_heapwas SKIPPED (opt-inXCL_HEAP_WINDOWS=1)What this adds
The author's full workspace run was on an RTX 5090 (driver 621.01, DXC 1.8.2502.11) with 10 failures also present on the unmodified base; the thread also has RTX 3090 Ti, RTX 4060 and independent Windows/NVIDIA reports, but no 5070 Ti. I used
--test-threads=1because of the parallel-only flakes reported on this stack. The fence-reclamation tests (submitted_two_pass_buffers_reclaim_via_fence_without_allocator_reset,split_segment_without_allocator_reclaims_via_fence_instead_of_aging,resubmitted_list_waits_for_all_queue_fences,untracked_submit_falls_back_to_allocator_res) pass here. They exercise allocator and fence bookkeeping with a mock device, not a real stalled GPU queue.Not tested
The full workspace suite and its 10 known failures, a paired smoke run, a real stalled sparse queue,
XCL_HEAP_WINDOWS=1, release profile, AMD and Intel GPUs, native wave64, Wine, game data.AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.
Imported from ivall/xcl. Originally posted by grahamster2 on 2026-11-26T16:57:07Z.
Independent data point for this series, from a 10 GB card (RTX 3080). I measured a local version of the same idea (fence reclaim of retired two-pass buffers) before I saw this PR, so it's not your exact code.
XCL_TWO_PASS_MB=3072, giving 0 skipped draws until about 600 s in the world. Local video memory ran 3 to 4 GB over budget.Imported from ivall/xcl. Originally posted by KDenKC on 2026-11-26T17:36:52Z.
Checked at
839df6de:record_queue_fence(bind.rs:109-115) keeps the larger value for the same queue and fence, so a callback that arrives out ofSignalorder no longer lowers it. Thanks.AI use: Claude Code (Claude Opus 5.5) checked the source and wrote this.
Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-26T18:10:00Z.
Focused follow-up on current head
839df6de: a removed device can make an unfinished two-pass buffer reusable. This is separate from the out-of-order submit callback that was already fixed.In
bind.rs, bothretire_recording_resandreclaim_fencedtreatreal::fence_completed(f) >= markas completion. That helper reads the native fence value; D3D12 returnsUINT64_MAXwhen the device is removed. A mark of 5 with a still-unfinished value of 4 is correctly held, but a removal value ofUINT64_MAXputs its buffer intoFREE_RES. A latertake_freecan return that same resource. #2831 uses the necessaryvalue != u64::MAX && value >= markrule for the allocator; this PR's two-pass pool needs it at both checks too.I added two local fake-fence/WARP regressions: one presents removal before retirement, and one after the buffer enters
FENCED_RES. On the unchanged PR behavior,cargo test --offline --locked -p xcl --lib removed_device_does_not -- --test-threads=1 --nocapturereported 0 passed, 2 failed, 0 ignored: both returned the same buffer early. With the candidate below, 2 passed, 0 failed, 0 ignored; normal fence completion still returned that buffer afterward. No capability skip occurred.On the candidate,
cargo build --offline --locked --workspacepassed.cargo test --offline --locked -p xcl --lib hle::d3d12x::bind::tests:: -- --test-threads=1reported 40 passed, 0 failed, 0 ignored, with oneXCL_HEAP_WINDOWS=1opt-in skip. The fullcargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4reported 1,750 passed, 7 failed, 48 ignored across 41 targets, with 26 GPU subcase skip notices. Failures were the mesh shader-cache test, two texture-upload tests, the AS-slot mesh diagnostic, async compute registration, and two instances of the two-pass driver-cache test. I did not rerun the whole suite on the unmodified current head, so I cannot attribute those failures to or exclude this patch.Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (driver 621.35), rustc 1.99.1 MSVC, DXC 1.8.2502.11. The regression uses a synthetic fence and a WARP resource; no game data. Not tested: retail smoke, sustained world load, AMD or Intel. This demonstrates incorrect buffer reuse after removal; it does not establish the cause of any reported retail hang. The diff is an uncommitted suggestion against this exact head; the author can share #2831's helper when integrating the branches.
Candidate fix and two regressions against
839df6deAI use: Codex (GPT-6.2 Sol) traced the fence paths, wrote and ran the local candidate and tests, and drafted this report. I checked each review point against the source and test output.
Imported from ivall/xcl. Originally posted by Decodere on 2026-11-26T19:44:33Z.
Updated RTX 4060 (8 GB) / Windows 11 release verification of PR #2815 rebased head
42532264a221ac975b745b01097bf751e0e56712(exact parent & merge-basenvidia-deveae015021c639866ab061cdff2e9daf8ba9daac5; supersedes our earlier check of pre-rebase head71b1a932offaf2cecc4). Measurements and targeted test results only; not a full source review.Setup
7956 MiBreported by D3D12), driver32.0.16.2114(NVIDIA621.14, WDDM 3.2)31.9 GiBusable), Windows 11 Home26200rustc 1.100.0 (0ef1bc386 2026-11-09), DXC1.9.2609.5, release builds, warm DXIL/pipeline caches, quiet machine (zero concurrent builds/tests during timed runs)title: 29640639viascripts/smoke.ps1 -Seconds 60(XCL_NETWORK=0, default flags, no input)Targeted RTX 4060 release unit & GPU tests (
42532264)cargo test --release -p xcl --lib submitted_two_pass_buffers_reclaim_via_fence_without_allocator_reset -- --nocapture: 1 passed, 0 failed, 0 ignored (0.02 s,0SKIPPED).cargo test --release -p xcl --lib split_segment_without_allocator_reclaims_via_fence_instead_of_aging -- --nocapture: 1 passed, 0 failed, 0 ignored (0.01 s,0SKIPPED).cargo test --release -p xcl --lib hle::d3d12x::alloc_pool:: -- --test-threads=4(3 consecutive parallel passes): 8 passed, 0 failed, 0 ignored on all 3 passes (0.21 s/0.21 s/0.21 s,0SKIPPED).cargo test --release -p xcl --lib hle::d3d12x::bind:: -- --test-threads=4(3 consecutive parallel passes): 60 passed, 0 failed, 0 ignored on all 3 passes (0.29 s/0.30 s/0.28 s;1opt-inSKIPPEDnotice per run:two_pass_binds_set_the_shared_view_heapskipped withoutXCL_HEAP_WINDOWS=1).Paired 60 s RTX 4060 smoke (
nvidia-deveae01502vs42532264)Both runs completed cleanly at steady 60/2 s pacing with
0device removals and0crashes (42532264vseae01502xcl.log:6,118vs6,117 MBpeak/end local VRAM,4,746vs4,754 MBend non-local VRAM,18,922vs19,006translated draws /1,024dispatches with0skipped; note0two-pass buffer/draw log lines fired during this 60 s menu smoke, so single-run commit variance15436vs15926 MBshould not be attributed to two-pass buffer reclamation).Exact parent
nvidia-dev(eae01502):PR #2815 head (
42532264):Limits of coverage
42532264(only 2 targeted tests individually, 3 parallel--test-threads=4passes each ofalloc_pool::andbind::, release build, and exact-parent paired 60 s smokes);two_pass_binds_set_the_shared_view_heapskipped without opt-inXCL_HEAP_WINDOWS=1.0two-pass log lines); submit-fence reclamation, lost-device handling, and batch tracking were exercised by the 60 passing tests inbind::and 8 inalloc_pool::rather than in-world two-pass load.RTX 4060) on native Windows 11; no AMD, Intel, or Wine/Linux run on this host.AI use
Ran the targeted release tests, release build, and exact-parent paired quiet 60 s smoke runs with assistance from Google Antigravity (Gemini 4 Neon); all test counts, timings, memory figures, and smoke blocks were extracted directly from
cargo test,xcl.log, andscripts/smoke.ps1outputs.Imported from ivall/xcl. Originally posted by MatyEjsr on 2026-11-26T19:45:47Z.
Independent Windows/NVIDIA verification and diff review of PR #2815 at head
42532264a221ac975b745b01097bf751e0e56712(merge-baseorigin/nvidia-deveae015021c639866ab061cdff2e9daf8ba9daac5).System
rustc 1.100.0 (0ef1bc386 2026-11-09)MSVC, DXC1.9.0.5512(dxcompiler 1.9.2602.17)Tested
debug):cargo test -p xcl --lib -- hle::d3d12x::bind hle::d3d12x::alloc_pool --test-threads=8 --nocapture-> 68 passed, 0 failed, 0 ignored (1,659 filtered out), 1SKIPPED(hle::d3d12x::bind::tests::two_pass_binds_set_the_shared_view_heap: no heap windows (opt-in: XCL_HEAP_WINDOWS=1)). All 7 new tests pass.debug):XCL_HEAP_WINDOWS=1 cargo test -p xcl --lib two_pass_binds_set_the_shared_view_heap -- --test-threads=1 --nocapture-> 1 passed, 0 failed, 0 ignored (0 skipped).debug):cargo test --workspace -j 8 --no-fail-fast -- --test-threads=8 --show-output-> 1826 passed, 9 failed, 48 ignored across 45 targets (xcl --lib: 1696 passed, 3 failed, 28 ignored), plus 29SKIPPEDnotices (21no wave64, 3wave32, per-lane form: refused, 3no D3D12 debug layer/no d3d12SDKLayers.dll, 2no heap windowsincluding the opt-in test).origin/nvidia-dev(eae01502): all 9 failures (gpu_compute_thread_limits_leave_the_lanes_past_them_out,pieces_hold_the_texels_of_their_levels,gpu_parts_of_a_texture_go_up_and_the_rest_stays,console_ms_in_as_slot_and_ms_with_as_are_refused_cleanly,async_compute_pso_registers_real_pso_and_not_standin,split_compute_prefers_the_offline_whole_pipelinex2,two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobsx2) reproduce identically (0 passed, 9 failed) oneae01502— 0 new failures introduced by PR #2815.release,scripts/smoke.ps1 -Seconds 60 -Title 'c1cc91a4'):42532264vseae01502, 29 x 2 s samples): 99.3% frames (1588 vs 1599), 100.9% peak commit (14894 vs 14760 MB), VRAM local peak 6129 MB (vs 6188 MB), non-local peak 4845 MB (vs 4885 MB), target pages peak 3546 MB (vs 3548 MB), sparse pools peak 896 MB / 838 MB mapped (identical).Code review findings (
42532264)record_queue_fence(crates/xcl/src/hle/d3d12x/bind.rs) uses.max(value)per(queue, fence)for out-of-order submit callbacks, andfence_statemapsu64::MAXtoFenceState::Removedin bothretire_recording_resandreclaim_fenced.crates/xcl/src/hle/d3d12x/bind.rs(retire_recording_res):FENCED_BYTES.fetch_add(bytes, Ordering::Release)runs afterFENCED_RES.lock()is released, whereasreclaim_fenced()runsFENCED_BYTES.fetch_sub(reclaimed, Ordering::Release)insideFENCED_RES.lock(). Concurrentreclaim_fenced()draining the new batch beforefetch_addexecutes can transiently underflowFENCED_BYTESuntilfetch_addcompletes (visible innote_two_passlogs). Movingfetch_addinside theFENCED_RESlock fixes this cleanly.reclaim_fenced()polling andFenceState::Removedlive inbind.rsrather thanalloc_pool.rs, and theREADME.mddiff documents retired two-pass buffer reuse without namingXCL_TWO_PASS_MB.origin/nvidia-dev(eae01502); no duplicates/redos flagged (duplicate_candidates: [],seems_to_redo_merged: []); stacked with #2816 and #2817, and overlaps with #2831 onalloc_pool.rsfor device-removal handling.Not tested
XCL_HEAP_WINDOWS=1.AI use
Antigravity (agy) with gemini-pro-orchestrator-argon (audited by gemini-pro-orchestrator-argon): checked out PR #2815, reviewed the diff, executed all builds, targeted/full workspace tests, baseline attribution checks, and the 60 s retail smoke run on local hardware, and wrote and audited this report.Imported from ivall/xcl. Originally posted by Aniseto on 2026-11-26T21:37:11Z.
Re-ran the fence-reclamation tests at
44ed31fcafter the head moved from71b1a93; this is a new response in the same thread, not an edit of my earlier report:Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 14.44.35207, DXC 1.9.2609.5, debug build.
two_pass_binds_set_the_shared_view_heapwas SKIPPED (opt-inXCL_HEAP_WINDOWS=1). This is the same two-filter command the author lists, run serially here. The head was rebased onto a much newer tree (about 8,400 inserted lines), so the four test names I used at71b1a93no longer exist; the count is now 69 instead of the author's 68 at four threads. All pass on this adapter.Not tested: the full workspace suite and its 13 known failures, a paired smoke run, a real device removal,
XCL_HEAP_WINDOWS=1, release profile, AMD and Intel GPUs, native wave64, Wine, game data.AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.
Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-26T21:37:34Z.
Focused idle-pool regression on #2815 head
44ed31fc, compared with itsnvidia-devbaseeae01502.release_allocator_resnow passes an empty vector toput_free_bufswhen the allocator has no retired buffers. Its early return skipsFREE_RES.take_idle. The base swept the free pool on every allocator release. After a two-pass phase ends, a scene that continues resetting allocators but makes no more two-pass buffers can retain expired buffers inFREE_RESindefinitely, up to its 1 GiB cap.take_freedoes sweep, but that path needs another two-pass buffer request.I added a local WARP regression that puts one 64 KiB buffer in the free pool with an age over three seconds, releases an unrelated empty allocator, and checks the pool directly. It avoids
take_freein the assertion because that would itself sweep the pool. On unmodified head,cargo test --offline --locked -p xcl --lib an_empty_allocator_release_trims_idle_two_pass_buffers -- --nocapture --test-threads=1failed 0 passed, 1 failed (idle buffer survived an empty allocator release). With the local candidate below, the same test passed 1 passed, 0 failed.cargo test --offline --locked -p xcl --lib hle::d3d12x::bind::tests -- --test-threads=1then passed 62 passed, 0 failed, 0 ignored, with one explicit GPUSKIPPEDnotice for the opt-in heap-window test; that notice is not coverage.Small candidate for the empty allocator path
Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti / 621.35; the test used the D3D12 WARP adapter. Synthetic resource only. I did not run the full workspace suite or a retail smoke pair, so this is a focused finding and candidate, not a merge-readiness claim.
AI use: Codex (GPT-6.2 Astra) identified the candidate path; Codex (GPT-6.2 Sol) checked the current source and base, wrote and ran the regression and candidate, and drafted this report.
Imported from ivall/xcl. Originally posted by Decodere on 2026-11-26T22:52:20Z.
Follow-up independent desktop NVIDIA verification of PR #2815 at updated head
42ae60514ad2b3aaad5e940e2ad3b7bcc595d9b9(1commit; exact parent & merge-base onnvidia-dev:eae015021c639866ab061cdff2e9daf8ba9daac5). This supersedes our earlier check at42532264after the follow-up update addingbatch_buffer_reclaims_via_fence_when_recording_resets.Environment
7956 MiBreported by D3D12,7009 MBDXGI local video memory budget observed in this run), driver32.0.16.2114(NVIDIA621.14, WDDM 3.2)31.9 GiBusable), Windows 11 Home26200(Developer Mode off)rustc 1.100.0 (0ef1bc386 2026-11-09)MSVC, DXC1.9.2609.5,--releaseTargeted release tests & build (
42ae6051)cargo test --release -p xcl --lib batch_buffer_reclaims_via_fence_when_recording_resets -- --nocapture1 passed; 0 failed; 0 ignored; 1728 filtered out(0.01s)cargo test --release -p xcl --lib hle::d3d12x::alloc_pool:: -- --test-threads=4(3 consecutive runs)8 passed; 0 failed; 0 ignored; 1721 filtered out× 3 (0.21s,0.20s,0.21s)cargo test --release -p xcl --lib hle::d3d12x::bind:: -- --test-threads=4(3 consecutive runs)62 passed; 0 failed; 0 ignored; 1667 filtered out× 3 (0.28s,0.29s,0.29s;two_pass_binds_set_the_shared_view_heapself-skipped becauseXCL_HEAP_WINDOWSis opt-in)cargo build --release -p xcl --bin xcl1m 25s, exit0)Paired quiet 60 s retail smoke (
title: 29640639)Exact parent & merge-base on
nvidia-dev(eae015021c639866ab061cdff2e9daf8ba9daac5, cached baseline on the same machine):PR #2815 (
42ae60514ad2b3aaad5e940e2ad3b7bcc595d9b9):Runtime log observations (
xcl.log)9389log lines,0[ERROR]/ device-removal / panic lines.19207 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped); last memory sample14736 MB committed by the process; video memory 6119 MB local, 4755 MB non-local; video memory budget 7009 MB.Limits of coverage
batch_buffer_reclaims_via_fence_when_recording_resets) passed across 3× parallel--test-threads=4runs ofalloc_pool::andbind::(two_pass_binds_set_the_shared_view_heapself-skipped becauseXCL_HEAP_WINDOWSis opt-in).title: 29640639logged0live two-pass buffer events and verifies end-to-end stability and zero regression onnvidia-devrather than in-world two-pass VRAM savings; frame-count and peak-commit deltas vs. the cachedeae01502baseline reflect normal single-run startup/worker timing variance and are not attributed to this PR.AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).
Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-27T00:09:36Z.
Independent parent/head synthetic memory-reclamation check on RTX 5070, NVIDIA driver 616.92; Ryzen 7 5700X3D; Windows build 26300.10075; Rust 1.100.0 MSVC, debug.
Compared exact parent
eae015021c639866ab061cdff2e9daf8ba9daac5and head42ae60514ad2b3aaad5e940e2ad3b7bcc595d9b9with identical test-only instrumentation. Each arm submitted eight real indirect two-pass compute-proxy workloads, waited for completion, kept the command allocator alive without resetting it, and checked the expected values from earlier passes. Both tests passed, with zero failures, ignored tests or reported skips.These figures are XCL scratch-pool accounting, not total GPU residency. This test did not execute an actual mesh shader or GTA VI, and does not measure title frame rate or world-load behavior.
AI use: OpenAI Codex with GPT-6.2 Astra created the synthetic fixture and ran both tests; Codex coordinated and prepared this report.
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-27T00:32:02Z.
Tested: Clean
42ae60514ad2b3aaad5e940e2ad3b7bcc595d9b9, Windows 11 build 26200.9974, Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, Rust 1.100.0 MSVC debug. Builtcargo test --offline --locked -j 2 -p xcl --lib --no-run, then ran exact filters with--test-threads=1 --nocapture. Four CPU allocator/synthetic-fence tests, nine WARP reclamation tests, and four native Arc allocator tests passed with zero failures, ignores or skips. WARP covered the two-pass reclamation and resubmission paths. The Arc fixtures covered allocator reset, recording lifetime and resubmission.Not tested: Native Arc two-pass reclamation, real device removal, full suite and retail smoke.
AI use: T3 Code / Codex (
gpt-6.2-sol) ran and reran the checks and drafted this report.Imported from ivall/xcl. Originally posted by LocranKing on 2026-11-27T03:56:49Z.
Independent 180 s paired check on RTX 3060 Ti (8 GB) (
42ae6051merged withvidia-dev
ecc0bb57, Series S / lockhart profile, identical warm cache snapshot): 1,805 frames (PresentX 1806),Imported from ivall/xcl. Originally posted by Pipodi on 2026-11-27T07:07:46Z.
Test report on the NVIDIA branch (
nvidia-dev), PR head42ae6051, baseeae01502.Tested
9ae803e3, which contains this PR:cargo test --workspace -- --test-threads=4: 1829 passed, 9 failed, 48 ignored; 29SKIPPED(mostly "no wave64"). The 9 failures are 7 tests (details in the #2816 report); on42ae6051itself each of the 7 was run alone (--exact) and fails the same way as on the baseeae01502.9ae803e3(contains this PR): 260 s measured run after a warm-up, exit 0, 1145 frames presented, peak private 25.7 GB, no crash, no device removal.Not tested
42ae6051alone; AMD; release build; the title past its intro cinematic.AI use
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-27T12:24:26Z.
Tested
Clean
42ae60514ad2b3aaad5e940e2ad3b7bcc595d9b9on Windows 11 build 26200.9974, Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175 and Rust 1.100.0 MSVC. Built withcargo test --offline --locked -j 2 -p xcl --lib --no-run --message-format=jsonandCARGO_PROFILE_TEST_DEBUG=0. Ran each filter separately with--exact --test-threads=1 --nocapture:hle::d3d12x::alloc_pool::tests::a_reset_that_puts_the_allocator_aside_keeps_what_the_gpu_still_readshle::d3d12x::alloc_pool::tests::a_recording_outlives_the_reset_of_the_titles_allocatorhle::d3d12x::alloc_pool::tests::a_resubmit_while_the_previous_submit_runs_is_noticedhle::d3d12x::alloc_pool::tests::a_resubmit_waits_for_the_previous_submitFour passed, zero failed, ignored or skipped. The fixtures verified allocator reset while the GPU still reads, recording lifetime after title-side reset, and bookkeeping and waiting when a list is submitted again. Each process ran under the shared Arc mutex and matched its SHA-256 before, under, and after acquisition. The fixtures use the Windows default D3D12 device. A separate locked LUID probe identified that device as Arc A770 PCI 8086:56a0.
Not tested
Native Arc two-pass buffer reclaim, actual device loss, retail smoke, gameplay performance and the full workspace suite.
AI use
T3 Code / Codex (
gpt-6.2-sol) built and independently reran these fixtures and wrote this report.