Shader tests: keep dot4 test operands runtime for RDNA1 #1879

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

@⁠n-romanovich on GitHub · 2026-11-24 23:59 UTC · original
n-romanovich:test/valu-dot4-runtime-operands → main · +1 −1 · 1 files · 2 commits · open

Fixes #1782.

Summary

emit::valu_tests::fspx_programs_run_with_the_hardwares_dot_products previously loaded a, b, and acc with v_mov_b32 vN, literal, so drivers without native dot4 (RDNA1) constant-folded signed byte multiplicands >= 0x80 as unsigned.

This adds v0 (tid.x, 0 in the [1, 1, 1] dispatch) to each literal via v_add_nc_u32 so the operands stay runtime values while testing the same v_dot4_i32_i8 / v_dot4c_i32_i8 lowering and opsel / opsel_hi cases.

Testing

  • cargo test -p victory-shader --locked -- fspx_programs_run_with_the_hardwares_dot_products (1 passed, 0 failed)
  • No game data used. AI-assisted.
**@⁠n-romanovich** on GitHub · 2026-11-24 23:59 UTC · [original](https://github.com/Marvisak/VIctory/pull/1879) `n-romanovich:test/valu-dot4-runtime-operands` → `main` · +1 −1 · 1 files · 2 commits · open Fixes #1782. ### Summary `emit::valu_tests::fspx_programs_run_with_the_hardwares_dot_products` previously loaded `a`, `b`, and `acc` with `v_mov_b32 vN, literal`, so drivers without native `dot4` (RDNA1) constant-folded signed byte multiplicands >= `0x80` as unsigned. This adds `v0` (`tid.x`, `0` in the `[1, 1, 1]` dispatch) to each literal via `v_add_nc_u32` so the operands stay runtime values while testing the same `v_dot4_i32_i8` / `v_dot4c_i32_i8` lowering and `opsel` / `opsel_hi` cases. ### Testing - `cargo test -p victory-shader --locked -- fspx_programs_run_with_the_hardwares_dot_products` (1 passed, 0 failed) - No game data used. AI-assisted.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:47:30 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 08:20 UTC · original · edited 2026-11-26 01:19 UTC

Automated triage for the maintainers.

Proposed close: already in main. The merge of origin/main into this branch leaves only one change against main: load.clone() becomes load.to_vec() in fspx_programs_run_with_the_hardwares_dot_products (crates/victory-shader/src/emit/valu_tests.rs), and that has no effect. The fix for #1782 is already in main through #1790 (49761f9). That test now makes each operand at run time as a literal plus a word loaded from the zeroed UAV (buffer_load_dword v4 and v_add_nc_u32 vN, literal, v4), which is what this PR set out to do.

CI: passing (check).

The PR will be closed in 48 hours unless the author pushes a change or a maintainer removes the label.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 08:20 UTC · [original](https://github.com/Marvisak/VIctory/pull/1879#issuecomment-7156897553) · edited 2026-11-26 01:19 UTC <!-- victory-triage v1 head=d92dea205fec531b9d9c532c680f1e25e4944b90 verdict=proposed-close at=2026-11-26T01:19:48Z --> Automated triage for the maintainers. **Proposed close: already in main.** The merge of `origin/main` into this branch leaves only one change against `main`: `load.clone()` becomes `load.to_vec()` in `fspx_programs_run_with_the_hardwares_dot_products` (`crates/victory-shader/src/emit/valu_tests.rs`), and that has no effect. The fix for #1782 is already in `main` through #1790 (`49761f9`). That test now makes each operand at run time as a literal plus a word loaded from the zeroed UAV (`buffer_load_dword v4` and `v_add_nc_u32 vN, literal, v4`), which is what this PR set out to do. CI: passing (`check`). The PR will be closed in 48 hours unless the author pushes a change or a maintainer removes the label. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠sinan-cmyk on GitHub · 2026-11-25 11:51 UTC · original

Offline measurement on a retail dump

Result: no count change against main.

I merged head 5a8fc617 onto main 940d32f (clean merge) and ran victory translate --validate --list on shaders.rpf (1.0.2.1), with dxil.dll 1.8.2502.11. I compared the result with main program by program (25,889 programs). Validated: 23,918 on main, 23,918 with this PR.

No program changes its failure reason. The count shows that the change rejects nothing on this data. It does not show whether the output is right.

No shader names or data are included, per the asset policy. AI-assisted (Claude Code).

**@⁠sinan-cmyk** on GitHub · 2026-11-25 11:51 UTC · [original](https://github.com/Marvisak/VIctory/pull/1879#issuecomment-7161584211) ### Offline measurement on a retail dump **Result: no count change against `main`.** I merged head 5a8fc617 onto `main` 940d32f (clean merge) and ran `victory translate --validate --list` on `shaders.rpf` (1.0.2.1), with dxil.dll 1.8.2502.11. I compared the result with `main` program by program (25,889 programs). Validated: 23,918 on `main`, 23,918 with this PR. No program changes its failure reason. The count shows that the change rejects nothing on this data. It does not show whether the output is right. No shader names or data are included, per the asset policy. AI-assisted (Claude Code).
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/1879/head:github-bot/gh-1879'
git switch 'github-bot/gh-1879'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1879'
git switch 'github-bot/gh-1879'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1879'
git switch 'github-bot/gh-1879'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1879'
git switch 'main'
git merge --squash 'github-bot/gh-1879'
git switch 'main'
git merge --ff-only 'github-bot/gh-1879'
git switch 'main'
git merge 'github-bot/gh-1879'
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!1879
No description provided.