startup: lower s_wqm exec, exec on a narrowed EXEC as a quad vote #2747
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!2747
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2747/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?
@tedin7 on GitHub · 2026-11-26 05:41 UTC · original
tedin7:x2w-texflow-wqm→main· +870 −8 · 7 files · 20 commits · closed without mergingPart of #1723
What this unblocks:
image_sample_b/image_get_lodafters_wqm_b64 exec, execon a lane-narrowed EXEC (a kill or cmpx followed by a whole-quad restore), which was refused as a lane-EXEC break.Source: AMD "RDNA 2" Instruction Set Architecture reference guide, SOP1 instruction S_WQM_B64 (whole-quad mode of a mask) and the EXEC / quad rules of the MIMG sample instructions; Microsoft DirectX-Specs, D3D11 functional specification,
sample_bandlod.Stacked on #2736 (this branch contains its commits until that merges; the new work is the last two commits). Builds on #2659.
What changed
s_wqm exec, execon a narrowed EXEC is lowered asexec = x2w_quad_any(exec) ? 1u : 0u;: the guest turns on every lane of a quad with an active lane, which is exactly the vote the branches already use. It is taken only where the quad runs the statement together (uniform_cfholds, no earlier lane-EXEC break, pixel program without a backward branch).s_wqmforms (other operands) still break and stay refused.s_wqmis still not voted (the #2736 vector-only gate), so the op is refused there.Tests
wqm(cmpx, thens_wqm_b64 exec, exec, then the subtraction, then the op) instartup_image_sample_b_flow_check.pyandstartup_image_get_lod_flow_check.py: u1 = 1/8 when the whole quad is back on, 5/8 if s_wqm were a no-op. Mutant "s_wqm as a no-op" must fail the draw. Words reassemble with llvm-mc.wqm_breakrefused fixture of #2736 became this accepted fixture.Verification (Linux only):
Win2025 WARP dev+release: pending Stage-2.
AI-assisted; commands listed were executed locally.
@tedin7 on GitHub · 2026-11-26 10:12 UTC · original
Withdrawn: shader translation is moving to the native C++ frontend (see #870), so we are not continuing this change to the Python translator. The branch stays available if any part is useful later. Thank you to everyone who reviewed and tested it.
Pull request closed