D3D12.X: a wait an earlier signal covers does not make a signal a cycle #2042
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2052"
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 nicolasabosch on 2026-11-25T02:02:39Z.
would_signal_close_cycletook every armed wait on the target cell withval <= sig_valas one that waits on the newWrite64signal. A wait that an earlier signal of the same cell already satisfies (submitted on the GPU, or released on the CPU) does not depend on the new one. With pipelined frames (queue A waits on cell X >= N; queue B then signals X = N + 1 after waiting on something A signals later), every such frame was reported as a cycle. The signal then went out on the CPU, and its waiters were released before the GPU work they wait for had run.Found while working on #1269 (a retail title on an RTX 4070 Laptop). A local trace of the world load showed queue 1 waiting on a cell
>= 0x6db, a wait already covered by queue 2's earlier0x6dbsignal. That wait was counted against queue 2's0x6dcsignal, and the "cycle" was broken on the CPU. Each run of that load broke 14–32 such cycles.What is in it
crates/xcl/src/hle/d3d12x/list_x.rs: the target waiters are only the armed waits no earlier signal covers (val > max(submitted_max, cpu_signaled_max)).pipelined_next_frame_write_is_not_false_cycle: case 3 reproduces the traced case (no cycle), then turns the wait into one that only the new signal satisfies (a true cycle, still detected). Without the fix, the new no-cycle assertion fails.Tested
cargo build --workspace && cargo test --workspace -- --test-threads=4onb67c8f0: 1120 passed, 0 failed, 46 ignored. SKIPPED: 20 × no wave64, 3 × refused (#1426 semantics), 1 × no heap windows.ID3D12Fencewaits inbreak_cycles_before_title_signal, which is not in this PR). The title still loses the device later in that load, so this fix alone does not get it further.Regression run
main:
PR:
Not tested
ID3D12Fencewaits (break_cycles_before_title_signal) have the same pattern. They are left for a separate PR with a test of their own.AI use
🤖 Generated with Claude Code
Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T02:13:57Z.
Code review on
b67c8f0:armed_waitsinwould_signal_close_cycle(crates/xcl/src/hle/d3d12x/list_x.rs) withaw.val > target.submitted_max.max(target.cpu_signaled_max)cleanly stops pipelined next-frame signals from looking like cycles when an earlier GPU or CPU signal already covers the armed wait value.CIworkflow approved (PR descriptionis green; awaitingBuild and test+ dual-vendor verification + marking ready for review).Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T04:41:49Z.
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 throny on 2026-11-30T20:10:22Z.
Closing: this change is already on
mainas commit4cdb71f1(brought in byd4a31c1eMerge main (cbc296a) into the NVIDIA world integration). This PR's diff applies in reverse cleanly on currentmain(ff0c364b), so merging it would change nothing. If something here is not onmain, say so and reopen it, or ask and I will.AI use: Claude Code (Claude Opus 5.5) checked this; part of the duplicate sweep on #3041.
Pull request closed