lower: lower v_permlanex16_b32 to waveReadLaneAt #1134
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!1134
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1134/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?
@bitzin-dev on GitHub · 2026-11-24 16:06 UTC · original
bitzin-dev:shader/v-permlanex16-b32→main· +36 −0 · 1 files · 1 commits · closed without mergingImplements lowering for RDNA2 VOP3 opcode
v_permlanex16_b32(Vector Permute Lane Extended 16, 32-bit).Background
In RDNA2,
v_permlanex16_b32gathers across adjacent 16-lane rows (row 0 <-> row 1, row 2 <-> row 3) using a 64-bit selector composed of scalar operands{s2, s1}. For each 16-lane row, lanei(0..15) extracts 4-bit nibblei:s1s2The target lane within the alternate row is
alt_row | pick, wherealt_row = (lane & !31) | ((lane & 16) ^ 16)andpick = (sel_word >> ((lane & 7) * 4)) & 15. The value is then read viawaveReadLaneAt.i32.Validation
victory translate --validate "D:\GTA 6\shaders.rpf"):deferred_tiled:CS_WaterTransmittanceOpticalDepthProcessing_44443e79_Wrapped Cs(at0xd00).dxil.dllincreased from 1,417 to 1,418 (+1).cargo test -p victory-shader).cargo xtask policypasses cleanly.@bitzin-dev on GitHub · 2026-11-24 16:31 UTC · original
Thanks for pointing that out, @catminou4! Didn't catch that #1014 was opened just about an hour before. It definitely makes sense to close this in favor of #1014 since it handles both
v_permlane16_b32andv_permlanex16_b32together with the cross-lane guard list check. Closing!Pull request closed