D3D12.X: run sparse::readback_after_execute asynchronously per queue #1722
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1732"
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 gustavsi on 2026-11-24T20:01:23Z.
Move
sparse::readback_after_executeoffsparse::State::queueand out from underSTATE.lock()into per-queue FIFO background workers, completing asynchronously when the queue has an unsatisfied title/wait-before-signal GPUqueue.Wait(avoiding CPU/GPU deadlocks on wait-before-signalWait64BitValueX) and synchronously otherwise (preserving immediate CPU visibility after a GPU fence wait). Part of #1452.Stacked on #877 (
3b76b082); only the top commit (73d6598e) belongs here.Previously,
sparse::readback_after_executelockedSTATE, calleds.queue.Wait(&s.rb_fence, v), and synchronously executeds.readback_ranges(&merged)(s.wait_for(s.value)with a 5,000 ms timeout) insideExecuteCommandLists. When an async compute queue carried both a sparse memory write and a wait-before-signalWait64BitValueXwhose producer direct queue had not yet been submitted on the same thread, this deadlocked both the submitter thread (preventing submission of the producer queue) andsparse::State::queuefor 5,000 ms per submit, triggering repeatedxcl-sync-watchdogtimeouts and causing a retail title's stall watchdog to abort after 5–6 consecutive submits.With per-queue FIFO workers waiting on a raw per-queue fence outside
STATE.lock()before invokingreadback_ranges,sparse::State::queueis never stalled behind a blocked title queue. Active unsatisfied titlequeue.Waitcalls and unsubmitted wait-before-signalWait64BitValueXbridges are tracked viasparse::note_queue_wait(ignoring XCL's own internal fences such assparse::before_execute'ss.fenceso an in-flight internal upload underXCL_D3D12_DEBUG=1never causesreadback_after_executeto return beforeCopyBufferRegioncompletes, fixing theWrite32BitValueBottomOfPipeXzero-read reported by @razormontana).If a fence wait times out after 5,000 ms (while the device is still alive), the worker wakes any synchronous caller with
RbStatus::Deferred(never falsely claimingRbStatus::Completed) and retains the job in a per-worker FIFOdeferred: VecDeque<RbJob>queue, polling and draining it in order once the fence completes so CPU coherence is never silently lost (fixing @bmjask's P1).To prevent an asynchronous or deferred readback from overwriting a newer CPU write made after the submit (flagged by @GreemSC),
readback_after_executesnapshots the per-64-byte-segment CPU hashes of the committed target ranges when recording the job. At copy-back time,readback_rangesskips any segment whose current CPU bytes differ from the snapshot (unless they match an intervening readback recorded while multiple jobs are in flight, so consecutive deferred readbacks on the same range still land) and leavessentdirty for any skipped 64-byte chunk so the nextbefore_executeuploads the CPU's newer bytes.What is in it
crates/xcl/src/hle/d3d12x/sparse.rs:RB_QUEUESmap (RbQueueStateholding a rawID3D12Fenceviasuper::real::create_raw_fence, monotonic fence value, and channel sender to a dedicatedxcl-sparse-rb-<queue>FIFO worker thread) andQUEUE_WAITStracking (note_queue_wait,queue_has_unsatisfied_wait,forget_queue).readback_after_executefilter/merge sparse ranges usinguma::get(), signal the queue's fence, register new queues withs.note_queue(queue)(preserving #2345's parked-tile quarantine tracking), snapshot committed 64-byte-bounded segment hashes (State::snapshot_ranges) underSTATE.lock(), and enqueue anRbJobwithout holdingSTATEacross GPU waits — returning immediately ifqueue_has_unsatisfied_waitis true, or waiting on the job'sRbStatuscondvar outsideSTATE.lock()otherwise (logging when a synchronous wait is deferred instead of completed).State::readback_rangescheck the recordedRbSnapshot(and a boundedlast_rbmap active only while multiple readback jobs are in flight) before copying each 64-byte-bounded segment, skipping CPU-modified segments without marking their 64-byte chunk clean insent, and flushing staging with at least one tile of headroom so staging flushes never split a 64-byte segment.spawn_rb_worker_with) wait on its fence outsideSTATE.lock()(5,000 ms timeout). On completion, drain any earlier deferred jobs first in FIFO order, runreadback_ranges, and reportRbStatus::Completed; on timeout (whileGetCompletedValue() != u64::MAX), reportRbStatus::Deferredand retain the job indeferred: VecDeque<RbJob>so it retries every 20 ms (and on subsequent jobs / bounded teardown drain) until the fence completes.readback_after_execute_does_not_block_on_stalled_queueinternal_fence_wait_keeps_readback_synchronoustimeout_then_completes_still_reads_back_cpu_memorydeferred_readback_preserves_newer_cpu_writescrates/xcl/src/hle/d3d12x/real.rs&crates/xcl/src/hle/d3d12x/list_x.rs:queue.Waitcalls (is_fenceinq_wait_pcandqueue_dispatch) and unsubmittedWait64BitValueXGPU bridges (unsubmittedintry_gpu_wait) viasparse::note_queue_wait, and clean up per-queue state inq_releaseviasparse::forget_queue.Tested
GE-Proton11-14-x86_64,vkd3d-proton(-Db_ndebug=true), DXC 1.9.2609.5, cross-compiledx86_64-pc-windows-msvc(clang-cl+lld-link).3b76b082, onmainf9a0cb80+ #867021b2c33+ #871cb3902a4) at73d6598e(no conflicts, commit diff unchanged) underGE-Proton11-14(XCL_DXC_DIRset):hle::d3d12x::sparse:: --test-threads=1: 22 passed, 0 failed, 1 ignored (includingdeferred_readback_preserves_newer_cpu_writes,timeout_then_completes_still_reads_back_cpu_memory,readback_after_execute_does_not_block_on_stalled_queue, andinternal_fence_wait_keeps_readback_synchronous)hle::d3d12x::list_x:: --test-threads=1: 40 passed, 0 failed, 0 ignoredhle::d3d12x::real:: --test-threads=1: 67 passed, 0 failed, 0 ignoredhle::d3d12x::alloc_pool:: --test-threads=4: 4 passed, 0 failed, 0 ignoredpwsh ./scripts/smoke.ps1(withGE-Proton11-14wrapper,XCL_PREPARE=0):649frames shown (PresentX 649,0 0 8/2 s),exit: 0x0,0crashes,0device removals.Regression run
Produced under Wine (
GE-Proton11-14, AMD Radeon RX 9060 XT,XCL_PREPARE=0 XCL_NETWORK=0 XCL_PSO_PRELOAD=0 XCL_RUN_SECONDS=60 XCL_ACTIVITY=1,VKD3D_CONFIG=""). The PR run used unmodifiedpwsh ./scripts/smoke.ps1via a thin Wine wrapper;main(e0d93c84) crashed before writingreport.json, so its block was extracted from the samexcl.log(peak commit: 0 MBis what Wine reports inxcl.log).main(e0d93c84):This PR (
73d6598e, stacked on #877):Not tested
f14d6976and RTX 3060 Ti by @DavidM1911 before the timeout-retry and snapshot-guard updates).AI use
Gemini 4 Neon) restacked cleanly onto updated #877 (3b76b082, onmainf9a0cb80), ran the Proton tests and 60 s smoke run at73d6598e, and updated this description (as well as the earlierRbSnapshot/last_rbCPU-write protection anddeferred_readback_preserves_newer_cpu_writesregression test).c7fac707restack verification.Imported from ivall/xcl. Originally posted by LocranKing on 2026-11-24T20:37:33Z.
Independent Windows release GPU check on NVIDIA RTX 3060 Ti (
00eec16bbc2b41bc4f56d0f8486dfbcbe8073169, merge-baseb7aa9f3bd212088e0d927439284dc5ed325ce3c7):test_title_runs_and_game_folder_is_untouchedfails onWrite32BitValueBottomOfPipeX: 0x0(the 60 s retail smoke passes).Setup
8024 MiB VRAM, wave32), driver32.0.16.210131.8 GBRAM26200rustc 1.100.0, DXC1.9.2602.17,--releaseWorkspace tests (
cargo test --workspace --release --no-fail-fast -- --test-threads=4)101: 773 passed, 1 failed, 41 ignored across 20 result blocks (SKIPPED: 2no wave64, 2no D3D12 debug layer).crates\xcl\tests\e2e.rs:132:5(test_title_runs_and_game_folder_is_untouched): This looks directly related to movingsparse::readback_after_executeonto an asynchronous per-queue worker: after the title's GPU fence wait completes, the CPU reads0x0before the async readback copies the GPU write back to CPU memory.b66a150,fbf1440) on top ofb7aa9f3.Regression run (
scripts/smoke.ps1, 60 s,XCL_NETWORK=0, title folder name redacted)b7aa9f3:1585 / 1508frames (105.1%),15209 / 14730 MBpeak commit (103.3%),0device removals,0crashes.Base (
mainb7aa9f3):PR head (
00eec16):Not tested: Linux / Wine, repeating
e2eto measure flake rate vs deterministic failure, AMD / wave64 hardware.AI use: Antigravity (
Gemini 4 Neon) built and ran the workspace test suite and smoke pair on this hardware and drafted this report from the captured outputs; reviewed before posting. No game files attached.Imported from ivall/xcl. Originally posted by gustavsi on 2026-11-24T21:13:59Z.
Thanks @LocranKing for catching that on Windows!
Your diagnosis was spot on: when an unstalled queue (like
testtitle'sWrite32BitValueBottomOfPipeX+wait(&queue, &fence, 1)) completes, the title's own GPU fence completed before the background worker finishedreadback_ranges.Updated
64cb447to track active unsatisfiedqueue.Waitcalls (sparse::note_queue_waitinq_wait_pcandlist_x::try_gpu_wait, cleaned up inq_releaseviasparse::forget_queue):queuehas an unsatisfiedqueue.Wait(wait-before-signalWait64BitValueXwhose producer is not yet submitted),readback_after_executereturns immediately while the per-queue FIFO worker finishes asynchronously (never deadlocking the submitter thread or stallingsparse::State::queue).queuehas no unsatisfiedqueue.Wait,readback_after_executestill waits on the queue's fence outsideSTATE.lock()and offsparse::State::queue, but waits for the FIFO worker's completion condvar before returning so CPU reads right after a GPU fence wait always observe the updated bytes.(The two earlier commits
b66a150/fbf1440are there because this PR is stacked on #877 for Wine smoke testing; only the top commit64cb447belongs to this PR.)Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T22:37:39Z.
Verification on RTX 3060 Ti (Windows 11): merge conflict with current
mainincrates/xcl/src/hle/d3d12x/vram.rs— needs a rebase before it can be tested.Imported from ivall/xcl. Originally posted by gustavsi on 2026-11-24T22:44:48Z.
Thanks @DavidM1911! Rebased the stack (#867 -> #871 -> #877 -> #1732) onto
main689f2db(HEADe4d8229, resolving thevram.rsconflict) and re-verified unit/GPU tests and the 60 s smoke run under Wine — ready for Windows testing.Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T04:09:24Z.
XCL PR #1732 verification on Intel Arc A770
Head
e4d8229650344e003513bd3775eb90502854c96b, detached and clean. STOR-WINLAB ran Windows x64 build 26200.9974 on an AMD x64 CPU and Intel Arc A770 (driver 32.0.101.9175). DXC 1.9.2609.5 and rustc 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc). Debug profiles, with debug info and incremental compilation disabled.Tested
cargo build --workspaceandcargo test --workspace --no-runsucceeded outside the Arc mutex. Cargo listed 19 test binaries.cargo test -p xcl --lib hle::d3d12x::sparse::tests::<name> -- --exact. Each reported 1 passed, 0 failed, 0 ignored and 0 skip markers.readback_after_execute_does_not_block_on_stalled_queueexercised sparse UMA on the A770. It asserted return in under one second with an unsignaled compute-queue fence, availability ofSTATE, and queue drain after the fence was signaled. It then exercised the unstalled call.ensure_mapped_with_query_holes_skips_uncommitted_pages_on_readbackchecked that readback across sparse holes did not fault and that a write to a newly committed page was detected. Both D3D12 filters ran under the Arc mutex withXCL_ADAPTER=A770. The holes test selects the default D3D12 device with a WARP fallback internally.lazy_range_helpers_track_tile_overlap_holes_and_nonzero_pageschecked overlap, hole masks and nonzero-page detection withXCL_ADAPTER=NONE_CPU_ONLYoutside the mutex.cargo test --workspace --no-fail-fast -- --test-threads=4ran once underInvoke-ArcTest.ps1withXCL_ADAPTER=A770andRUST_TEST_NOCAPTURE=1. Exit 101. All 20 result lines (19 binaries and one doctest suite) sum to 954 passed, 25 failed and 45 ignored. All three focused tests also passed in this run.Workspace failures and skips
24 DXIL/recompiler tests failed (20 compute PSO rejections with 0x80070057 and four output mismatches). The title e2e failed its dynamic depth-bias check (blue pixel, expected green). The log contains 25 exact
SKIPPEDlines, excluded from coverage.Not tested
Matched main run, retail-title smoke, sample-data coverage, Wine or other GPUs.
AI use
T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against
pr1732-suite.logand published.upstream-sync referenced this pull request2026-11-25 06:04:27 +00:00
Imported from ivall/xcl. Originally posted by gustavsi on 2026-11-25T15:20:56Z.
Thanks @JJAutoCompare for verifying all three focused
sparse::testson Intel Arc A770!Rebased onto
main(06c9f55) + updated #877 (aec41e2) at2fb4601, verifiedsparse::17/0/1,list_x::34/0,alloc_pool:: --test-threads=44/0 × 3, and a fresh 60 s smoke run (exit: 0x0,1066frames,0crashes,0removals).Imported from ivall/xcl. Originally posted by razormontana on 2026-11-25T16:00:48Z.
Independent native Windows release test for #1732 on NVIDIA RTX 3070.
The synthetic title's D3D12 debug-layer run read
0x0afterWrite32BitValueBottomOfPipeX, which expects0x12345678intests/testtitle/src/gpu.rs. The assertion surfaced atcrates/xcl/tests/e2e.rs:293. The parent stack passed all five isolated debug-layer trials. The PR head and its local merge each reproduced the zero read in all five trials.Tested
x86_64-pc-windows-msvc, DXC 1.9.2602.17. Release builds ran in a standard user session withXCL_ADAPTER=3070andXCL_NETWORK=0.aec41e2cd15e0dd81ec4c28d82ff4a26929e892a, PR head2fb46019a11a3641453d7c2eef97e72fe894be20, and a cleanly applied local merge of that PR head intomainsnapshot082944135cd2b96288470a595861fa608eee08dc(tree52387c8562305f6f1dd1f58689f337e0a536109f). Each revision had its own Cargo target directory.test_title_runs_and_game_folder_is_untouchedreadback_after_execute_does_not_block_on_stalled_queuetest_title_draws_with_a_root_signature_under_the_debug_layer, isolatede2etest binary, four test threadsCommands used for the build, isolated tests, grouped E2E, and full suite:
Not tested
AI use
Imported from ivall/xcl. Originally posted by gustavsi on 2026-11-25T19:43:42Z.
Thanks @razormontana for catching and isolating the 5/5
XCL_D3D12_DEBUG=1zero-read on Windows!Root cause:
sparse::before_executecallsqueue.Wait(&s.fence, s.value)on the adopted title queue, which goes throughreal::q_wait_pc. UnderXCL_D3D12_DEBUG=1,s.queue's upload was still in flight whenreadback_after_executeran, soq_wait_pchad recorded XCL's own internals.fenceinQUEUE_WAITS, causingreadback_after_executeto treat the queue as stalled and return before the readback worker finishedCopyBufferRegion.Rebased onto
main(2898511, preserving #2345'ss.note_queue(queue)) + updated #877 (2da0233) at6fa3a01:q_wait_pcnow only records title fences (is_fence(fence)), never XCL's internalcreate_raw_fencewaits;queue_dispatchtracks console title waits;try_gpu_waitonly recordsunsubmittedwait-before-signal bridges.sparse::tests::internal_fence_wait_keeps_readback_synchronousverifying that an in-flight internal raw-fencequeue.Waitdoes not mark the queue stalled and keepsreadback_after_executesynchronous.sparse::20/0/1,list_x::36/0,alloc_pool:: --test-threads=44/0 × 3) and a fresh 60 spwsh ./scripts/smoke.ps1run (exit: 0x0,983frames,57 57 56/2 s,0crashes,0removals). Ready for a Windows debug-layer re-check!Imported from ivall/xcl. Originally posted by gustavsi on 2026-11-25T20:32:40Z.
Rebased onto
main(e0d93c84) + updated #867–#877 (08abaa07, picking up theUnadoptGuard/orig_fnrace fix and #2118 guards) at1be3831a, verified Proton tests (sparse::20/0/1,list_x::40/0,alloc_pool:: --test-threads=44/0 × 3) and a fresh 60 spwsh ./scripts/smoke.ps1run (exit: 0x0,985frames,54 56 55/2 s,0crashes,0removals).Imported from ivall/xcl. Originally posted by bmjask on 2026-11-25T21:16:54Z.
Review: COMMENTED
P1: a fence timeout can silently lose CPU coherence. The worker waits 5s, logs timeout and skips readback_ranges, but still marks job.done=true; readback_after_execute then returns after its synchronous wait believing immediate visibility is preserved. Timed-out jobs are never retried even if fence later completes. Retain/retry until fence completion or report/defer without claiming sync, with timeout-then-completes regression. The async visibility path also depends on #1993/#2009, whose fence-hook try-lock race remains unresolved.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T00:29:01Z.
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
Imported from ivall/xcl. Originally posted by gustavsi on 2026-11-26T02:22:01Z.
Thanks @bmjask for catching the timeout coherence bug and @DavidM1911 for the Windows 11 re-verification!
Addressed the P1 timeout coherence issue and rebased onto
main(08db8020) + updated #867–#877 (a553a224) at87287c44:RbStatus::{Pending, Completed, Deferred}:RbJob::donenow carriesRbStatusinstead ofbool. Whenwait_fence_mstimes out (or sees device removalu64::MAX), the worker notifiesRbStatus::Deferredrather than claiming synchronous completion, andreadback_after_executelogs that synchronous visibility was deferred instead of silently returning as completed.deferred: VecDeque<RbJob>queue. The worker pollsrx.recv_timeout(20 ms)whiledeferredis non-empty, drains ready jobs in FIFO order oncefence.GetCompletedValue() >= value(and before any later job on the same monotonic fence, plus a bounded drain on queue teardown), so CPU coherence catches up once the fence completes.sparse::tests::timeout_then_completes_still_reads_back_cpu_memory(factorsspawn_rb_worker_withwith a 50 ms timeout on a real raw D3D12 fence): verifies the timed-out job reportsRbStatus::Deferred, does not run readback early, automatically runs oncefence.Signal(1)fires after timeout, and preserves FIFO ordering for subsequentRbStatus::Completedjobs.GE-Proton11-14(RX 9060 XT):sparse::21/0/1,list_x::40/0,real::62/0,alloc_pool:: --test-threads=44/0 (× 3), plus a fresh 60 spwsh ./scripts/smoke.ps1run (exit: 0x0,646frames shown,0crashes,0device removals; block updated in PR description).AI use: Antigravity (Gemini 4 Neon) implemented the
RbStatus+deferredretry fix and regression test, rebased ontomain+ updated #877, ran the Proton tests and smoke run, and drafted this comment.Imported from ivall/xcl. Originally posted by GreemSC on 2026-11-26T17:50:41Z.
A data point for this PR's idea, from
amd-devunder Wine (RX 7900 XT, RADV), whererb_queue(253108c2) replaced the per-queue readback but kept its problem.What we saw on
amd-devc32c91a3+ the Wine stack (not this PR):readback_after_executewaits for its readback, and when the submitting queue has an armed bridgedWait64whose producer is not submitted yet, that readback can only finish after the title goes on. Here that was a 2 sWait64BitValueXtimeout on nearly every frame entering the world (40 in one run), the CPU waiting for a value the deferred readback would have delivered.readback_now(Map) ordered behind every title queue (wait_title_queues_for_readback) waits for such a queue too: 6 real 5 s waits in a row, then the title's GPU watchdog (+0x23cf683).What fixed it there, along this PR's lines (local tree, not a PR):
note_queue_wait/queue_has_unsatisfied_waitas here, recorded only under Wine;readback_nownot ordered behind title queues under Wine;Wait64timeouts, 0 readback timeouts, 600 s into the playable part.One thing to check in this PR's design and ours, found in review and not shown by a run: a readback done later snapshots the host chunk hashes when it is recorded, so a CPU write between the title's submit and the late readback could be overwritten.
Not tested: this PR itself on
amd-dev; Windows.AI use: Claude Code (Claude Opus 5.5) ran the runs and wrote this comment; a second pass (Claude Fable 5.2) reviewed the change.
Imported from ivall/xcl. Originally posted by gustavsi on 2026-11-26T19:04:55Z.
Thanks @GreemSC for the
amd-devdata point and for catching the late-readback overwrite race!Fixed in
f14d6976:State::snapshot_ranges): whenreadback_after_executerecords a job, it hashes each committed 64-byte-bounded segment in the target ranges underSTATE.lock()(skipping uncommitted pages/holes) and recordsrb_seqwhile bumpingIN_FLIGHT_RB.State::readback_ranges): when the worker later copies bytes back, it checks each segment's current CPU hash against its snapshot. If the CPU modified those bytes in the interim, the segment is skipped (preserving the CPU's newer write) and that 64-byte chunk'ssenthash is left dirty so the nextbefore_executeuploads the CPU write to VRAM.IN_FLIGHT_RB > 1), copied segments are recorded in a boundedState::last_rbmap (cleared as soon as no other job is in flight) keyed withrb_seq > snapshot.seq, so an earlier deferred readback's copy-back does not cause a subsequent deferred readback on the same range to mistake it for a CPU write.sparse::tests::deferred_readback_preserves_newer_cpu_writescovering both CPU-write preservation (verifying the skipped chunk keeps the CPU's bytes and stays dirty insent, while the untouched chunk receives VRAM data and syncssent) and two consecutive deferred readbacks on the same range without an intervening CPU write.Verified at
f14d6976underGE-Proton11-14(AMD Radeon RX 9060 XT, RADV Mesa 26.2.7,XCL_DXC_DIRset):hle::d3d12x::sparse:: --test-threads=1: 22 passed, 0 failed, 1 ignoredhle::d3d12x::list_x:: --test-threads=1: 40 passed, 0 failed, 0 ignoredhle::d3d12x::real:: --test-threads=1: 62 passed, 0 failed, 0 ignoredhle::d3d12x::vram:: --test-threads=1: 19 passed, 0 failed, 1 ignoredgpu::uma:: --test-threads=1: 12 passed, 0 failed, 0 ignoredhle::d3d12x::alloc_pool:: --test-threads=4(× 3): 4 passed, 0 failed, 0 ignored each--exact gpu_sparse_vram_descriptors_buffers_and_xmem gpu_valu_float_and_int: 2 passed, 0 failed, 0SKIPPEDpwsh ./scripts/smoke.ps1release run:exit: 0x0, 1063 frames shown (PresentX 1064,60 59 60/2 s),0crashes,0device removals (PR description updated).Not tested: native Windows locally; NVIDIA Linux GPUs.
AI use: Antigravity (Gemini 4 Neon) implemented the snapshot guard and regression test, ran the Proton tests and 60 s smoke run, and drafted this comment.
Imported from ivall/xcl. Originally posted by Decodere on 2026-11-26T20:09:05Z.
Independent RTX 4060 (8 GB) / Windows 11 release verification of PR #1732 updated head
f14d6976dcbe99dba07a34cbc2295b1d8690bc61(4 commits on merge-base08db8020d323bf478964fcc586152cce54959cfc; parentda893f3a68333efa1f7c39c0e91e896fb48f6178). Measurements and targeted GPU/unit 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 (
f14d6976)cargo test --release -p xcl --lib readback_after_execute_does_not_block_on_stalled_queue -- --nocapture: 1 passed, 0 failed, 0 ignored (0.36 s,0SKIPPED).cargo test --release -p xcl --lib internal_fence_wait_keeps_readback_synchronous -- --nocapture: 1 passed, 0 failed, 0 ignored (0.39 s,0SKIPPED).cargo test --release -p xcl --lib timeout_then_completes_still_reads_back_cpu_memory -- --nocapture: 1 passed, 0 failed, 0 ignored (0.40 s,0SKIPPED).cargo test --release -p xcl --lib deferred_readback_preserves_newer_cpu_writes -- --nocapture: 1 passed, 0 failed, 0 ignored (0.36 s,0SKIPPED).cargo test --release -p xcl --lib hle::d3d12x::sparse::(3 consecutive parallel passes): 22 passed, 0 failed, 1 ignored (early_commit_timingignored) on all 3 passes (0.61 s/0.62 s/0.58 s,0SKIPPED).cargo test --release -p xcl --lib hle::d3d12x::list_x::: 40 passed, 0 failed, 0 ignored (0.71 s,0SKIPPED).cargo test --release -p xcl --lib hle::d3d12x::real::: 62 passed, 0 failed, 0 ignored (0.37 s,0SKIPPED).Paired 60 s RTX 4060 smoke (merge-base
08db8020vsf14d6976)Both runs completed cleanly at steady 60/2 s pacing with
0device removals and0crashes (f14d6976xcl.log:6,176/6,116 MBpeak/end local VRAM,4,650 MBend non-local VRAM,19,567translated draws /1,024dispatches with0skipped,sparse windows: 4096 submits, 1388 MB of CPU writes uploaded, 240 ms spent, lock wait 1 ms,0watchdog timeouts).Merge-base (
08db8020):PR #1732 head (
f14d6976):Limits of coverage
f14d6976(only the 4 new readback tests individually, 3 parallel passes ofsparse::,list_x::,real::, release build, and paired 60 s smokes).amdgpucommits earlier in this 4-commit branch (e57cb659,1a7f146b,da893f3a) were not exercised under Wine/Linux on this host, and live async compute wait-before-signal stalls were covered by the 4 targeted release tests above rather than live stalls in the 60 s smoke.AI use
Ran the targeted release GPU/unit tests, release build, and paired quiet 60 s smoke runs with assistance from Google Antigravity (Gemini 4 Neon); all test counts, timings, memory/sparse metrics, and smoke blocks were extracted directly from
cargo test,xcl.log, andscripts/smoke.ps1outputs.Imported from ivall/xcl. Originally posted by GreemSC on 2026-11-26T20:13:47Z.
@gustavsi thanks for the fix and the test. A note so you don't wait on me for it: our current Linux tree is on
amd-dev, which has its own per-queue readback (rb_queue), so it doesn't carry #1732 any more; theamd-devtree, with the deferred readbacks of a queue waiting on an unsubmitted producer, is on #846. I'll rerunf14d6976on themaintree when that one runs again (it is stuck in #2555's shader preparation under Wine for now).AI use: Claude Code (Claude Opus 5.5) wrote this reply.
Imported from ivall/xcl. Originally posted by gustavsi on 2026-11-29T03:53:11Z.
Closing as I'm stepping away from the project, but anyone is welcome to rebase and reuse these commits.
Pull request closed