D3D12.X: fail closed on heap retirement fences and sweep idle arenas without PAGES #2528
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2538"
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 Decodere on 2026-11-25T22:06:04Z.
Part of #1773
Part of #1585
Part of #1833
What is in it
Fixes three VRAM heap retirement and idle arena reclamation bugs in
crates/xcl/src/hle/d3d12x/vram.rs(without touchingArenas::take_for), updated in follow-up commit2fc8268271f4d025d408527a9b9cfd62730fab1cto address@throny's pre-merge review:CreateFence/Signalfailure with single-pass signaling (RetireQueue): Previously, under VRAM/commit pressure, ifmake_fenceorsignalfailed on all live queues (withunmap_mark == None),retire_withsawmarks.is_empty()and returnedheapsimmediately to drop while live queues were still using them; if it failed on 1 of N live queues, that queue was omitted sosweep_withdropped the heaps as soon as the remaining queues finished.RetiringBatch::marksis nowOption<Vec<(F, u64)>>(None= unarmed),RetireQueue::capture_marksreturnsNoneif ANY queue failsmake_fenceorsignal(preserving monotonic*v += 1on any already-signaled queue), andRetireQueue::retire_and_arm_with(called fromretire_heaps_and_sweep) queuesnewly_reclaimedunarmed first and callsretry_unarmed_withonce so each live queue receives at most oneSignalper call across previously-unarmed batches andnewly_reclaimed(while returningheapsimmediately only whenqueues.is_empty() && unmap_mark.is_none(), keepingunmap_mark-only batches waiting onunmap_mark, and leaving previously-unarmed batches fail-closed whenqueues.is_empty()).u64::MAXdevice-removed sentinel inRetireQueue::sweep_with: Added pure helperfence_reached(completed, target)(completed != u64::MAX && completed >= target) and applied it tounmap_mark,b.marks, and dead-queue fence pruning soID3D12Fence::GetCompletedValue() == u64::MAXon device removal never falsely reaps pending batches or prunes fences.before_execute: Added per-devicelast_sweep: Vec<(usize, Instant)>,record_sweep, andsweep_dropped_for_if_due(1 s interval, pruninglast_sweepwhen no arenas remain fordev) toArenas<H>, plusARENA_COUNTsynchronized on everyARENASlist mutation (place,before_execute). Inbefore_execute,has_pagesis tracked during thePAGESlock: ondo_reclaim(1 sPAGEStick),ARENAS.try_lock()sweeps idle arenas without blocking the submit thread; on!has_pages && ARENA_COUNT > 0, a lock-free 1 s monotonic atomic tick (ARENA_SWEEP_EPOCH+NO_PAGES_ARENA_SWEEP_MS) gatestry_sweep_arenas_if_due(ARENAS.try_lock()), advancing the tick only aftertry_lock()succeeds so contention withplace()holdingARENASacrossCreateHeapnever stalls submits or burns the 1 s window.hle::d3d12x::vram::tests, pure CPU,0skips):retire_queue_fails_closed_on_fence_or_signal_failure_and_recoversretire_queue_rejects_device_removed_sentinelarenas_sweep_dropped_for_if_due_reclaims_without_pagesretire_and_arm_single_pass_signals_once_per_queue_and_preserves_unmap_marktry_sweep_arenas_if_due_is_non_blocking_and_throttledTested
main(e1d84b7d9153f86a97d2ec5d209d196046fc0bea) with the originalRetireQueuetests:retire_queue_fails_closed_on_fence_or_signal_failure_and_recoverspanicked:all-fail must hold heaps.retire_queue_rejects_device_removed_sentinelpanicked:u64::MAX sentinel must neither reap nor prune.2fc8268271f4d025d408527a9b9cfd62730fab1cverified on Windows 11 (26200), NVIDIA GeForce RTX 4060 8 GB (Ada, Wave32, driver32.0.16.2114), Intel Core i5-11400F, 32 GB RAM,rustc 1.100.0, DXC1.9.2609.5:cargo clippy --tests -p xcl -- -A clippy::approx_constant -A clippy::while_immutable_condition:exit 0,0new warnings invram.rs(-Asuppresses only pre-existingrustc 1.100.0deny-by-default lints outside this diff).cargo test --lib -p xcl hle::d3d12x::vram:: -- --test-threads=1 --nocapture(3xDebug):24 passed; 0 failed; 1 ignored(churn_update_tile_mappings_timing),0skipped.cargo test --release --lib -p xcl hle::d3d12x::vram:: -- --test-threads=1 --nocapture(3xRelease):24 passed; 0 failed; 1 ignored,0skipped (all 5 PR pure-CPU unit tests plus live RTX 4060 GPU testsgpu_retire_queue_holds_heap_until_blocked_queue_passes_mark,d32s8_targets_take_their_own_size_of_video_memory, andreservable_agrees_with_the_driverpassed).cargo build --release -p xcl:exit 0,0new warnings invram.rs.73ff10e9ba8c4e7d45362bb8637536b52aba1686also passed full release workspace testing (37test binaries:1426 passed; 0 failed; 46 ignored), WARP (XCL_ADAPTER=warp,22/0/1), and independent community testing in this thread including@ClosetPie107(AMD Radeon RX 9070 RDNA4 / Mesa RADV Wine/Proton,vram::22/0/1and 300 s retail run PASS),@emirduran707(AMD Radeon RX 9060 XT RDNA4 Windows, 60 s retail run PASS),@andrewDoing(RTX 5070 no-PAGESarena fixture PASS),@SlopTart(AMD RX 7900 XT Wine/Proton PASS), and@DavidM1911(RTX 3060 Ti PASS).Regression run
Before (
maine1d84b7d9153f86a97d2ec5d209d196046fc0bea, exact parent of73ff10e9):After (
fix-vram-retire-fail-closed-arenas2fc8268271f4d025d408527a9b9cfd62730fab1c):Both 60 s runs reach steady
60 60 60presents per 2 s with0device removals,0crashes,1576vs1508frames shown (104.5%), and13992 MBvs14016 MBpeak commit.Not tested
CreateFenceOOM orDXGI_ERROR_DEVICE_REMOVEDinjection on hardware (both failure paths, single-pass signaling, andARENAS.try_lock()contention are exercised deterministically in the pure-CPU unit tests).d3d12SDKLayers.dllis not installed on this machine) and native wave64 GPU tests on this machine (RTX 4060 is wave32-only; AMD RDNA4 was verified independently on73ff10e9by@ClosetPie107and@emirduran707, and2fc82682has not yet been re-run on AMD hardware).AI use
Written and verified with Google Antigravity (Gemini 4 Neon). All code changes, failing-first reproductions, targeted
3xDebug/Release RTX 4060 test runs, clippy checks, clean release build, and quiet 60 s GPU smoke runs were executed and checked locally.Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T22:17:50Z.
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!
Imported from ivall/xcl. Originally posted by emirduran707 on 2026-11-25T22:24:17Z.
Independent AMD RDNA4 (native wave64) test report on exact head
73ff10e9ba8c4e7d45362bb8637536b52aba1686(clean detached checkout, no local changes).Tested
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: 1424 passed, 2 failed, 46 ignored; 8 SKIPPED (6 inlower_dxil::tests::{f16,f32}_programs_on_the_gpurefused 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.hle::d3d12x::vram::tests::retire_queue_fails_closed_on_fence_or_signal_failure_and_recoversandretire_queue_rejects_device_removed_sentinel.gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1seed 722 andfuzz_validate_and_gpu_3seed 1599) are pre-existing on unmodifiedmainon this GPU.Regression run (60 s retail-title smoke,
XCL_NETWORK=0, release)(Matched
main68a284abaseline on the same machine today: 1573 frames, 14420 MB peak, 0 device removals, 0 crashes.)Not tested
AI use
Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-25T23:24: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 targetx86_64-pc-windows-gnurun under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29).gpu_suite (cold cache): 165 passed / 3 failed, no crashes. The three are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, promoted-UAV-clear driver gap, PR #2490); none caused by this PR.Targeted run of
retire_queue_fails_closed_on_fence_or_signal_failure_and_recoversandretire_queue_rejects_device_removed_sentinel: 2 passed. The sentinel test is a failure-path unit test; it does not exercise a real device-lost event on this lane.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.
Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-27T05:03:16Z.
I tested the no-
PAGESidle-arena path on RTX 5070 / NVIDIA 616.92 using the same test-only fixture against parente1d84b7d9153f86a97d2ec5d209d196046fc0beaand head73ff10e9ba8c4e7d45362bb8637536b52aba1686, with isolated build targets.The fixture places and releases a 64×64 RGBA8 render target in a 65,536-byte arena, verifies there is no active
PAGESentry, waits 2.2 seconds, and drivesbefore_execute. A native queue is held on a CPU-signaled fence while the test tracks the exact heap in the active arena and retirement queue.before_executecall. One focused test passed, with no skips.This tests XCL heap ownership in a synthetic single-queue case. It does not measure driver residency, actual title VRAM savings, frame time, or behavior under physical memory pressure.
AI use: OpenAI Codex with GPT-6.2 Astra built and ran the fixture; Codex reviewed and prepared this report.
Imported from ivall/xcl. Originally posted by ClosetPie107 on 2026-11-27T12:51:54Z.
Update for head
2fc82682(adds2fc82682on top of73ff10e9, which the results below are for). Same machine and setup as below (RX 9070 16 GB / Mesa 26.3.1 RADV / Proton Experimentalexperimental-11.0-20261112, vkd3d-proton masterec207194without the allocator / command-listlpVtblchecks, DXC 1.9.2609.5, Rust 1.96.0,x86_64-pc-windows-gnudebug build). The head itself (basee1d84b7d), withmainf9a0cb80the same session as the baseline.Tests (
XCL_REQUIRE_GPU=wave64)cargo test -p xcl --lib -- hle::d3d12x::vram:: --test-threads=1: 24 passed, 0 failed, 1 ignored (main: 19 passed, 0 failed, 1 ignored).cargo test --workspace --no-fail-fast -- --test-threads=4with--skip compositor_blends_ui_plane_over_scene_plane --skip failed_restore_stops_before_importing_an_unbacked_window --skip grooming_leaves_a_window_under_1_gib_only_its_hole(the first loses the RADV device here, the other two run out of memory under Wine): lib 1293 passed, 9 failed, 26 ignored;mainf9a0cb80lib the same session: 1323 passed, 9 failed, 27 ignored (--test-threads=1and two--test-threads=4runs). All failures are amongmain's. The other binaries fail the same 3 tests as onmainhere (e2e,pls_quota,predication_e2e).d3d12_resource_and_syncended the process, as it does onmainhere.Not tested on this head: a retail run (the run below is for
73ff10e9); native Windows, NVIDIA / Intel.AI use: Claude Code (Claude Opus 5.5) ran the builds and tests on my machine and wrote this update.
Independent test report under Wine/Proton (not native Windows) for head
73ff10e9.Setup
experimental-11.0-20261112, vkd3d-proton masterec207194with a local patch dropping thelpVtblchecks ind3d12_command_allocator_from_iface/d3d12_command_list_from_iface, DXC1.9.2609.5, Rust 1.96.0,x86_64-pc-windows-gnumain83b00818, test commit1fcf2e6eTests (debug,
XCL_REQUIRE_GPU=wave64,--test-threads=1)hle::d3d12x::vram::: 22 passed, 0 failed, 1 ignored (main: 19 passed, 0 failed, 1 ignored)cargo test -p xcl --lib -- --test-threads=4 --skip compositor_blends_ui_plane_over_scene_plane: 1323 passed, 8 failed, 27 ignored (mainthe same run: 1319 passed, 9 failed, 27 ignored). The failures are all amongmain's. Without the--skip, the lib binary lost the device in that test (RADVThe CS has been rejected), the test-order problemmainhas (see my report on #2477).Retail title, 300 s (release, from a copy of the same warm-cache snapshot;
XCL_DIRECT_DXIL=1 XCL_PREPARE=1 XCL_PSO_PRELOAD=1 XCL_PSO_WAIT_MS=50 XCL_TEXTURE_LEVEL_PAGES=1 XCL_COHERENT_MB=1024 VKD3D_CONFIG=ignore_shared_fence,Apressed every 10 s)main.main, 4 runs: all clean, 1,892–2,122 presents, 10,148–10,265 MiB at 90 s.Not tested
AI use
Imported from ivall/xcl. Originally posted by throny on 2026-11-27T16:23:08Z.
Pre-merge check of this PR against today's
main(6089122a; the merge is clean andvram.rshas not changed onmainsince your base). One finding I would want fixed or measured before it goes in, and three small ones:ARENASlock on everybefore_execute, not once a second. The newelse if ARENA_COUNT > 0branch runs wheneverdo_reclaimis false, so also between the one-second page ticks, and it scans the arena list each time.placeholdsARENASacrossCreateHeap(arena_heap), so a loader thread placing an arena-backed target (depth-stencil, MSAA, packed 3D mips) can make the submit thread wait for a wholeCreateHeapinsiderefresh_once. Arenas are the default fallback, so this is on for most titles. The doc comment says the sweep runs "when PAGES has no active entry", which is narrower than what the code does. A tick like the pages have (or atry_lock) would remove the cost; otherwise a frame-time measurement in a world run would settle it.queues.is_empty()returns early), so their heaps stay.u64::MAXsentinel, the idle sweep); small enough at ~190 lines, but they could land separately.What I found sound: signalling again later can only delay a release, never make it early; the sentinel keeps a removed device from freeing heaps; no heap is dropped under a lock; no new lock order. The three new tests need no hardware and two of them fail on
mainwithout the change.Evidence gap for a default-on change: the description has a 60 s smoke run on one NVIDIA card; nothing on AMD in the PR itself, and no test where
CreateFenceorSignalreally fails.This is a review from reading the code, nothing was built or run for it. AI use: Claude Code (a Claude Opus 5.5 sub-agent reviewed the merge result; Claude Fable 5.2 checked and wrote this).
Imported from ivall/xcl. Originally posted by throny on 2026-11-27T16:25:28Z.
Merge status (I have been asked to prepare merges of PRs with several independent tests; the bar is: no open critical finding or performance regression, a fresh check of the merge result against today's
main, and green required checks. Each merge is still confirmed by a person.)Not proposing this one yet because of the finding in my review above (the arena sweep locks on every submit). With that addressed, or with a frame-time measurement showing no cost, it is a quick re-check: the rest of the change read as sound and it merges cleanly.
AI use: Claude Code (Claude Fable 5.2).
Imported from ivall/xcl. Originally posted by Decodere on 2026-11-27T16:50:10Z.
Thanks for the thorough review,
@throny! I pushed follow-up commit2fc8268271f4d025d408527a9b9cfd62730fab1c(D3D12.X: throttle no-PAGES arena sweep with try_lock and single-pass retire signals) addressing the submit-threadARENASlock blocker and the signaling/comment nits:ARENASlock perbefore_execute(blocker):before_executenow recordshas_pageswhile holdingPAGES. Between 1 sPAGESticks on devices withPAGES,ARENASis never touched at all.do_reclaimtick,before_executeuses non-blockingARENAS.try_lock()so a loader thread holdingARENASacrossCreateHeapinplace()can never stall the submit thread.!has_pages && ARENA_COUNT > 0, a lock-free 1 s monotonic atomic tick (ARENA_SWEEP_EPOCH+NO_PAGES_ARENA_SWEEP_MS) gatestry_sweep_arenas_if_duebefore callingARENAS.try_lock(), and advances the tick only aftertry_lock()succeeds so contention does not burn the 1 s window. Updated doc comments onARENAS,sweep_dropped_for_if_due, andbefore_executeto match.retire_heaps_and_sweepnow callsRetireQueue::retire_and_arm_with, which queuesnewly_reclaimedunarmed first and callsretry_unarmed_withonce so each live queue receives at most oneSignalper call across previously-unarmed batches and newly reclaimed heaps, while preservingunmap_mark-only retirement and keeping previously-unarmed batches fail-closed whenqueues.is_empty()(documented inline).2fc8268271f4d025d408527a9b9cfd62730fab1c(RTX 4060, Windows 11,rustc 1.100.0):retire_and_arm_single_pass_signals_once_per_queue_and_preserves_unmap_mark(verifies2total signals across2queues,unmap_markordering, andqueues.is_empty()fail-closed behavior) andtry_sweep_arenas_if_due_is_non_blocking_and_throttled(verifies non-blocking return whileARENASis held on the same thread, unburned 1 s window under contention, and lock-free short-circuiting within the 1 s interval).cargo clippy --tests -p xcl -- -A clippy::approx_constant -A clippy::while_immutable_condition:exit 0,0new warnings invram.rs.3xDebug +3xReleasecargo test -p xcl --lib hle::d3d12x::vram:: -- --test-threads=1 --nocapture:24 passed; 0 failed; 1 ignored; 0 skipped.cargo build --release -p xcl+ quiet 60 s RTX 4060 smoke (title: 29640639):1576frames (PresentX 1576),60 60 60,0device removals,0crashes,13992 MBpeak commit (vse1d84b7d1508frames /14016 MB).@ClosetPie107RX 9070 300 s and@emirduran707RX 9060 XT 60 s on73ff10e9, noting2fc82682itself has not yet been re-run on AMD hardware).Ready for re-check whenever you have a moment!
(AI use: Google Antigravity (Gemini 4 Neon) implemented the follow-up fix, ran the clippy/test/smoke verifications, and drafted this reply.)
Imported from ivall/xcl. Originally posted by throny on 2026-11-27T17:03:59Z.
merge-check
base:
6089122a(main)head:
2fc8268271merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1469 passed, 1 failed, 47 ignored (26 SKIPPED lines); failing:
gpu::recomp::dxc::cache_tests::concurrent_cache_misses_compile_once, once. It is in a file this PR does not touch, passes on the base (1465 passed, 0 failed, 47 ignored, same tree minus the PR) and passed 5 of 5 reruns on the merge result, so I count it as a flaky test, not as this PR's.review: the blocker of my first review is gone on every path: with PAGES the arena list is not touched between ticks and only with
try_lockon the tick; without PAGES an atomic count, the atomic tick, thentry_lock, and a failedtry_lockdoes not use up the tick. Heaps are still dropped outside all locks, no new lock order, fence values only go up,u64::MAXis never "reached". Two points that do not block, for a follow-up: (1)NO_PAGES_ARENA_SWEEP_MSis one tick for all devices and advances even when the calling device has no arenas, so with two devices without PAGES a busy one can keep an idle one's arenas from being swept until its nextplace(); (2) a batch that can never complete (unarmed with no queue left, or after device removal) keepsRETIRING_BATCHESabove 0, so every later submit collects the queues and takes the retire lock. Nits: the two gates round differently (whole ms vsInstant), and the fail-closed test goes through the test-onlyretire_with, notretire_and_arm_with.performance: by default one atomic load per submit while arenas exist; not measured in a title by me. The author's 60 s pair shows 1576 vs 1508 frames.
verdict: safe to merge (one more merge check by another account needed, see #3041)
hardware / tool and model: RTX 4080 (621.40), i9-12900K, Windows 11, Rust 1.100.0, debug. Claude Code: a Claude Opus 5.5 sub-agent reviewed the merge result, Claude Fable 5.2 ran the suite and wrote this.
@Decoderethanks for the quick fix; your reply reached me late because the mention was in a code span.Imported from ivall/xcl. Originally posted by pickles976 on 2026-11-27T17:09:29Z.
Additional exact-production-head Wine check at
2fc8268271f4d025d408527a9b9cfd62730fab1c(parent73ff10e9ba8c4e7d45362bb8637536b52aba1686), with three local CPU-only fixtures added tovram.rs. Production unchanged. AI-assisted report using omp/OpenAI GPT-6 Astra; observed execution, not inferred test output.Tested
Linux6.17, i7-13620H,16GiB RAM, Wine11, Rust1.98.1 Windows-MSVC target. No GPU initialized or GPU work submitted in these selected tests. Fresh intended-worktree compilation25.22s. Nine focused tests: 8passed/1failed/0ignored,0.00s test time.
Passing coverage: all-queue retirement marks, partial CreateFence/Signal failures, fresh retry marks, a pending third queue holding the actual Rust heap owner, device-removal sentinel fail-closed, idle arena extraction followed by deferred owner destruction, unmap-fence preservation, one shared marking pass, and the new try-lock/non-consuming-contention/throttle fixture. These are CPU generic-queue/arena fixtures, not native GPU destruction or VRAM savings.
The new failure is cross-device starvation in the no-PAGES atomic throttle.
NO_PAGES_ARENA_SWEEP_MSis shared globally but the actual sweep is only fordev_key. Two no-PAGES devices have eligible idle arenas. Device1 submits just before device2 at each1s tick. Device1 frees its own arena on the first tick, then keeps refreshing the global tick even with no arenas of its own.ARENA_COUNTstays nonzero because device2 still owns an arena. Device2 arrives1ms later and is always rejected before the per-device sweep.A deterministic four-interval fixture returns
[101]for device1 but[]for device2, expected[202]; failure atvram.rs:2103. No sleeping or concurrency assumptions are needed. The same source schedule can repeat; this is not merely a guaranteed one-interval delay. Suggested owner direction: make admission per-device, or provide fair eligible-device progress without reinstating the blocking ARENAS lock on every submit. Do not release pending heaps to fix it.Repro fixture, inside the existing tests module:
Focused command (via the local Wine Cargo wrapper):
cargo test --locked --target x86_64-pc-windows-msvc -p xcl --lib -- cpu_only_retirement_ retire_queue_waits_for_all_queues_and_prunes_dead_queue_fences retire_queue_fails_closed_on_fence_or_signal_failure_and_recovers retire_queue_rejects_device_removed_sentinel arenas_sweep_dropped_for_if_due_reclaims_without_pages retire_and_arm_single_pass_signals_once_per_queue_and_preserves_unmap_mark try_sweep_arenas_if_due_is_non_blocking_and_throttled --nocapture --test-threads=1.Not tested
No full suite, matched-parent run, actual multi-device title, GPU destruction, measured VRAM/RAM reduction or frame-time comparison. This does not explain the separate Game-Init producer fence0/wanted1 stall. Deliberately blocked-GPU tests were not run on this host. Existing9GiB/512MiB/global safety guards unchanged.
Local evidence:
.compat-runtime/logs/verify-xcl2538-retirement-fairness-20261127T170310Z/; exact-head worktreexcl-pr2538-updatedretains test-only changes. Earlier pinnedxcl-pr2538at73ff was not tested or silently relabeled as this result.Imported from ivall/xcl. Originally posted by razormontana on 2026-11-28T00:49:53Z.
Native validation of a local NVIDIA adaptation derived from #2538 at
2fc8268271f4d025d408527a9b9cfd62730fab1c. The tested code was staged tree15d3826061d3ee456b5825b12a0eeef6e63f3348on NVIDIAd1be8103644791b7a65f068954324e93d4b1b565. It retains queue obligations across failed mark capture and checks for the device-removal sentinel. Windows 11 Pro build 22631, Core i7-10700K, RTX 3070 8 GB with NVIDIA 617.42, Rust 1.100.0 x64 MSVC.Tested
cargo check --locked --offline -p xcl --libpassed. Eight focused CPU retirement and arena checks passed. Three retirement regression assertions failed on the NVIDIA base with only their fixtures added.cargo test --offline --locked -j 1 -p xcl --lib hle::d3d12x::vram::tests::gpu_retire_queue_reclaims_heap_after_normal_copy -- --exact --test-threads=1 --nocapture. 1 passed, 0 failed, 0 ignored, 0 skipped. One ordinary direct-queue copy completed, read back correctly, and the sweep released the retirement-owned heap reference after the native fence mark. A separate reference kept the test heap live during the copy.Not tested
The exact published #2538 tree, its separate idle-arena scheduling change, or retail behavior.
AI use
Codex GPT-6.2 ran the focused validation, checked the results, and prepared this report.
Imported from ivall/xcl. Originally posted by Prime1997 on 2026-11-28T08:43:12Z.
I reused the fail-closed retirement proposal here for the NVIDIA candidate, retaining attribution rather than opening another PR. The scoped adaptation is 4ca3690b78edb9e24e663b8232d555840326bb56: failed fence creation/signaling retains the batch, device-removal completion is rejected, and fence values cannot wrap into the removal sentinel. Your separate arena scheduling changes are not included. Failed batches remain held through process exit, trading retention on the failure path for avoiding premature heap release.
The combined candidate
a4e83a1eb411e4d3e6cf6e8f202f1f2c42a1d16acompiled successfully withcargo build --locked --release -p xcl --target-dir <isolated target>on Windows x64 (230 seconds). This is combined-tree compilation, not an individual-PR build or GPU validation. Source review completed; regression fixtures are present but were not run after the user explicitly waived further shader/memory checks and requested an interactive launch. Hardware behavior, paired title regression and actual sustained memory savings remain unvalidated. No merge-readiness claim.Codex (GPT-6) prepared this scoped adaptation and report. Optional temporary contributor/testing coordination: https://discord.gg/gK3y7WRRY
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:19:07Z.
Triage (#1607) – head
2fc8268No open or merged PR makes the same change: main's
vram.rsRetireQueue::retire_withstill skips a queue whoseCreateFence/Signalfails and drops the heaps when no mark was taken, andsweep_withstill treatsu64::MAXas completed. #3125 makes the same fail-closed change forsparse.rs/late_release.rs, notvram.rs; #2981 touches this area inside a 49k-line diff.No problems found in the diff: unarmed batches are re-armed with later marks (conservative) and the
try_locksweep only defers work.The branch conflicts with main and needs a rebase.
Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.