Shaders: lower v_xnor_b32 and v_swap_b32 #58
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/58"
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?
Imported from Marvisak/VIctory. Originally posted by Yaekai on 2026-11-23T23:59:22Z.
Adds 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.Imported from Marvisak/VIctory. Originally posted by DaviTostes on 2026-11-24T00:02:55Z.
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).