Add a synthetic D3D12 wave64 regression for independently looping waves #3180

Open
github-bot wants to merge 2 commits from github-bot/gh-3180 into main AGit
Owner

@⁠carlosmegino on GitHub · 2026-11-26 11:20 UTC · original
carlosmegino:codex/wave64-2688-regression → main · +278 −1 · 3 files · 2 commits · open

Refs #2688.

Summary

Add an opt-in, synthetic D3D12 readback test for a 128-thread group with two logical wave64s. The waves use different EXEC masks and loop counts, keep their LDS regions separate, elect lanes in opposite halves, and read the other wave's counter after a group barrier. A 64-thread group serves as the control. The CPU oracle checks seven UAVs at every logical lane and also checks their canaries.

The LDS loop is adapted from PiloteCode's GPL-3.0 fixture in fxceless/victory-fork#854. The PR adds the test and a resource-state adjustment in the test host.

Validation

On an RTX 5070 Ti, the main emitter requests a physical wave64 PSO for the 64-thread case. The 128-thread case runs but returns 0 instead of 40 in UAV 2, lane 0. The only upstream change between the tested 842b0cb and this PR's base 63bcca4 is a README update. This draft records the expected failures so a later backend patch can demonstrate both cases turning green.

With the paired backend and the separate selection fix, both group sizes matched all seven CPU outputs per lane. Canaries stayed intact and D3D12 GPU-based validation reported zero warnings or errors.

Run on a wave32 GPU with Windows Graphics Tools and the DXIL validator:

cargo test -p victory-shader --locked --lib wave64_2688_group -- --ignored --nocapture --test-threads=1
**@⁠carlosmegino** on GitHub · 2026-11-26 11:20 UTC · [original](https://github.com/Marvisak/VIctory/pull/3180) `carlosmegino:codex/wave64-2688-regression` → `main` · +278 −1 · 3 files · 2 commits · open Refs #2688. ## Summary Add an opt-in, synthetic D3D12 readback test for a 128-thread group with two logical wave64s. The waves use different EXEC masks and loop counts, keep their LDS regions separate, elect lanes in opposite halves, and read the other wave's counter after a group barrier. A 64-thread group serves as the control. The CPU oracle checks seven UAVs at every logical lane and also checks their canaries. The LDS loop is adapted from PiloteCode's GPL-3.0 fixture in fxceless/victory-fork#854. The PR adds the test and a resource-state adjustment in the test host. ## Validation On an RTX 5070 Ti, the main emitter requests a physical wave64 PSO for the 64-thread case. The 128-thread case runs but returns 0 instead of 40 in UAV 2, lane 0. The only upstream change between the tested `842b0cb` and this PR's base `63bcca4` is a README update. This draft records the expected failures so a later backend patch can demonstrate both cases turning green. With the paired backend and the separate selection fix, both group sizes matched all seven CPU outputs per lane. Canaries stayed intact and D3D12 GPU-based validation reported zero warnings or errors. Run on a wave32 GPU with Windows Graphics Tools and the DXIL validator: ```powershell cargo test -p victory-shader --locked --lib wave64_2688_group -- --ignored --nocapture --test-threads=1 ```
(cherry picked from commit 1d717d57fabf1ce0234ad50658b99ff62a908108)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 11:32:59 +00:00
Author
Owner

@⁠Dukestar69 on GitHub · 2026-11-26 12:11 UTC · original · reviewed

Checked against origin/main (63bcca4) on Windows 11 + RTX 5090:

  • cargo clippy -p victory-shader --all-targets -- -D warnings: clean.
  • cargo xtask policy: 192 files ok.
  • cargo test -p victory-shader --lib wave64_group_tests::: compiles cleanly (2 ignored by default). Running with --ignored requires Windows Graphics Tools (D3D12GetDebugInterface returned 0x887A002D DXGI_ERROR_SDK_COMPONENT_MISSING on this host), so I am leaving a comment rather than an approval since the ignored GPU assertions could not be executed here.

Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).

