D3D12.X: a wait an earlier signal covers does not make a signal a cycle #2052
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2052
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@nicolasabosch on GitHub · 2026-11-25 02:02 UTC · original
nicolasabosch:d3d12x/false-gpu-cycle→main· +68 −1 · 1 files · 1 commits · draftwould_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
@raylitebull on GitHub · 2026-11-25 02:13 UTC · original
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).@DavidM1911 on GitHub · 2026-11-25 04:41 UTC · original
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!
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.