test(shader): cover split-wave FP64 sums with masked poison #831

Open
github-bot wants to merge 1 commit from github-bot/gh-831 into main AGit
Owner

@⁠GeaorgeAyvazov on GitHub · 2026-11-25 09:39 UTC · original
GeaorgeAyvazov:test/fp64-split-wave-poison → main · +284 −0 · 1 files · 1 commits · open

Summary

Test-only coverage for FP64 reductions when a console wave64 is lowered onto two host wave32s. No production lowering, descriptor, loader, cache or runtime behavior changes.

  • Exercise 64- and 128-thread groups with distinct inputs in the lower/upper halves.
  • Exercise partial saved EXEC with +Inf, positive quiet NaN and negative NaN in inactive lanes.
  • Check every thread at its own output address. In the partial cases the input low dword affects the expected FP32 result.
  • Add a CPU fixture regression checking offen, byte offset 4 * thread_index, and the store-address SSA producer.
  • Select a hardware adapter supporting SM6.6, FP64 and WaveSize32 within this test only; log rejection/skip reasons. Once selected, PSO and dispatch errors fail rather than silently skipping.

The reduction sequence adapts the existing upstream synthetic fixture valu_tests::whole_wave_f64_sum_and_cvt_f32_f64. No title containers, shader dumps, screenshots or game-derived assets are included.

Complements #461 without duplicating its production guard fix: local-wave and small-group cases are deliberately excluded, so this test-only PR has no dependency on that unmerged change.

The 128-thread case exercises multiple wave pairs, but both console waves use the same inputs; it does not establish pair isolation against swapping. This PR makes no claim of fixing dark rendering or in-game host pipeline refusals.

Verification

Base: 9376fd60c0ba0e76a74c39b49b1407dbac0a64c7. Windows, Rust 1.98.1-x86_64-pc-windows-gnu, offline/locked dependencies.

  • Targeted cargo test -p victory-shader --lib fp64_ -- --nocapture: 3 passed, 0 failed. DXIL validator available.
  • NVIDIA GeForce RTX 3070 Ti Laptop GPU selected after rejecting Intel Iris Xe for missing FP64 support. All four 64/128-thread full/partial cases explicitly logged actual hardware execution, including during the full suite.
  • Full suites built in separate fresh target directories:
    • Unmodified base: 206 passed, 9 failed, 3 ignored.
    • With this patch: 209 passed, 9 failed, 3 ignored.
    • The nine failing names are identical pre-existing intersection/VALU/wave tests using the default-adapter harness. All three new tests pass. Not an all-green full-suite claim.
  • cargo xtask policy: 171 files OK.
  • git diff --check: passed.
  • Clippy unavailable: installed GNU toolchain lacks cargo-clippy; not reported as passed.

AI-assisted implementation and independent static review; verification performed locally.

