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

Open
Prime1997 wants to merge 1 commit from upstream-pr/1045 into main
Prime1997 commented 2026-11-24 10:49:13 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Prime1997 on 2026-11-24T10:49:13Z.


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

<!-- greyfinch-sync:ivall/xcl:issue:5470707573 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1045). Originally posted by [Prime1997](https://github.com/Prime1997) on 2026-11-24T10:49:13Z. --- 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](https://discord.gg/gK3y7WRRY)
Diskuss commented 2026-11-24 12:05:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Diskuss on 2026-11-24T11:11:12Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7129769302 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1045#issuecomment-7129769302). Originally posted by [Diskuss](https://github.com/Diskuss) on 2026-11-24T11:11:12Z. --- **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 commented 2026-11-24 12:05:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T11:14:47Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7129848070 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1045#issuecomment-7129848070). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T11:14:47Z. --- 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.
JJAutoCompare commented 2026-11-25 06:05:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T05:26:27Z.


Empirical test report (fcc2fd20)

Verified xcl-dev/xcl PR #1045 at fcc2fd20186a692e30f6c181c0ae935ed628a868.

Hardware / environment

  • Windows x64, OS version 10.0.26200.0, AMD x64 CPU (family 23, model 113, stepping 0). Unoptimized Rust test profile with debug information and incremental compilation disabled.
  • rustc 1.100.0 (0ef1bc386 2026-11-09) and DXC 1.9.2609.5 (01b62ad47).
  • Focused run held the Arc A770 test lock with XCL_ADAPTER=A770 and RUST_TEST_NOCAPTURE=1. The native fixture opens the default D3D12 device with a WARP fallback. Its output did not identify the active adapter or driver.

Commands and results

  • cargo test --workspace --no-run exited 0 outside the Arc lock.
  • Inside Invoke-ArcTest.ps1, ran the compiled xcl library test binary from that build with the filters hle::d3d12x::list_x::tests::wait_queue_diagnostic_ and hle::d3d12x::list_x::tests::cross_queue_wait64_before_signal_does_not_deadlock_submit_thread, plus --test-threads=1. The run exited 0. The captured log recorded 7 passed, 0 failed, 0 ignored, and 0 explicit SKIPPED lines. Libtest reported 705 filtered out and 0.18 s elapsed.

Observed behavior

  • Six CPU tests covered Wait64 attribution for an unsubmitted value, an older graph signal, a covering graph signal, and a CPU release. They also verified that a newer recording without queue history clears stale hints and that an older recording preserves current hints.
  • The native fixture logged graph_signal_queue=qNone and recorded_list_last_queue=qNone/tySome(2) when DIRECT waited before COMPUTE submitted. The fixture passed its assertions for DIRECT submission within 500 ms, graph attribution to the COMPUTE queue after submission, and DIRECT fence completion after the COMPUTE signal.

Not tested

The full GPU workspace suite and game smoke runs were omitted. The focused fixture does not exercise the watchdog timeout diagnostic.

AI use

Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr1045-focused.log and published.

<!-- greyfinch-sync:ivall/xcl:comment:7153773684 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1045#issuecomment-7153773684). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T05:26:27Z. --- ### Empirical test report (fcc2fd20) Verified xcl-dev/xcl PR #1045 at `fcc2fd20186a692e30f6c181c0ae935ed628a868`. **Hardware / environment** - Windows x64, OS version `10.0.26200.0`, AMD x64 CPU (family 23, model 113, stepping 0). Unoptimized Rust test profile with debug information and incremental compilation disabled. - `rustc 1.100.0 (0ef1bc386 2026-11-09)` and DXC `1.9.2609.5 (01b62ad47)`. - Focused run held the Arc A770 test lock with `XCL_ADAPTER=A770` and `RUST_TEST_NOCAPTURE=1`. The native fixture opens the default D3D12 device with a WARP fallback. Its output did not identify the active adapter or driver. **Commands and results** - `cargo test --workspace --no-run` exited 0 outside the Arc lock. - Inside `Invoke-ArcTest.ps1`, ran the compiled `xcl` library test binary from that build with the filters `hle::d3d12x::list_x::tests::wait_queue_diagnostic_` and `hle::d3d12x::list_x::tests::cross_queue_wait64_before_signal_does_not_deadlock_submit_thread`, plus `--test-threads=1`. The run exited 0. The captured log recorded 7 passed, 0 failed, 0 ignored, and 0 explicit `SKIPPED` lines. Libtest reported 705 filtered out and 0.18 s elapsed. **Observed behavior** - Six CPU tests covered Wait64 attribution for an unsubmitted value, an older graph signal, a covering graph signal, and a CPU release. They also verified that a newer recording without queue history clears stale hints and that an older recording preserves current hints. - The native fixture logged `graph_signal_queue=qNone` and `recorded_list_last_queue=qNone/tySome(2)` when DIRECT waited before COMPUTE submitted. The fixture passed its assertions for DIRECT submission within 500 ms, graph attribution to the COMPUTE queue after submission, and DIRECT fence completion after the COMPUTE signal. **Not tested** The full GPU workspace suite and game smoke runs were omitted. The focused fixture does not exercise the watchdog timeout diagnostic. **AI use** Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr1045-focused.log` and published.
bmjask commented 2026-11-29 22:46:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-11-29T22:46:06Z.

Review: COMMENTED


Critical review of current head fcc2fd20. The diagnostic distinction is valid: a graph-assigned signal queue is not proof that host Signal succeeded, and a recording list's last queue is only history. wait_queue_provenance also suppresses a signal queue that does not cover the requested value. I found no code blocker in this diagnostic-only change. The branch conflicts with current main; please rebase and run the Wait64 watchdog tests against the merged sync-graph implementation so the new fields cannot accidentally become routing inputs. No local Windows run.

<!-- greyfinch-sync:ivall/xcl:review:6105201172 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1045#pullrequestreview-6105201172). Originally posted by [bmjask](https://github.com/bmjask) on 2026-11-29T22:46:06Z. **Review:** COMMENTED --- Critical review of current head `fcc2fd20`. The diagnostic distinction is valid: a graph-assigned signal queue is not proof that host `Signal` succeeded, and a recording list's last queue is only history. `wait_queue_provenance` also suppresses a signal queue that does not cover the requested value. I found no code blocker in this diagnostic-only change. The branch conflicts with current main; please rebase and run the Wait64 watchdog tests against the merged sync-graph implementation so the new fields cannot accidentally become routing inputs. No local Windows run.
Foniass commented 2026-12-01 06:39:51 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:39:51Z.


Review (head fcc2fd20, diff read, not a merge-check; it conflicts with main, so not built or run):

  • Partly still new. Main still logs prod= as submitted_queue.or(recorded_last_queue) in the watchdog (list_x.rs ~2986, ~3010) and the bridge log (~3430, ~3477), so the "which queue signals" split isn't on main; but main's edges_of (~2396, from #2499) already names the queue of the signal covering a wait, or says "none submitted".
  • The new graph_signal_queue adds nothing to the bridge log: that log only runs if unsubmitted (submitted_max < value), where wait_queue_provenance always returns None. It only carries information in the watchdog line.
  • The rebase is manual: main's watchdog now logs with xlog_error, keeps no fence in its tuple, and stops the title by default (CPU release only with XCL_WAIT_TIMEOUT_CONTINUE=1, so "released on CPU to prevent GPU hang" is now wrong); the recording block also sets recorded_by. The README paragraph describes a log field, not something users do.

Fine: wait_queue_provenance is a pure helper, clearing the old type / queue hint only affects log output (recorded_list_type is only read in logs), and the tests cover each case including the cross-queue COMPUTE assignment. Recommendation: rebase with only the watchdog-line change and its tests (drop the bridge-log change and README paragraph), or close if that isn't worth it.

AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7303129764 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1045#issuecomment-7303129764). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T06:39:51Z. --- Review (head fcc2fd20, diff read, not a merge-check; it conflicts with main, so not built or run): - **Partly still new.** Main still logs `prod=` as `submitted_queue.or(recorded_last_queue)` in the watchdog (`list_x.rs` ~2986, ~3010) and the bridge log (~3430, ~3477), so the "which queue signals" split isn't on main; but main's `edges_of` (~2396, from #2499) already names the queue of the signal covering a wait, or says "none submitted". - The new `graph_signal_queue` adds nothing to the bridge log: that log only runs `if unsubmitted` (`submitted_max < value`), where `wait_queue_provenance` always returns `None`. It only carries information in the watchdog line. - The rebase is manual: main's watchdog now logs with `xlog_error`, keeps no fence in its tuple, and stops the title by default (CPU release only with `XCL_WAIT_TIMEOUT_CONTINUE=1`, so "released on CPU to prevent GPU hang" is now wrong); the recording block also sets `recorded_by`. The README paragraph describes a log field, not something users do. Fine: `wait_queue_provenance` is a pure helper, clearing the old type / queue hint only affects log output (`recorded_list_type` is only read in logs), and the tests cover each case including the cross-queue COMPUTE assignment. Recommendation: rebase with only the watchdog-line change and its tests (drop the bridge-log change and README paragraph), or close if that isn't worth it. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1045:upstream-pr/1045'
git switch 'upstream-pr/1045'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1045'
git switch 'upstream-pr/1045'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1045'
git switch 'upstream-pr/1045'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1045'
git switch 'main'
git merge --squash 'upstream-pr/1045'
git switch 'main'
git merge --ff-only 'upstream-pr/1045'
git switch 'main'
git merge 'upstream-pr/1045'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!1038
No description provided.