Skip to content

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

Open
n-romanovich wants to merge 2 commits into
Marvisak:mainfrom
n-romanovich:test/valu-dot4-runtime-operands
Open

n-romanovich wants to merge 2 commits into
Marvisak:mainfrom
n-romanovich:test/valu-dot4-runtime-operands

Conversation

@n-romanovich

Copy link
Copy Markdown

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.

@catminou4 catminou4 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally: macOS arm64, rustc 1.98.1, PR head merged into main 940d32f, cargo test -p victory-shader --locked.

144 passed / 0 failed / 2 ignored (baseline-identical). Keeping dot4 operands runtime avoids constant-folding so the RDNA1 path is actually exercised — correct test fix.

Marvisak commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

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

@sinan-cmyk

Copy link
Copy Markdown

Offline measurement on a retail dump

Result: no count change against main.

I merged head 5a8fc61 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).

…e-operands

# Conflicts:
#	crates/victory-shader/src/emit/valu_tests.rs
github-actions Bot added a commit to KevinPratap/VIctory that referenced this pull request Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shaders: fspx_programs_run_with_the_hardwares_dot_products fails on RDNA1, where the driver folds a constant Dot4AddI8Packed operand as unsigned

4 participants