mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:55:52 +01:00
[PR #1761] OLD-9996: rdna2spirv: lower wide and strided geometry shader LDS accesses #1774
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#1774
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/1761
Author: @potatoe0100
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:carry/old-9996📝 Commits (1)
ed94596fix: lower wide and strided geometry shader LDS accesses📊 Changes
4 files changed (+138 additions, -18 deletions)
View changed files
📝
docs/design.md(+1 -0)➕
tests/semantic/fixtures/gs_ds_ring.asm(+30 -0)➕
tests/test_gs_ds_ring.py(+77 -0)📝
tools/rdna2spirv.py(+30 -18)📄 Description
Claimed in the coordination issue as: OLD-9996 (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7161271395)
What and why
Carries on old PR 9996 by @tedin7 (draft #267, branch
old-pr/9996, listed in #17), rebased on currentmainwith the author's commit kept.The legacy (merged ES/GS) geometry shader path in
Gen.gs_dsonly knewds_read_b32/b64/b96/b128,ds_read2_b32,ds_write_b32/b64andds_write2_b32. A GS that stages its output withds_write_b96/ds_write_b128, or walks ES input vertices / output slots with the 64-dword stride formsds_read2st64_b32/ds_write2st64_b32, raisedUnsupported. This adds them: wide writes stage 3 or 4 consecutive output dwords from consecutive VGPRs; st64 offsets count 64-dword units, so on reads one unit advances one synthetic ES input vertex and on writes they address the flat staged output slots. The byte-offset arithmetic for read2/write2 is shared with the compute LDS path through a smalllds_pair_byte_offsetshelper (no behaviour change there). The rule is added to the contract table indocs/design.md.Rebase note: one conflict in
tools/rdna2spirv.py, wheremainaddedds_appendnext to the new helper; both are kept unchanged.Tested
python -m pytest tests/test_gs_ds_ring.py: 4 passed (translation + spirv-val of each new form), 1 skipped (the Vulkan readback needsLEONIDA_VK_HARNESS). Withmain'stools/rdna2spirv.pythe same 4 tests fail withUnsupported, so they cover the change.python -I scripts/run_semantic_tests.py tests/semantic: 488 files, 6,287 tests; 6,286 pass on this branch and onmainalike. The one failure,test_int32_to_f64.test_constant_folded_mrt_words, is the distrospirv-opt(SPIRV-Tools 2025.1) crashing with SIGSEGV, identical onmain.GPUs tested: n/a (the
test_geometry_lds_rasterizationreadback is not run yet; a GPU result can follow)AI-assisted: yes (Claude rebased and tested; the change is tedin7's)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.