mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:40:52 +01:00
[PR #1091] [MERGED] wave64_halves: a vote on a scalar compare under whole-quad EXEC is no lane vote (SHADER-W64-WQM-UVOTE) #1127
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1127
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1091
Author: @milk4sale
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @aslan2142
Base:
main← Head:shader-w64-wqm-uvote📝 Commits (3)
bc7143brdna2spirv: a wave64 VALU mask operand printed as one SGPR is the pair (SHADER-W64-SDST-PAIR)f034185wave64_halves: a vote on a scalar compare under whole-quad EXEC is no lane vote (SHADER-W64-WQM-UVOTE)6c5c079Merge main into shader-w64-wqm-uvote📊 Changes
8 files changed (+399 additions, -13 deletions)
View changed files
📝
docs/design.md(+2 -0)➕
runtime/test/shaders/ps_w64_a_wqm_uniform_vote.asm(+53 -0)📝
runtime/test/shaders/w64_graphics.py(+2 -0)➕
tests/semantic/test_wave64_halves_wqm_uvote.py(+188 -0)➕
tests/semantic/test_wave64_single_sdst.py(+87 -0)📝
tests/test_wave64_halves_fixtures.py(+1 -0)📝
tools/rdna2spirv.py(+26 -0)📝
tools/wave64_halves.py(+40 -13)📄 Description
Item: SHADER-W64-WQM-UVOTE
Depends on: #1021 (its commit is the first one in this branch; only the second is this change)
A pixel shader that needs derivatives starts with
s_wqm_b64 exec, exec. LLVM branches on wave-uniform conditions inside that region the way it does anywhere:v_cmp_* sNof scalars,s_and_b64 vcc, exec, s[N:N+1],s_cbranch_vccnz. SHADER-10 took that for no lane vote only while EXEC was the launch mask, so under the whole quads it was tier Cunsafe-vote-branch.Why it is exact
What stays tier C
s_wqm_b64: a half can be empty.s_wqm_b64 exec, execis modelled.v_readlane_b32, orv_readfirstlane_b32while EXEC is not the launch mask).Corpus (1.0.2.1, all 26,503,
wave64_halves.analyseon every wave64 VS/PS/GS)Baseline is #1021 on
main3ed8e50b7. Without #1021 the listings' one-register destinations hide the vote behindtainted-branch.452 pixel shaders go from C to A. No shader moves from A or B to C, and no vertex or geometry shader moves.
unsafe-vote-branch7,362 -> 6,861,tainted-exec5,829 -> 5,793,stale-scalar3,287 -> 3,254.Tested
tests/semantic/test_wave64_halves_wqm_uvote.py(new, 18 tests): the accepted forms in both printed forms of the destination, ten near misses that stay tier C, and a vertex and a pixel shader run on the wave interpreter as one wave of 64 lanes and as two of 32, equal and equal to the derived words. With #1021 alone 14 of them fail.ps_w64_a_wqm_uniform_votethroughruntime/test/shaders/w64_graphics.pyon an NVIDIA GeForce RTX 4070 Ti, Linux, driver 620.70.06, subgroup 32 only: the words its header derives. That device has one subgroup size, so the 64-lane image was not drawn, and the full-screen draw has no partly covered quad. It confirms the translated SPIR-V against the ISA reference, not native RDNA2 behaviour.python -I scripts/run_semantic_tests.py tests/semantic: 472 files, 6,186 tests, 0 files failed.tests/test_wave64_halves_fixtures.pyand thetest_w64_graphics*.pyfiles: 22 passed.Overlap
#805 edits the same lines of
uniform_cmpand the state dict. It handles EXEC after it is put back from whole quads; this handles the compare under them. They merge by hand; whichever lands second needs a rebase.No game data: counts and opcode names only. AI-assisted (Claude Code).
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.