Repository navigation
D3D12.X: reclaim ON_QUEUE uploads across all queues and clean up on release - #2912
real-alponzo wants to merge 1 commit into
Conversation
…elease reclaim_completed_on_queue now drains completed InFlight batches across all tracked title queues so idle/secondary queues do not pin staging buffers. Also remove released queues from ON_QUEUE in q_release to avoid leaking fences/staging buffers and pointer-reuse ABA. Assisted-by: Antigravity (Gemini 4 Neon)
|
RDNA4 run next to your RX 6800 one: the two new tests pass, and the PR adds no failure. One Tested: head
The one that fails with and without the PR, also single-threaded (panic text from the The new tests make their device with Not tested: the full workspace suite, a soak or title run, NVIDIA (these tests don't follow AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report. |
|
Title run on RDNA2 (the report above ran unit tests only): the 60 s pair is fine, but in 300 s runs this head lost the device in 2 of 2 runs, and its base in 0 of 2. There is also one review point in Setup: AMD Radeon RX 6800 (driver 32.0.21045.5002), i5-10600KF, 32 GB, Windows 11 Pro 26200, release. Head Regression run (60 s, after one warm-up run of base) 300 s,
Review point:
Reclaim across all queues. Not tested: the full suite on this head; whether the hang is in the release path or the cross-queue reclaim (no per-queue logging); NVIDIA. AI use: Claude Code (Claude Opus 5.5) read the diff, ran the builds and title runs, read the logs and wrote this comment. The numbers come from those runs on the hardware above. Correction, after a soak of the base: Update: full lib suite on this head ( |
|
Tested Clean
Both passed with zero failures, ignores or skips. Both logged the Arc A770 backend. The executable SHA-256 matched before, under and after the lock. Not tested A submit on one queue reclaiming completed uploads from a second tracked queue, final release with an upload pending, aggregate staging-pool totals during rendering, full workspace suite and retail smoke. These Arc results do not exercise the reported RX 6800 device hangs. AI use T3 Code / Codex ( |
|
Pending upload lifetime concern at The new cross-queue completed-batch drain checks each fence and looks appropriate for reclaiming idle-queue staging. The final-release hook needs the same ownership protection:
[INFERENCE] If final queue release occurs while an upload is pending, staging can therefore become reusable/freed before its consumer completes. This is independent of whether native queue destruction might subsequently wait. I have not reproduced GPU corruption/device removal, and am not attributing other reporters' device removals to this path. The new Suggested correction: remove the queue-address entry immediately to avoid stale-address reuse, but transfer unfinished batches and their fence/value into fence-owned retirement; reclaim only after completion or an explicitly handled device-teardown path. Do not block waiting while holding Actual PR base is |
Port #2912 so finished staging allocations are reaped even when the originating queue goes quiet. Assisted-by: Codex (exact model identifier unavailable)
Reclaim completed
ON_QUEUEtexture upload batches across all tracked title queues and remove released queues fromON_QUEUEinq_release.Why
reclaim_completed_on_queuepreviously only polled the submittingqueue_key, allowing completed upload batches on idle or secondary command queues to keep staging buffers pinned until those queues uploaded again.q_releasecleaned uplist_xstate for the released queue but left its entry intitle_textures::ON_QUEUE, leaking itsID3D12Fenceand anyInFlightstaging buffers (up to 512 MiB) and risking pointer-reuse ABA if a later queue is allocated at the same address.What is in it
reclaim_completed_on_queueincrates/xcl/src/hle/d3d12x/title_textures.rsto drain completed batches across all tracked queues viadrain_completed.title_textures::on_queue_release(queue_key)and wired it intoq_releaseincrates/xcl/src/hle/d3d12x/real.rs.drain_completed_reclaims_only_finished_batchesandon_queue_release_removes_tracked_queue_entry.Regression run
Base (
main):PR head (
baaf024d):Tested
rustc 1.100.0, DXC 1.9.2602.17.cargo test -p xcl --lib drain_completed_reclaims -- --nocapture:1 passed; 0 failed; 0 ignored; 1695 filtered out.cargo test -p xcl --lib on_queue_release_removes -- --nocapture:1 passed; 0 failed; 0 ignored; 1695 filtered out..\scripts\smoke.ps1 -Game "C:\VIctory-SSD-test\game" -Seconds 60on8b957becandbaaf024d(blocks above).Not tested
cargo test --workspaceonamd-dev(noteamd-devhas pre-existing no-GPU CI test failures unrelated to this change).AI use
q_releasecleanup, implemented the fix and unit tests, ran the tests and paired smoke runs, and drafted this PR description.