mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:05:53 +01:00
[PR #267] fix: lower wide and strided geometry shader LDS accesses #319
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#319
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/267
Author: @Andretuta
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:old-pr/9996📝 Commits (1)
167df27fix: 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
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):What
Legacy geometry shaders on LDS rings can now use
ds_write_b96,ds_write_b128,ds_read2st64_b32andds_write2st64_b32. Before, the geometry-shader LDS path (gs_ds) accepted only b32/b64/read2_b32/write2_b32 and raisedUnsupportedfor the rest.lds_pair_byte_offsets,LDS_WORDS). On reads, one unit advances one synthetic ES input vertex at a fixed component. Writes address the flat staged output slots.Why
The geometry shaders in the corpus are
$GS_VoxelizeGenericpermutations on LDS rings. A GS that hits one of these four forms fails translation, so its pipeline cannot be built (PSO / 3D rendering blocked).Tested
pytest tests/test_gs_ds_ring.py: 4 passed (read2st64, write96, write128, write2st64: translate plus spirv-val, entry point Geometry), 1 skipped.tools/rdna2spirv.pyrestored to origin/main (tests kept), all 4 fail withUnsupported; with the fix they pass.test_geometry_lds_rasterization(the vk_harness readback) is skipped because it needs a builtvk_harness, and no GPU pod or local Windows build was available. So the vertex mapping is checked by translation and validation only, not by a pixel readback.pytest tests/semantic -k 'lds or ds_ or write2 or read2': 621 passed, 3 skipped, 4494 subtests passed (covers the compute LDS path that now shares the offset helper).Rebased cleanly on current main (cherry-pick, no conflicts). Coordination: https://github.com/ProjectLeonida/Leonida/issues/9677
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.