mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:50:52 +01:00
[PR #1994] rdna2spirv: extract per-lane bits for non-mask special sources in s_mov_b32 exec_hi (SHADER-EXEC-HI-SPECIAL-SRC) #2003
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#2003
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/1994
Author: @ShotTechOp
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:fix/exec-hi-special-bits📝 Commits (1)
37d433crdna2spirv: extract per-lane bits for non-mask special sources in s_mov_b32 exec_hi📊 Changes
3 files changed (+148 additions, -4 deletions)
View changed files
📝
docs/design.md(+1 -1)➕
tests/semantic/test_exec_hi_special_src.py(+142 -0)📝
tools/rdna2spirv.py(+5 -3)📄 Description
Claimed in #1608 as
SHADER-EXEC-HI-SPECIAL-SRC.What and why
tools/rdna2spirv.py,s_mov_b32 exec_lo, <special>falls through toGen.dst->Gen.exec_bit, which extracts bit(lane & 31)for every non-mask source (m0,scc/src_scc, plain-datavcc_lo/vcc_hi, etc.).s_mov_b32 exec_hi, <src>branch only extracted per-lane bits whensrc["k"] == "sgpr"and otherwise passed rawself.src_u(src)straight intoGen.exec_half_write(1, val, None). Becauseexec_half_writetestsval != 0, any non-zero bit inm0,src_scc, or plain-datavcc_lo/vcc_hisilently activated all 32 upper lanes (32..63) instead of only the lanes whose bits were set.self.exec_bit(self.src_u(src))while keeping lane-mask sources (self.holds_lane_mask(src)) onself.src_u(src)bringsexec_hiinto parity withexec_loand hardware (both native wave64 and--wave64-emulate).Constant lane masks/SHADER-1264contract row indocs/design.md.Testing
tests/semantic/test_exec_hi_special_src.py— testss_mov_b32 exec_hifromm0, plain-datavcc_lo, plain-datavcc_hi(native wave64 and--wave64-emulate),src_scc(0and1), and a lane-maskvcc_hicontrol while confirmingexec_lois preserved.origin/main(fd33a31):tests/semantic/test_exec_hi_special_src.pyfails onorigin/main(provingm0, plain-datavcc_lo/vcc_hi, andsrc_scc = 1turn on all 32 upper lanes instead of the set bits).python -I tests/semantic/test_exec_hi_special_src.py -vpython -m unittest discover -s tests/semantic -p test_exec_computed.pypython -m unittest discover -s tests/semantic -p test_wave64_mov_b32_cross_half.pypython -m unittest discover -s tests -p "test_docs_*.py"python -I tests/test_text_write_line_endings.pypython -m compileall -q tools/rdna2spirv.py tests/semantic/test_exec_hi_special_src.pypython -I scripts/check_no_game_data.py tools/rdna2spirv.py docs/design.md tests/semantic/test_exec_hi_special_src.py🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.