Tests: cover Wait64 recording and satisfied batch submission #569

Manually merged
github merged 1 commit from gh-pr/569/head into gh-pr/569/base 2026-11-26 04:25:59 +00:00
Owner

@⁠Prime1997 on GitHub · 2026-11-24 01:56 UTC · original
Prime1997:contrib/wait64-submission-regression → main · +53 −0 · 1 files · 1 commits · merged 2026-11-25 19:19 UTC

#218 fixed Wait64BitValueX so it compares the entire 64-bit counter. These two tests drive the recorded command and submission paths that produced spurious two-second waits. Neither test needs a GPU.

What is in it

  • Record waits through the console entry point. Check a satisfied counter, an earlier counter and equality with realistic flag values. Check that Wait32 keeps its explicit mask.
  • Submit two command lists with a satisfied wait. Both should reach the same submission callback. The older flag-as-mask behavior splits the submission and waits for the timeout.
  • The existing tests construct a pending comparison directly. PR #539 exercises unsatisfied cross-queue waits and cycles. This pair checks flag recording and the already-satisfied multi-list case. This PR adds regression coverage to #218 with zero production changes.

Tested

  • d9d61177814f328158bcb5f27c9190f7bf253933, Windows 11 Pro build 26200, Intel i5-10400, NVIDIA RTX 3060 Ti, driver 32.0.16.1714, Rust 1.100.0 MSVC.
  • The two regressions reproduced a wrong recorded mask and a split submission on the older implementation. With the merged fix, the focused release run passed both tests (2 passed, 0 failed, 0 ignored).
  • The full cargo test --workspace run with locked dependencies and four test threads completed with 682 passed, 0 failed, 41 ignored. Two hardware tests reported a wave64 skip.

Regression run

The same retail title was run for 60 seconds on each clean build. The patch changes tests only. Frame counts are individual observations.

Main

xcl-smoke v1
commit: 508a0c74d7c0625d6d2de8d24494e69dc2e1926f
gpu: NVIDIA GeForce RTX 3060 Ti
title: 419239bf
seconds: 60
exit: 0x0
frames shown: 556 (PresentX 556)
presents per 2 s (last 3): 4 5 4
device removals: 0
crashes: 0
peak commit: 14899 MB

PR head

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

Not tested

AMD GPUs, wave64-only paths and sample-dependent RPF, TTPF, AWC, DLL, DXC and XG cases were outside this run.

AI use

OpenAI Codex (GPT-6) assisted with reproducing the stall, writing the regression tests, checking overlap and validating the branch. The runtime fix belongs to the author of #218.

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

