rdna2spirv: a computed value written to EXEC sets the lanes of its bits (SHADER-1264) #24
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!24
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/24/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?
@ddddddddwp on GitHub · 2026-11-24 01:59 UTC · original
ddddddddwp:fix/shader-1264-exec-computed→main· +13 −3 · 2 files · 1 commits · merged 2026-11-24 02:37 UTCItem:
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.
needs rebase(PR-CONFLICT-LABEL) #155@wavehs on GitHub · 2026-11-24 02:06 UTC · original
Independent verification on this branch as pushed (macOS 15 arm64, Apple M3 Pro, CPython 3.15.2, CPU only, no GPU or game files):
tests/semantic/test_exec_computed:Ran 2 tests ... OK(onmain@9ec34cdffboth fail,got [8192, 8192, ...]vswant [259, 1028, ...]; the fixtures'OLD_PREFIXassertion is what #15 documented).test_image_atomics_guard, which is unrelated to EXEC (its fix is #20, a stale-guard test; it fails the same 47 subtests with or without this change).So this closes the
semantic-testsjob apart from that one test file.@wavehs on GitHub · 2026-11-24 02:43 UTC · original
Confirmed on
mainafter the merge:python -I scripts/run_semantic_tests.py tests/semantic->463 files, 6075 tests, 0 files failed in 151 s. The translator suite has no red file left.