Shader tests: keep the FSPX dot4 test off folded constants #1791
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1791
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@Calvix2k on GitHub · 2026-11-24 22:39 UTC · original
Calvix2k:codex/shader-fspx-dot4-test-1782→main· +22 −5 · 1 files · 1 commits · openFixes #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.@upipibi on GitHub · 2026-11-24 22:40 UTC · original
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 #1782@Marvisak on GitHub · 2026-11-25 06:22 UTC · original · edited 2026-11-25 11:21 UTC
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
@Calvix2k on GitHub · 2026-11-25 10:16 UTC · original
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 #17828ec8be9d40to2bd170a558@catminou4 on GitHub · 2026-11-24 23:04 UTC · original · approved these changes
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.
View 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.