**@⁠Prime1997** on GitHub · 2026-11-24 01:56 UTC · [original](https://github.com/xcl-dev/xcl/pull/569) `Prime1997:contrib/wait64-submission-regression` → `main` · +53 −0 · 1 files · 1 commits · merged 2026-11-25 19:19 UTC #218 fixed Wait64BitValueX so it compares the entire 64-bit counter. These two tests drive the recorded command and submission paths that produced spurious two-second waits. Neither test needs a GPU. **What is in it** - Record waits through the console entry point. Check a satisfied counter, an earlier counter and equality with realistic flag values. Check that Wait32 keeps its explicit mask. - Submit two command lists with a satisfied wait. Both should reach the same submission callback. The older flag-as-mask behavior splits the submission and waits for the timeout. - The existing tests construct a pending comparison directly. [PR #539](https://github.com/ivall/xcl/pull/539) exercises unsatisfied cross-queue waits and cycles. This pair checks flag recording and the already-satisfied multi-list case. This PR adds regression coverage to #218 with zero production changes. **Tested** - `d9d61177814f328158bcb5f27c9190f7bf253933`, Windows 11 Pro build 26200, Intel i5-10400, NVIDIA RTX 3060 Ti, driver 32.0.16.1714, Rust 1.100.0 MSVC. - The two regressions reproduced a wrong recorded mask and a split submission on the older implementation. With the merged fix, the focused release run passed both tests (2 passed, 0 failed, 0 ignored). - The full `cargo test --workspace` run with locked dependencies and four test threads completed with **682 passed, 0 failed, 41 ignored**. Two hardware tests reported a wave64 skip. **Regression run** The same retail title was run for 60 seconds on each clean build. The patch changes tests only. Frame counts are individual observations. Main ``` xcl-smoke v1 commit: 508a0c74d7c0625d6d2de8d24494e69dc2e1926f gpu: NVIDIA GeForce RTX 3060 Ti title: 419239bf seconds: 60 exit: 0x0 frames shown: 556 (PresentX 556) presents per 2 s (last 3): 4 5 4 device removals: 0 crashes: 0 peak commit: 14899 MB ``` PR head ``` xcl-smoke v1 commit: d9d61177814f328158bcb5f27c9190f7bf253933 gpu: NVIDIA GeForce RTX 3060 Ti title: 419239bf seconds: 60 exit: 0x0 frames shown: 1255 (PresentX 1255) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14468 MB ``` **Not tested** AMD GPUs, wave64-only paths and sample-dependent RPF, TTPF, AWC, DLL, DXC and XG cases were outside this run. **AI use** OpenAI Codex (GPT-6) assisted with reproducing the stall, writing the regression tests, checking overlap and validating the branch. The runtime fix belongs to the author of #218. 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)
The existing PendingWait checks construct the comparison directly, and the submission check manually pushes a 32-bit wait. Exercise wait64_x itself so interpreting the trailing flags slot as a mask cannot return unnoticed. Check high counter bits, garbage flag upper halves, unfinished and equal counters, and the unchanged Wait32 mask; an already satisfied Wait64 must keep the submitted batch together.

The production correction from Sr-0w PR #218 is already in upstream d4f17ca. This commit ports only the two original synthetic controls from42297943db3cfd4cf14ee37a7a0a53b8888d0d2c, byte-identical. Earlier separate negative controls captured both incorrect stored mask and a 2000ms false timeout/batch split with the old behavior. Fresh release focused run on official508a0c7 plus these tests:2passed,0failed,0ignored. Broader validation follows on this clean head.

Assisted-by: OpenAI Codex (exact model variant not exposed)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:25:59 +00:00
github manually merged commit d9d6117781 into gh-pr/569/base 2026-11-26 04:25:59 +00:00
Author
Owner

@⁠thehollowedone on GitHub · 2026-11-24 02:00 UTC · original

Both Wait64 tests passed on exact head d9d6117. I also applied the same test-only diff to main at 9ce2070 in a scratch tree. Both tests passed there too, including the check that a satisfied wait keeps the batch together and leaves Wait32 masking intact.

Windows 11 build 26300, Ryzen 7 9800X3D, Rust 1.99.1 MSVC, debug. cargo test --offline --locked -p xcl --lib wait64_ -- --test-threads=1 --nocapture reported 2 passed, 0 failed, 0 ignored in each build. This covered the synthetic recording and submission fixture. The full workspace suite, actual GPU submission, and retail titles remain untested in this run.

AI use

Codex with GPT-6.2 Sol ran the tests and drafted this report.

**@⁠thehollowedone** on GitHub · 2026-11-24 02:00 UTC · [original](https://github.com/xcl-dev/xcl/pull/569#issuecomment-7119661107) Both Wait64 tests passed on [exact head d9d6117](https://github.com/ivall/xcl/commit/d9d61177814f328158bcb5f27c9190f7bf253933). I also applied the same test-only diff to [main at 9ce2070](https://github.com/ivall/xcl/commit/9ce2070eccf436d7bd38601c90407da447df34f3) in a scratch tree. Both tests passed there too, including the check that a satisfied wait keeps the batch together and leaves Wait32 masking intact. Windows 11 build 26300, Ryzen 7 9800X3D, Rust 1.99.1 MSVC, debug. `cargo test --offline --locked -p xcl --lib wait64_ -- --test-threads=1 --nocapture` reported 2 passed, 0 failed, 0 ignored in each build. This covered the synthetic recording and submission fixture. The full workspace suite, actual GPU submission, and retail titles remain untested in this run. **AI use** Codex with GPT-6.2 Sol ran the tests and drafted this report.
Author
Owner

@⁠upipibi on GitHub · 2026-11-24 04:24 UTC · original

Heads-up on an interaction with #708 that neither PR's CI can see: git merge-tree merges #569 (d9d6117781) and #708 (89184d1d38) cleanly, but the merged crates/xcl/src/hle/d3d12x/list_x.rs won't compile its tests.

  • #708 changes execute_with_waits to take three arguments, (queue, lists, submit) -> Result<(), String> (line 977 of the merged file), and updates the existing tests to pass std::ptr::null_mut() (lines 3042 and 3055).
  • This PR's new test still calls the old form, execute_with_waits(&lists, |chunk| …) (line 2989 of the merged file). That's E0061 in the xcl lib test build, whichever PR lands second.

Fix for whichever lands second: pass std::ptr::null_mut() as the queue, as #708 does, and handle the Result. I read this from the merged tree and didn't compile it.

AI-assisted (Claude Code).

**@⁠upipibi** on GitHub · 2026-11-24 04:24 UTC · [original](https://github.com/xcl-dev/xcl/pull/569#issuecomment-7121983014) Heads-up on an interaction with **#708** that neither PR's CI can see: `git merge-tree` merges #569 (`d9d6117781`) and #708 (`89184d1d38`) cleanly, but the merged `crates/xcl/src/hle/d3d12x/list_x.rs` won't compile its tests. - #708 changes `execute_with_waits` to take three arguments, `(queue, lists, submit) -> Result<(), String>` (line 977 of the merged file), and updates the existing tests to pass `std::ptr::null_mut()` (lines 3042 and 3055). - This PR's new test still calls the old form, `execute_with_waits(&lists, |chunk| …)` (line 2989 of the merged file). That's E0061 in the `xcl` lib test build, whichever PR lands second. Fix for whichever lands second: pass `std::ptr::null_mut()` as the queue, as #708 does, and handle the `Result`. I read this from the merged tree and didn't compile it. AI-assisted (Claude Code).
Author
Owner

@⁠MesshM on GitHub · 2026-11-24 04:33 UTC · original

Test run of d9d61177814f328158bcb5f27c9190f7bf253933 on AMD RDNA4. I merged it onto current main 64b3f35 locally (clean merge) and tested that tree.

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug
  • cargo build --workspace + cargo test --workspace -- --test-threads=4 on the merge: 703 passed, 0 failed, 41 ignored, exit code 0; xcl lib tests 662 passed, 0 failed, 21 ignored
  • 0 SKIPPED; wait64_flags_do_not_mask_the_recorded_counter and wait64_satisfied_counter_keeps_submission_together_and_wait32_keeps_its_mask pass.

Review: Test-only coverage for #218 (Wait64 compares the whole 64-bit counter); no GPU needed, so this is mainly the whole suite on an AMD adapter. I found nothing to change.

Not tested: no retail title or regression run (I have no unpacked game), no XCL_SAMPLE_* tests, release build; the PR's head on its old base was not run, only its merge onto main.

Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.

**@⁠MesshM** on GitHub · 2026-11-24 04:33 UTC · [original](https://github.com/xcl-dev/xcl/pull/569#issuecomment-7122134637) Test run of `d9d61177814f328158bcb5f27c9190f7bf253933` on AMD RDNA4. I merged it onto current `main` `64b3f35` locally (clean merge) and tested that tree. **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, debug - `cargo build --workspace` + `cargo test --workspace -- --test-threads=4` on the merge: **703 passed, 0 failed, 41 ignored**, exit code 0; `xcl` lib tests 662 passed, 0 failed, 21 ignored - **0 `SKIPPED`**; `wait64_flags_do_not_mask_the_recorded_counter` and `wait64_satisfied_counter_keeps_submission_together_and_wait32_keeps_its_mask` pass. **Review:** Test-only coverage for #218 (Wait64 compares the whole 64-bit counter); no GPU needed, so this is mainly the whole suite on an AMD adapter. I found nothing to change. **Not tested:** no retail title or regression run (I have no unpacked game), no `XCL_SAMPLE_*` tests, release build; the PR's head on its old base was not run, only its merge onto `main`. Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 13:18 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!

**@⁠DavidM1911** on GitHub · 2026-11-25 13:18 UTC · [original](https://github.com/xcl-dev/xcl/pull/569#issuecomment-7163590053) 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!
Author
Owner

@⁠ivall on GitHub · 2026-11-25 19:19 UTC · original

Merging: pins that Wait64's flags do not mask the counter and that a satisfied wait does not split the batch.

Tested on AMD RDNA4 (native wave64), Windows, DXC 1.8.2502.11, debug, main 2898511 with 27 test PRs merged locally, this one included: the whole suite 3 times, 1419 passed, 2 failed, 46 ignored each time (fuzz_validate_and_gpu_1 and _3, which fail the same way on main); hle::d3d12x on 16 threads 5 times, no failure.

AI use: Claude Code (Claude Opus 5.5) reviewed and tested this and wrote the comment on the maintainer's behalf.

**@⁠ivall** on GitHub · 2026-11-25 19:19 UTC · [original](https://github.com/xcl-dev/xcl/pull/569#issuecomment-7172144370) Merging: pins that Wait64's flags do not mask the counter and that a satisfied wait does not split the batch. Tested on AMD RDNA4 (native wave64), Windows, DXC 1.8.2502.11, debug, `main` `2898511` with 27 test PRs merged locally, this one included: the whole suite 3 times, 1419 passed, 2 failed, 46 ignored each time (`fuzz_validate_and_gpu_1` and `_3`, which fail the same way on `main`); `hle::d3d12x` on 16 threads 5 times, no failure. AI use: Claude Code (Claude Opus 5.5) reviewed and tested this and wrote the comment on the maintainer's behalf.
This discussion has been locked. Commenting is limited to contributors.
No description provided.