mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:55:52 +01:00
[PR #1197] [MERGED] rdna2spirv: mesh shader pos1 misc export writes Layer and ViewportIndex per primitive (OLD-9893) #1229
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#1229
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/1197
Author: @ambroseautomation
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @aslan2142
Base:
main← Head:carry/old-9893-ms-pos1-layer-viewport📝 Commits (3)
c48cc23fix: mesh shader pos1 misc export writes Layer and ViewportIndex per primitive (rdna2spirv)2fc4224Merge commit 'b07b9ecb0' into HEADe950f85docs: contract row for mesh-shader Layer and ViewportIndex📊 Changes
3 files changed (+98 additions, -26 deletions)
View changed files
📝
docs/design.md(+1 -1)📝
tests/test_translate.py(+48 -0)📝
tools/rdna2spirv.py(+49 -25)📄 Description
Claimed in the coordination issue as: OLD-9893 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7142685828)
What and why
Carries forward
old-pr/9893(draft #162, original commit authortedin7preserved; indexed in #17), rebased cleanly onto currentmain.Implements per-primitive
LayerandViewportIndexmesh shader outputs fromexp pos1misc vector exports intools/rdna2spirv.py:OSG1declaresSV_RenderTargetArrayIndex(Layer) and/orSV_ViewportArrayIndex(ViewportIndex), decodesz[10:0](Layer) and(z >> 16) & 0xF(ViewportIndex) fromexp pos1into%ms_layer/%ms_viewportand writes them into per-primitive members of%ms_cull_blk(BuiltIn Layer,BuiltIn ViewportIndex,PerPrimitiveEXT), emittingOpCapability ShaderLayer/OpCapability ShaderViewportIndexand reportingshaderOutputLayer/shaderOutputViewportIndexin shader metadata.tests/test_translate.py:test_ms_misc_pos1_exports_layer_and_viewport_per_primitive,test_ms_misc_pos1_layer_only_has_no_viewport_member, andtest_ms_without_misc_outputs_keeps_plain_primitive_block.Tested
tests/test_translate.pyfunctions directly viardna2spirv.translateand verified SPIR-V binary assembly viaspirv_asm.assemble(nollvm-mc/spirv-valinstalled on host): 3/3 PASS.python -I scripts/run_semantic_tests.py tests/semantic: 470 files, 6,168 tests, 0 files failed.python -I scripts/check_no_game_data.py tools/rdna2spirv.py tests/test_translate.py: exit 0 (no game data).GPUs tested: n/a (CPU SPIR-V interpreter semantic suite + in-process
spirv_asmassembly on Windows 11 Pro 64-bit, Python 3.12.10)AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (extends existing mesh shaderpos1export lowering)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.