mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:00:52 +01:00
[PR #24] [MERGED] rdna2spirv: a computed value written to EXEC sets the lanes of its bits (SHADER-1264) #78
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#78
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/24
Author: @ddddddddwp
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @ubiquitarianism
Base:
main← Head:fix/shader-1264-exec-computed📝 Commits (1)
1b15cd2rdna2spirv: a computed value written to EXEC sets the lanes of its bits (SHADER-1264)📊 Changes
2 files changed (+13 additions, -3 deletions)
View changed files
📝
docs/design.md(+1 -1)📝
tools/rdna2spirv.py(+12 -2)📄 Description
Item:
SHADER-1264(claimed in #14).What
s_lshl_b32 exec_lo, 1, s5ran all 32 lanes of that half instead of lane 3. The generic SALU destinationpath (
Gen.dst) wrote a computed 32-bit value to EXEC throughset_exec/exec_half_write, which test thevalue for non-zero. A computed value is not a lane mask: lane L takes bit L of it.
Gen.exec_bittakes that bit, andGen.dstuses it for the wave32exec/exec_lowrites and the wave64exec_lo/exec_hiwrites. The other paths into EXEC already pass a per-lane mask or bit (mask_dst,put_mask,exec_half_write's constant form,s_mov_b32'smask_src, and the saveexec/wrexec forms) and areunchanged; a value that already holds this lane's bit of a mask (0 or ~0) gives the same answer under bit
extraction, so no caller has to say which it has.
Tests
python -I -m unittest discover -s tests/semantic -p 'test_exec_computed.py'- 2 tests, pass; both failbefore the change (
8192 8192 8192instead of259 1028 3088).python -I scripts/run_semantic_tests.py tests/semantic -j 6- 463 files, 6075 tests:test_exec_computedgoes green. The three files that still fail are the same before and after:
test_image_atomics_guard(aseparate stale test, listed in #14) and
test_sopc_validation/test_unary_f16_validation, which needspirv-as/spirv-valon PATH and skip in this environment.python -I -m unittest discover -s tests/semantic -p 'test_salu_b32_lane_masks.py'- 9 tests, pass (thewave64 EXEC paths, including
s_bitreplicate_b64_b32 exec, which already pass a per-lane bit).Environment: macOS arm64, Python 3.14, no GPU. The expected words are the ones already recorded in
runtime/test/shaders/cs_w32_exec_computed.asmandcs_w64_exec_computed.asm(measured on an RTX 5070) andreplayed through the CPU interpreter; I have not re-measured them on hardware.
Docs
docs/design.md's constant-lane-masks row records the rule and how it was confirmed.AI-assisted. Nothing here quotes game files, extracted assets or generated shaders.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.