Shader tests: keep the FSPX dot4 test off folded constants #1790
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1791"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by Calvix2k on 2026-11-24T22:39:53Z.
Fixes #1782.
Summary
On RDNA1 the driver's compiler folds a
dot4constant multiplicand with zero-extended bytes, so the FSPX test's literal operands with bytes ≥ 0x80 produced the unsigned dot product on an RX 5700 even though the DXIL asks for the signed opcode.dot4_signed_bytes_with_runtime_operandstest feeds the original signed values throughbuild_valu_cs's root constants (run-time operands, not literals), so negative-byte signed coverage remains.No lowering change: the DXIL was already correct.
Validation
--all-targets --all-features -D warningsandcargo xtask policy(174 files) pass.Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T23:04:17Z.
Review: APPROVED
Tested locally on macOS arm64 (rustc 1.98.1): PR head merged cleanly into current main (
70564ae), cargo test -p victory-shader --locked → 118 passed, 0 failed. GPU execution tests (valu_tests/host) are #[cfg(all(test, windows))] and run only on Windows; macOS covers lowering/structure unit tests.FSPX dot4 test kept off folded constants + dot4_signed_bytes_with_runtime_operands: same anti-folding theme as #1790 — complements it.
Imported from Marvisak/VIctory. Originally posted by upipibi on 2026-11-24T22:40:27Z.
Overlap for the reviewers: #1790 (opened a minute earlier) fixes #1782 in the same test,
fspx_programs_run_with_the_hardwares_dot_productsinvalu_tests.rs, the other way round. It loadsa,band the accumulator throughv_add_nc_u32 … v4from a buffer, so every case, the signed high-byte ones included, reaches the driver at run time. This PR keeps literals but limits them to bytes below 0x80, and adds a separate run-time test for the signed values. Both edit the same function, so only one can merge as is. From reading the two diffs' descriptions and file lists; nothing built.AI-assisted (Claude Code).
fspx_programs_run_with_the_hardwares_dot_productsfails on RDNA1, where the driver folds a constantDot4AddI8Packedoperand as unsigned #1781Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T06:22:36Z.
Automated triage for the maintainers.
Proposed close: duplicate of #1790. The head is the same as at the earlier note. Both PRs fix #1782 in
fspx_programs_run_with_the_hardwares_dot_products(crates/victory-shader/src/emit/valu_tests.rs). #1790 makes the FSPX test's operands run-time values, so the FSPX path keeps its negative-byte coverage. This PR moves the literals below 0x80 and checks negative bytes only in a separate non-FSPX test. #1790 is still open and merges cleanly. This PR also still adds a stray second blank line after theuseblock.On your reply: thanks for the RX 7800 XT run. It shows the tests pass on RDNA3, but it doesn't change the overlap with #1790, and RDNA3 is not the RDNA1 case from #1782. If the maintainer prefers this approach, removing the label keeps it open.
CI:
checkpassing.The PR will be closed in 48 hours unless the author pushes a change or a maintainer removes the label.
Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by Calvix2k on 2026-11-25T10:16:02Z.
Hardware run on an RX 7800 XT (RDNA3), Windows 10 19045, SM 6.6 via the Agility runtime for the test binaries (#486):
victory-shaderlib suite 248 passed, 0 failed, 3 ignored, including the FSPX dot4 test this PR changes. The runtime-fed operands are exercised on the card here.fspx_programs_run_with_the_hardwares_dot_productsfails on RDNA1, where the driver folds a constantDot4AddI8Packedoperand as unsigned #1781View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.