shader: lower s_absdiff_i32 #128
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!128
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-128"
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?
@Olima34 on GitHub · 2026-11-26 17:57 UTC · original
Olima34:fix/shader-absdiff→main· +77 −0 · 4 files · 1 commits · merged 2026-11-26 18:09 UTCs_absdiff_i32was decoded but refused ("s_absdiff_i32": 1 unique compute shader in the #123 story-load log, commit182c14f).What. It is lowered as the RDNA2 ISA's SOP2 operation:
D = S0 - S1as a wrapping 32-bit difference, negated when it is negative as a signed number, andSCC = D != 0. The arm sits next tos_abs_i32.Tests.
gfx_refusal_tests::absdiff_translates: an FSPX compute program translates. It is refused on main.victory-gpuaddr_tests::absdiff_is_the_magnitude_of_the_signed_difference_on_the_gpuruns on Metal. It checks D and SCC for (5, 9), (9, 5), (-3, 4), (7, 7), (MIN, 1), (1, MIN) and (MIN, 0). The wrapping cases are the hardware's magnitudes:1 - MINgivesi32::MAX, and|MIN - 0|gives0x8000_0000.The old refusal text appears nowhere else in
crates/. victory-shader and victory-gpu tests (arm64, Metal), Windows clippy andcargo xtask policypass.@LakshanSivakumar on GitHub · 2026-11-26 18:10 UTC · original
Merged, thanks.
s_absdiff_i32lowers, and the GPU test covers the wrapping cases.