Tests: cover Wait64 recording and satisfied batch submission #564

Merged
Prime1997 merged 1 commit from upstream-pr/569 into main 2026-11-25 19:19:43 +00:00
Prime1997 commented 2026-11-24 01:56:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Prime1997 on 2026-11-24T01:56:26Z.


#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

<!-- greyfinch-sync:ivall/xcl:issue:6572843431 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/569). Originally posted by [Prime1997](https://github.com/Prime1997) on 2026-11-24T01:56:26Z. --- #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)
towiice commented 2026-11-24 06:58:59 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by towiice on 2026-11-24T02:14:53Z.

Review: COMMENTED


Tested PR head d9d6117 on NVIDIA GeForce GTX 1650 SUPER (Turing / TU116, driver 610.88), Windows 11 build 10.0.26300 (26H2), Rust 1.100.0 (stable-x86_64-pc-windows-gnullvm), DXC v1.9.2609:

  • cargo test -p xcl --lib hle::d3d12x::list_x -- --test-threads=4: 18 passed, 0 failed (0.69 s), including wait64_flags_do_not_mask_the_recorded_counter and wait64_satisfied_counter_keeps_submission_together_and_wait32_keeps_its_mask.

All d3d12x::list_x tests pass on Turing.

<!-- greyfinch-sync:ivall/xcl:review:6032625098 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/569#pullrequestreview-6032625098). Originally posted by [towiice](https://github.com/towiice) on 2026-11-24T02:14:53Z. **Review:** COMMENTED --- Tested PR head `d9d6117` on **NVIDIA GeForce GTX 1650 SUPER** (Turing / TU116, driver 610.88), Windows 11 build 10.0.26300 (26H2), Rust 1.100.0 (`stable-x86_64-pc-windows-gnullvm`), DXC `v1.9.2609`: - `cargo test -p xcl --lib hle::d3d12x::list_x -- --test-threads=4`: **18 passed, 0 failed** (0.69 s), including `wait64_flags_do_not_mask_the_recorded_counter` and `wait64_satisfied_counter_keeps_submission_together_and_wait32_keeps_its_mask`. All `d3d12x::list_x` tests pass on Turing.
thehollowedone commented 2026-11-24 07:05:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-24T02:00:19Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7119661107 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/569#issuecomment-7119661107). Originally posted by [thehollowedone](https://github.com/thehollowedone) on 2026-11-24T02:00:19Z. --- 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.
upipibi commented 2026-11-24 07:06:13 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by upipibi on 2026-11-24T04:24:00Z.


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).

<!-- greyfinch-sync:ivall/xcl:comment:7121983014 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/569#issuecomment-7121983014). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-24T04:24:00Z. --- 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).
MesshM commented 2026-11-24 07:06:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by MesshM on 2026-11-24T04:33:54Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7122134637 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/569#issuecomment-7122134637). Originally posted by [MesshM](https://github.com/MesshM) on 2026-11-24T04:33:54Z. --- 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.
DavidM1911 commented 2026-11-25 14:09:57 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T13:18:35Z.


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!

<!-- greyfinch-sync:ivall/xcl:comment:7163590053 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/569#issuecomment-7163590053). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T13:18:35Z. --- 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!
upstream-sync closed this pull request 2026-11-25 20:06:43 +00:00
ivall commented 2026-11-25 20:08:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ivall on 2026-11-25T19:19:45Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7172144370 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/569#issuecomment-7172144370). Originally posted by [ivall](https://github.com/ivall) on 2026-11-25T19:19:45Z. --- 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.
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!564
No description provided.