mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:10:52 +01:00
[PR #97] [CLOSED] rdna2spirv: redirect absent subgroup lanes before OpGroupNonUniformShuffle in ds_permute #149
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#149
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/97
Author: @Andretuta
Created: 11/24/2026
Status: ❌ Closed
Base:
main← Head:old-pr/9829📝 Commits (1)
1d9f451rdna2spirv: redirect absent subgroup lanes before OpGroupNonUniformShuffle in ds_permute📊 Changes
2 files changed (+38 additions, -4 deletions)
View changed files
📝
tests/semantic/test_ds_permute.py(+30 -0)📝
tools/rdna2spirv.py(+8 -4)📄 Description
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):In
Gen.ds_permute()(tools/rdna2spirv.py), the non-emulated subgroup path checked whether each source lane exists viaOpGroupNonUniformBallotBitExtract, but still passed the rawsrclane ID straight into bothOpGroupNonUniformShufflecalls. In a partial wave, shuffling from an absent invocation ID is undefined behavior in Vulkan/SPIR-V even if the result is masked afterward.Redirect absent source lanes to the current lane before both shuffles (
safe_src = OpSelect %uint {ex} {src} {self_lane}), matchingds_lane_read()right above it.Added a test in
tests/semantic/test_ds_permute.pychecking all 64 shuffles across wave32 compute, wave64 compute, and fragment shaders use a ballot-guarded lane ID, plus a partial-wave (7lanes in a 32-wide subgroup) execution check.Claimed in
#9235. AI-assisted; tested on Windows 11 / Python 3.12.10 withpython -I -m unittest discover -s tests/semantic -p "test_ds_permute.py" -v(7 OK),spirv_asm.assemble(),python -m compileall -q tools/rdna2spirv.py tests/semantic/test_ds_permute.py, andpython -I scripts/check_no_game_data.py tools/rdna2spirv.py tests/semantic/test_ds_permute.py(no game files).Reopened after mass PR cleanup (previously
#9257).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.