**@⁠Dukestar69** on GitHub · 2026-11-26 12:11 UTC · [original](https://github.com/Marvisak/VIctory/pull/3180#pullrequestreview-6073907867) · **reviewed** Checked against `origin/main` (`63bcca4`) on Windows 11 + RTX 5090: - `cargo clippy -p victory-shader --all-targets -- -D warnings`: clean. - `cargo xtask policy`: 192 files ok. - `cargo test -p victory-shader --lib wave64_group_tests::`: compiles cleanly (2 ignored by default). Running with `--ignored` requires Windows Graphics Tools (`D3D12GetDebugInterface` returned `0x887A002D` `DXGI_ERROR_SDK_COMPONENT_MISSING` on this host), so I am leaving a comment rather than an approval since the ignored GPU assertions could not be executed here. Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Author
Owner

@⁠carlosmegino on GitHub · 2026-11-26 12:14 UTC · original

Thanks for the independent verification!

The ignored tests require Windows Graphics Tools because they enable the D3D12 debug layer and GPU-based validation.

Installing Graphics Tools under Windows Optional Features should resolve DXGI_ERROR_SDK_COMPONENT_MISSING.

I appreciate you checking the compilation, Clippy and asset policy on a separate NVIDIA system.

If you have the opportunity to run the GPU assertions on your RTX 5090, that would provide a valuable independent hardware result.

**@⁠carlosmegino** on GitHub · 2026-11-26 12:14 UTC · [original](https://github.com/Marvisak/VIctory/pull/3180#issuecomment-7191741665) Thanks for the independent verification! The ignored tests require Windows Graphics Tools because they enable the D3D12 debug layer and GPU-based validation. Installing Graphics Tools under Windows Optional Features should resolve DXGI_ERROR_SDK_COMPONENT_MISSING. I appreciate you checking the compilation, Clippy and asset policy on a separate NVIDIA system. If you have the opportunity to run the GPU assertions on your RTX 5090, that would provide a valuable independent hardware result.
Author
Owner

@⁠upipibi on GitHub · 2026-11-26 20:05 UTC · original · edited 2026-11-26 20:13 UTC

Independent hardware run of the ignored tests on 827057a (main 63bcca4 only for the shared tests: the two ignored tests are added by this PR, so they do not exist on main and ran on the PR head only): RTX 3070 8 GB (Ampere, wave32 only), driver 616.56, Windows 11, rustc 1.98.1, Windows Graphics Tools and dxil.dll present.

cargo test -p victory-shader --locked --lib wave64_2688_group -- --ignored --nocapture --test-threads=1, one run:

test result on the PR head
wave64_2688_group_128 fails: UAV 2, lane 0 reads 0 instead of 40
wave64_2688_group_64 fails at pipeline creation; the debug layer reports "Shader wants wave lane count of 64 but maximum wave lane count for device is 32"

Both are the expected failures your description records on the RTX 5070 Ti: the 64-thread case's main emitter asks for a physical wave64 PSO, which a 32-lane-only driver refuses, and the 128-thread case returns 0 instead of 40. So Ampere shows the same two failures. The debug layer logged that one error and no warnings; GPU-based validation logged nothing. The non-ignored wave64 tests pass on both trees (5 each). No driver resets.

AI-assisted (Claude Code, Claude Sonnet 5.5 ran the tests; Claude Opus 5.5 checked and posted).

**@⁠upipibi** on GitHub · 2026-11-26 20:05 UTC · [original](https://github.com/Marvisak/VIctory/pull/3180#issuecomment-7202281143) · edited 2026-11-26 20:13 UTC Independent hardware run of the ignored tests on `827057a` (`main` `63bcca4` only for the shared tests: the two ignored tests are added by this PR, so they do not exist on `main` and ran on the PR head only): RTX 3070 8 GB (Ampere, wave32 only), driver 616.56, Windows 11, rustc 1.98.1, Windows Graphics Tools and `dxil.dll` present. `cargo test -p victory-shader --locked --lib wave64_2688_group -- --ignored --nocapture --test-threads=1`, one run: | test | result on the PR head | |---|---| | `wave64_2688_group_128` | fails: UAV 2, lane 0 reads 0 instead of 40 | | `wave64_2688_group_64` | fails at pipeline creation; the debug layer reports "Shader wants wave lane count of 64 but maximum wave lane count for device is 32" | Both are the expected failures your description records on the RTX 5070 Ti: the 64-thread case's main emitter asks for a physical wave64 PSO, which a 32-lane-only driver refuses, and the 128-thread case returns 0 instead of 40. So Ampere shows the same two failures. The debug layer logged that one error and no warnings; GPU-based validation logged nothing. The non-ignored `wave64` tests pass on both trees (5 each). No driver resets. AI-assisted (Claude Code, Claude Sonnet 5.5 ran the tests; Claude Opus 5.5 checked and posted).
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/3180/head:github-bot/gh-3180'
git switch 'github-bot/gh-3180'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3180'
git switch 'github-bot/gh-3180'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3180'
git switch 'github-bot/gh-3180'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3180'
git switch 'main'
git merge --squash 'github-bot/gh-3180'
git switch 'main'
git merge --ff-only 'github-bot/gh-3180'
git switch 'main'
git merge 'github-bot/gh-3180'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!3180
No description provided.