shader: test that s_sext_i32_i8 and s_sext_i32_i16 keep SCC #148
No reviewers
Labels
No labels
accessibility
bug
claimed
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
tester report
urgent
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LakshanSivakumar--Native-Victory-macOS!148
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-148"
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?
@lautarocherro on GitHub · 2026-11-26 21:02 UTC · original
lautarocherro:fix/shader-sext→main· +32 −1 · 2 files · 3 commits · merged 2026-11-27 00:57 UTCWhat this changes
main already lowers
s_sext_i32_i8ands_sext_i32_i16(974ffc8). This branch now merges main and drops its own lowering, its translation test and its docs section. Part of #4.What is left is one check main does not have: neither instruction sets SCC (RDNA2 ISA, SOP1), so a compare before them still decides a select after them.
writes_sccalready leaves them out. The test pins that down.How it was tested
cargo test -p victory-shader: passes (274 tests).cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings: passes, also with--all-features.cargo xtask policy: passes.New test:
valu_tests::scalar_sign_extensions_keep_scc(Windows only): runs both forms on the GPU and WARP and checks SCC after them. Non-zero results with SCC 0, and a zero result with SCC 1 in both forms, catch an extension that sets SCC. It checks only SCC:victory-gpu'saddr_tests::scalar_sign_extensions_on_the_gpualready checks the values on Metal. I could not run it here (Mac). It compiles under the Windows clippy gate, and CI runs it.The docs change is one sentence in main's note on the mesh programs.
Checklist
VICTORY_*variable and documented (none)Both were decoded but refused ("s_sext_i32_i16 is not supported", one compute program in the story-load log of #140). They are now the RDNA2 ISA's SOP1 operations: the low 8 or 16 bits of S0, sign-extended to 32 bits. Neither sets SCC, so a compare before them still decides a select after them. gfx_refusal_tests checks that both translate. valu_tests runs them on the GPU and WARP on Windows, values and SCC both.shader: lower s_sext_i32_i8 and s_sext_i32_i16to shader: test that s_sext_i32_i8 and s_sext_i32_i16 keep SCC@LakshanSivakumar on GitHub · 2026-11-26 22:36 UTC · original · requested changes
Thanks! main already lowers
s_sext_i32_i8ands_sext_i32_i16(974ffc84, the arm near lower.rs:5304), so after merging main this branch adds a second identical match arm. That is an unreachable pattern and fails the Windows clippy gate (-D warnings); I hit it testing the open PRs together. Could you merge main, drop the lower.rs hunk, and keep only what main doesn't already cover? The SCC-preservation check invalu_testsmay still be worth having. The docs section can then be folded into whatever main says about it.@LakshanSivakumar on GitHub · 2026-11-27 00:57 UTC · original · approved these changes
Reviewed and tested together with the other open PRs on main (macOS x86_64 workspace tests, the setup shell tests, and Windows clippy). Thanks!