**@⁠GeaorgeAyvazov** on GitHub · 2026-11-25 09:39 UTC · [original](https://github.com/fxceless/victory-fork/pull/831) `GeaorgeAyvazov:test/fp64-split-wave-poison` → `main` · +284 −0 · 1 files · 1 commits · open ## Summary Test-only coverage for FP64 reductions when a console wave64 is lowered onto two host wave32s. No production lowering, descriptor, loader, cache or runtime behavior changes. - Exercise 64- and 128-thread groups with distinct inputs in the lower/upper halves. - Exercise partial saved EXEC with +Inf, positive quiet NaN and negative NaN in inactive lanes. - Check every thread at its own output address. In the partial cases the input low dword affects the expected FP32 result. - Add a CPU fixture regression checking `offen`, byte offset `4 * thread_index`, and the store-address SSA producer. - Select a hardware adapter supporting SM6.6, FP64 and WaveSize32 within this test only; log rejection/skip reasons. Once selected, PSO and dispatch errors fail rather than silently skipping. The reduction sequence adapts the existing upstream synthetic fixture `valu_tests::whole_wave_f64_sum_and_cvt_f32_f64`. No title containers, shader dumps, screenshots or game-derived assets are included. ## Scope / related work Complements #461 without duplicating its production guard fix: local-wave and small-group cases are deliberately excluded, so this test-only PR has no dependency on that unmerged change. The 128-thread case exercises multiple wave pairs, but both console waves use the same inputs; it does not establish pair isolation against swapping. This PR makes no claim of fixing dark rendering or in-game host pipeline refusals. ## Verification Base: `9376fd60c0ba0e76a74c39b49b1407dbac0a64c7`. Windows, Rust `1.98.1-x86_64-pc-windows-gnu`, offline/locked dependencies. - Targeted `cargo test -p victory-shader --lib fp64_ -- --nocapture`: **3 passed, 0 failed**. DXIL validator available. - NVIDIA GeForce RTX 3070 Ti Laptop GPU selected after rejecting Intel Iris Xe for missing FP64 support. All four 64/128-thread full/partial cases explicitly logged actual hardware execution, including during the full suite. - Full suites built in separate fresh target directories: - Unmodified base: **206 passed, 9 failed, 3 ignored**. - With this patch: **209 passed, 9 failed, 3 ignored**. - The nine failing names are identical pre-existing intersection/VALU/wave tests using the default-adapter harness. All three new tests pass. **Not an all-green full-suite claim.** - `cargo xtask policy`: **171 files OK**. - `git diff --check`: passed. - Clippy unavailable: installed GNU toolchain lacks `cargo-clippy`; not reported as passed. AI-assisted implementation and independent static review; verification performed locally.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:52:04 +00:00
Author
Owner

@⁠avt0m4t48 on GitHub · 2026-11-25 11:01 UTC · original

I independently checked head 6c5bc0de52d523b1cc440fa5fbfb6fd485c2ee8a against base 9376fd60c0ba0e76a74c39b49b1407dbac0a64c7 on Linux with Rust 1.98.1 and separate Cargo targets.

  • The untouched Linux shader library suite had 171 passes and 2 ignored on both revisions. The new module is gated to Windows.
  • On the untouched PR head, cargo check -p victory-shader --tests --target x86_64-pc-windows-msvc --offline --locked passed. Shader Clippy also passed with --all-targets -- -D warnings for that target, with default features and with all features.
  • In a temporary Linux-only harness, the PR's store-address IR assertion passed for both mask modes. All four synthetic fixtures emitted distinct DXIL programs. Their PSV0 declared fixed WaveSize32 and the expected 64- or 128-thread group, and their SFI0 set both the doubles and wave-ops bits.

The changed-file rustfmt check flagged six regions in the added fp64_host helper as well as existing formatting differences elsewhere in the file.

This cycle covered compilation, IR and emission. Native Windows execution, Microsoft DXIL validation and GPU readback remain outside this independent check.

**@⁠avt0m4t48** on GitHub · 2026-11-25 11:01 UTC · [original](https://github.com/fxceless/victory-fork/pull/831#issuecomment-7160490143) I independently checked head `6c5bc0de52d523b1cc440fa5fbfb6fd485c2ee8a` against base `9376fd60c0ba0e76a74c39b49b1407dbac0a64c7` on Linux with Rust 1.98.1 and separate Cargo targets. - The untouched Linux shader library suite had 171 passes and 2 ignored on both revisions. The new module is gated to Windows. - On the untouched PR head, `cargo check -p victory-shader --tests --target x86_64-pc-windows-msvc --offline --locked` passed. Shader Clippy also passed with `--all-targets -- -D warnings` for that target, with default features and with all features. - In a temporary Linux-only harness, the PR's store-address IR assertion passed for both mask modes. All four synthetic fixtures emitted distinct DXIL programs. Their PSV0 declared fixed WaveSize32 and the expected 64- or 128-thread group, and their SFI0 set both the doubles and wave-ops bits. The changed-file rustfmt check flagged six regions in the added `fp64_host` helper as well as existing formatting differences elsewhere in the file. This cycle covered compilation, IR and emission. Native Windows execution, Microsoft DXIL validation and GPU readback remain outside this independent check.
Author
Owner

@⁠MamaLeVrai on GitHub · 2026-11-25 12:23 UTC · original · edited 2026-11-25 12:51 UTC

Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present. I merged this PR's head 6c5bc0d into main f85101b in a throwaway tree (no conflict). cargo clippy --workspace --all-targets --locked -- -D warnings fails with the errors main itself has on this machine (placed_filler_twins, depth_written, a sort, and manual implementation of .is_multiple_of() at victory-gpu/src/shadow.rs:2675; PR #841 fixes the first three), also with --all-features; this PR adds none. (Correction: my first version of this report said that the is_multiple_of one was extra here. It is in main too: my first baseline run of main did not list it, and a run with --keep-going on a clean main does.) cargo test --workspace --locked: run 1: 568 passed, 0 failed, 12 ignored; run 2: stopped at indirect::tests::warp_budget_saturates_without_wraparound_and_preserves_draw_fields (the one that fails on main itself most runs here (PR #849 and #847 fix its assertion)) (main alone: 555 passed, 0 failed, 11 ignored). The title was not run, so this says nothing about in-game effect. No game data.

AI-assisted (Claude Code); no game data.

**@⁠MamaLeVrai** on GitHub · 2026-11-25 12:23 UTC · [original](https://github.com/fxceless/victory-fork/pull/831#issuecomment-7162314088) · edited 2026-11-25 12:51 UTC Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present. I merged this PR's head `6c5bc0d` into `main` `f85101b` in a throwaway tree (no conflict). `cargo clippy --workspace --all-targets --locked -- -D warnings` fails with the errors `main` itself has on this machine (`placed_filler_twins`, `depth_written`, a sort, and `manual implementation of .is_multiple_of()` at `victory-gpu/src/shadow.rs:2675`; PR #841 fixes the first three), also with `--all-features`; this PR adds none. (Correction: my first version of this report said that the `is_multiple_of` one was extra here. It is in `main` too: my first baseline run of `main` did not list it, and a run with `--keep-going` on a clean `main` does.) `cargo test --workspace --locked`: run 1: 568 passed, 0 failed, 12 ignored; run 2: stopped at `indirect::tests::warp_budget_saturates_without_wraparound_and_preserves_draw_fields` (the one that fails on `main` itself most runs here (PR #849 and #847 fix its assertion)) (`main` alone: 555 passed, 0 failed, 11 ignored). The title was not run, so this says nothing about in-game effect. No game data. AI-assisted (Claude Code); no game data.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
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/831/head:github-bot/gh-831'
git switch 'github-bot/gh-831'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-831'
git switch 'github-bot/gh-831'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-831'
git switch 'github-bot/gh-831'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-831'
git switch 'main'
git merge --squash 'github-bot/gh-831'
git switch 'main'
git merge --ff-only 'github-bot/gh-831'
git switch 'main'
git merge 'github-bot/gh-831'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.