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

Open
GeaorgeAyvazov wants to merge 1 commit from upstream-pr/831 into main
GeaorgeAyvazov commented 2026-11-25 09:39:23 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by GeaorgeAyvazov on 2026-11-25T09:39:23Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6601531995 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/831). Originally posted by [GeaorgeAyvazov](https://github.com/GeaorgeAyvazov) on 2026-11-25T09:39:23Z. --- ## 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.
avt0m4t48 commented 2026-11-25 11:10:42 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by avt0m4t48 on 2026-11-25T11:01:44Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7160490143 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/831#issuecomment-7160490143). Originally posted by [avt0m4t48](https://github.com/avt0m4t48) on 2026-11-25T11:01:44Z. --- 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.
MamaLeVrai commented 2026-11-25 13:06:04 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by MamaLeVrai on 2026-11-25T12:23:43Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7162314088 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/831#issuecomment-7162314088). Originally posted by [MamaLeVrai](https://github.com/MamaLeVrai) on 2026-11-25T12:23:43Z. --- 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 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/831:upstream-pr/831'
git switch 'upstream-pr/831'

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/831'
git switch 'upstream-pr/831'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/831'
git switch 'upstream-pr/831'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/831'
git switch 'main'
git merge --squash 'upstream-pr/831'
git switch 'main'
git merge --ff-only 'upstream-pr/831'
git switch 'main'
git merge 'upstream-pr/831'
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
fxceless/victory-fork!830
No description provided.