Shaders: lower v_xnor_b32 and v_swap_b32 #58
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!58
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/58/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?
@Yaekai on GitHub · 2026-11-23 23:59 UTC · original
Yaekai:feat/shader-xnor-swap→main· +34 −2 · 2 files · 1 commits · merged 2026-11-24 00:35 UTCAdds lowering for two VALU instructions encountered in GTA VI world compute shaders:
v_xnor_b32incrates/victory-shader/src/emit/lower.rsv_swap_b32incrates/victory-shader/src/emit/lower.rs, plus recordingv.dstas a read incrates/victory-shader/src/ir.rsforv_swap_b32/v_swaprel_b32since both operands are read before being swapped.Verification
cargo test -p victory-shader: 57/57 passed.v_xnor_b32 is not supported/v_swap_b32 is not supportednow translate cleanly.@DaviTostes on GitHub · 2026-11-24 00:02 UTC · original
Tested
0c56091stacked on #39 on Arch Linux x86_64, rustc 1.98.1: pass.mainalone does not build on Linux (E0425 invictory-gpu), so the check uses #39 as the base; the merge is clean.cargo test --workspace: 156 passed, 0 failed, 3 ignored, so the two new lowering paths do not disturb the existing shader tests.One review note: the diff adds no test for
v_xnor_b32/v_swap_b32themselves (lower.rs+ir.rsonly), so this run is a no-regression check rather than coverage of the new lowering — worth a synthetic case like the neighbouring VALU tests.AI-assisted (DeepSeek V4.1 Flash coding agent).