shader: lower s_absdiff_i32 and s_pack_{ll,lh,hh}_b32_b16 #1675
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!1675
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1675/head"
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?
@geiyiliyabumo on GitHub · 2026-11-24 20:41 UTC · original
geiyiliyabumo:fix/shader-scalar-sext-pack-absdiff→main· +79 −0 · 2 files · 1 commits · closed without mergingSummary
crates/victory-shader/src/emit/lower.rs:s_absdiff_i32(0x02c): computes 32-bit signed|src0 - src1|(preserving two's-complement wraparound oni32::MIN) and setsSCC = (result != 0)(already declared inir.rswrites_scc).s_pack_ll_b32_b16(0x032),s_pack_lh_b32_b16(0x033), ands_pack_hh_b32_b16(0x034): pack selected 16-bit halves ofsrc0(low 16) andsrc1(high 16); do not modifySCC.s_sext_i32_{i8,i16}).Verification
cargo test -p victory-shader --lib valu_tests: PASS on both AMD Radeon RX 9060 XT (D3D12 hardware) and Microsoft Basic Render Driver (WARP), includingscalar_absdiff_and_pack_match_rdna2.cargo clippy -p victory-shader --all-targets -- -D warnings: clean.cargo xtask policy: pass (154 files).AI-assisted; synthetic tests only, no game files.
@Marvisak on GitHub · 2026-11-25 01:24 UTC · original
Automated triage for the maintainers. Closing because another open pull request covers the same change.
See #120. Lowers s_absdiff_i32 and s_pack_{ll,lh,hh}_b32_b16, which the title does not use. The clean #120 covers the same four plus s_sext.
If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
@Marvisak on GitHub · 2026-11-25 01:34 UTC · original
Automated triage for the maintainers.
Needs rebase. This pull request conflicts with
main(conflicting:crates/victory-shader/src/emit/valu_tests.rs). It will be reviewed once it is rebased onto the currentmain.Generated by Claude Code
Pull request closed