Skip to content

D3D12.X: distinguish the Wait64 signal queue from recording history - #1045

Open
Prime1997 wants to merge 1 commit into
xcl-dev:mainfrom
Prime1997:contrib/wait64-queue-provenance
Open

Prime1997 wants to merge 1 commit into
xcl-dev:mainfrom
Prime1997:contrib/wait64-queue-provenance

Conversation

@Prime1997

@Prime1997 Prime1997 commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

A retail intro stalled on our RTX 3060 Ti. The Wait64 warning named queue 1 as the producer even though it showed recorded=0x3568, submitted=0, completed=0. The old prod= field could pick up the last queue used by the recording list. That pointed us at queue 1 before there was evidence it would submit the signal.

This follow-up to gsucristo’s #795 reports the queue assigned by the sync graph only when its signal value covers the wait. A separate field gives the recording list’s last known queue. A newer recording with unknown history clears the old hint. The graph assigns the signal before the host call, so host acceptance and GPU completion are separate observations.

Tested

  • Windows 11 build 26200, i5-10400, RTX 3060 Ti 8 GB, driver 617.14, Rust 1.100.0 MSVC. The old selection logic with the new tests reproduced three wrong attributions in four cases. At fcc2fd2, all six wait_queue_diagnostic tests passed.
  • cargo test --locked --workspace --no-fail-fast -- --test-threads=4 --nocapture after building the workspace fixtures. 733 passed, 0 failed, 41 ignored. Two wave64-only test bodies skipped on this GPU. The native cross-queue test verified the COMPUTE queue assignment and the DIRECT queue completed after the signal.

Regression run

60 seconds per release build on the same RTX 3060 Ti, Series X profile and starting shader cache, with preloading off and no menu input.

Main

xcl-smoke v1
commit: 6efdabcdaac93ce5cc123a85e85deba5d49cb294
gpu: NVIDIA GeForce RTX 3060 Ti
title: 419239bf
seconds: 60
exit: 0x0
frames shown: 309 (PresentX 309)
presents per 2 s (last 3): 16 15 12
device removals: 0
crashes: 0
peak commit: 15390 MB

PR

xcl-smoke v1
commit: fcc2fd20186a692e30f6c181c0ae935ed628a868
gpu: NVIDIA GeForce RTX 3060 Ti
title: 419239bf
seconds: 60
exit: 0x0
frames shown: 295 (PresentX 296)
presents per 2 s (last 3): 15 15 16
device removals: 0
crashes: 0
peak commit: 15354 MB

Not tested

The player-controlled prologue on this revision. These startup runs do not establish a gameplay or frame-rate change.

AI use

OpenAI Codex (GPT-6) helped write and review the change, run the tests, and prepare this report.

I use a temporary Discord to coordinate my work. Anyone helping test XCL or compare results is welcome. Test coordination on Discord

The producer label introduced by gsucristo in xcl-dev#795 can name an old
recording-list queue even when the graph has no signal covering the
requested value. Report the covering graph-assigned signal queue and
recording-list history independently, and clear unknown hints when a
newer recording advances the tracked value.

Graph assignment precedes the host Signal call: the label does not
claim host acceptance or GPU completion. Signal/Wait behavior and
production locking are unchanged.

Verified with pure before/after controls: old selection/hint semantics
fail 3 of 4 assertions; the candidate passes all 6 focused assertions.
The existing native fixture has an added graph-attribution assertion;
its GPU execution and the broader suite remain for independent checks.

Assisted-by: Codex (GPT-6; exact deployment identifier not provided)
@Diskuss

Diskuss commented Nov 24, 2026

Copy link
Copy Markdown

Tested on AMD Radeon RX 9070 XT (RDNA4) at fcc2fd20186a692e30f6c181c0ae935ed628a868

Ryzen 7 5700X3D, 32 GB RAM, Windows 11 Pro build 26300.9974, driver 32.0.32015.7029, Rust 1.100.0, DXC 1.9.2602.17, debug build.

Tested (PR head fcc2fd2 merged locally with origin/main 47efa2e; the branch is 19 commits behind main; merge was clean, nothing pushed):

  • cargo build --workspace: OK
  • cargo test --workspace --no-fail-fast -- --test-threads=4: 747 passed, 0 failed, 41 ignored
  • PR's tests, cargo test -p xcl --lib wait_queue_diagnostic -- --test-threads=1, each run alone 5 times: 5/5 (6 passed each run)
  • 0 SKIPPED printed; 2 debug-layer tests skip silently, no Graphics Tools installed. No DXGI_ERROR_DEVICE_REMOVED.
  • Baseline: main alone at 47efa2e gave 741 passed, 0 failed, 41 ignored. The +6 is the PR's 6 new tests.

Not tested: retail title / scripts/smoke.ps1 (no game files), release build.

Report written by Claude Code (Claude Sonnet 5.5) from a real run on this machine.

@DavidM1911

Copy link
Copy Markdown
Contributor

Independent verification, merged onto current main 384f7f7 locally (clean merge).

Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug.

  • cargo test -p xcl --lib wait64: 2 passed — the Wait64 split/cross-queue deadlock tests.
  • cargo test -p xcl --lib list_x: 30 passed, 0 failed — includes the five new wait_queue_diagnostic_* tests; the log shows the new fields live, e.g. Wait64BitValueX ... (waiter=q1/ty2, graph_signal_queue=qNone, recorded_list_last_queue=qNone/tySome(0); ...).

AI use: test runs by Devin (Cognition, SWE-2); no code changes.

wondercrash added a commit to wondercrash/xcl that referenced this pull request Nov 24, 2026
Conflicts:
- list_x wake_sync_watchdog: xcl-dev#1045's split of the producer queue
  (graph_signal_q, recorded_last_q) kept in the expired tuple; xcl-dev#1123's
  waiters / earlier_releases added before the loop.
- list_x tests: both sides' new tests kept.
- sparse.rs: integ split State into Gpu (WORK) + State and already has
  hub_state(), which reports the sparse queue's fence and readback fence.
  xcl-dev#1123's fence_status() is not taken; the chain line uses hub_state()
  instead. What fence_status added is put into hub_state's busy case:
  STATUS_FENCES (set where init stores the Gpu) and WAIT_FOR_TARGET give
  the completed values and the value wait_for sleeps on while a submission
  holds WORK.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants