shader: refuse reads of the carry s_lshlN_add_u32 leaves in SCC #2813
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!2813
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2813"
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?
@spy0eye-beep on GitHub · 2026-11-25 21:14 UTC · original
spy0eye-beep:fix/lshl-add-scc→main· +21 −1 · 2 files · 1 commits · openSplit out of #1483 as requested in review. The s_min/s_max part of that PR is already fixed on main; this is the remaining piece.
s_lshl{1..4}_add_u32fell through to the default SCC = (result != 0), but the hardware sets the add's carry. Like s_add/s_sub, SCC is now marked unknown, so a shader that reads it is refused instead of silently mistranslated.Test:
lshl_add_carry_read_is_refusedbuilds each of the four ops followed bys_cselect_b32on SCC and expects the refusal (it fails without the change).cargo test -p victory-shader: the same 9 tests fail on main and on this branch.🤖 Generated with Claude Code
@fuzeofficlal on GitHub · 2026-11-25 21:30 UTC · original
Verified
0e193dbdon Windows 11 (RTX 5090 + WARP + Windows SDK10.0.26100.0dxil.dll):cargo xtask policy: 184 files ok.lshl_add_carry_read_is_refused+carries_match_the_hardware): 2/2 passed; WARP +dxil.dll: 268 passed, 0 failed.name.starts_with("s_lshl") && name.ends_with("_add_u32")targetss_lshl1_add_u32..s_lshl4_add_u32without affectings_lshl_b32/_b64, and merges cleanly with #2385.One clippy failure causing CI to fail:
crates/victory-shader/src/emit/valu_tests.rs:1821:43:error: called '.err().expect()' on a Result value(-D clippy::err_expect). Replacingrefused.err().expect("refused")withrefused.expect_err("refused")will clear CI.@Marvisak on GitHub · 2026-11-25 23:14 UTC · original
Automated triage for the maintainers.
This PR no longer merges cleanly into
main: it conflicts incrates/victory-shader/src/emit/valu_tests.rs. Its content will be reviewed once it is rebased onto currentmain.Generated by Claude Code
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.