xshader: wave32 lane ops address the guest half on 64-lane host waves #62
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
library
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/omonkeyz--xbox-emulator!62
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/62/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?
@QuentinDanblon on GitHub · 2026-11-21 22:02 UTC · original
QuentinDanblon:fix/wave32-lane-halves→main· +90 −7 · 3 files · 1 commits · closed without mergingLibrary / area: tombox-xshader: wave32 guest lane numbering on 64-lane host waves
Exports changed (exports.txt rows): none
Source of the behaviour: RDNA2 ISA (wave32 lanes 0-31). The observation that AMD drivers can run fragment subgroups 64 wide comes from americas-recomp (GPL, observation only, measured on Vulkan with an RX 7800 XT).
Guest lane numbers were used as absolute host lane indices (
WaveReadLaneAt(x, lane & 31), writelane comparingWaveGetLaneIndex() == lane & 31, the DPP row maskrow_mask >> (lane >> 4), and STATUS EXECZ/VCCZ via a whole-wave AnyTrue). On a host that runs 64-lane waves, host lanes 32-63 are a second guest wave and would read or write the first one's lanes.ds_ext.rsalready used the half base.guest_lane(L)=(WaveGetLaneIndex() & ~31) | (L & 31)for wave32 guests (wave64 guests unchanged), used by v_readlane and v_writelane.guest_any(c): STATUS EXECZ/VCCZ use the ballot word of the lane's own half.(l >> 4) & 1for wave32 guests.ds_append/ds_consume(upstream's WaveActiveBallot version) count and elect within the lane's half.Tests
WARP:
--test opcodes23/23, including the newlane_numbering_follows_guest_wave(it checks the emitted HLSL for wave32 and that wave64 output is unchanged).WARP:
--test execvop::lanes, exec_mem::ds and exec_mem::gds pass, 12/12.Earlier, on the pre-sync base, the RTX 5090 lane tests passed: readlane/writelane 15/15, permlane 128/128, DPP 406/406.
No adapter here runs 64-lane waves (RTX 5090, Intel UHD 770, WARP), so the 64-wide case itself is not executed.
cargo test -p tombox-xshader(lane subsets) passesNo game or console files and no binaries included
No fake success; anything not possible is left
missingwith a note@QuentinDanblon on GitHub · 2026-11-22 12:03 UTC · original
Folded into #61 (commit
8630ef2, same change rebased on51f5319), so that everything about real hardware is in one PR. Closing this one.@omonkeyz on GitHub · 2026-11-22 13:12 UTC · original
Main's history was rewritten, which auto-closed this PR. It is applied in
93861d6(merged in81a1252) with your authorship kept, thanks! (via #61's rebased copy). The added comment lines were stripped on the applied copy (the project keeps code free of comment lines).Pull request closed