rdna2spirv: mesh shader compressed exports unpack their fp16 pairs instead of failing translation #189

Closed
Andretuta wants to merge 2 commits from upstream-pr/189 into main
Andretuta commented 2026-11-24 02:38:35 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Andretuta on 2026-11-24T02:38:35Z.


Carried over from old PR 9921 by tedin7 in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/9921, exactly that PR's last commit. All carried-over PRs are listed in #17.
Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it.
tedin7: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one.


Original description (mentions and #N references are disabled; the numbers refer to the old repository):

What

A mesh shader's compressed export (exp pos1 ... compr for clip/cull distances, exp param N ... compr) now unpacks its two fp16 pairs (UnpackHalf2x16 on registers 0 and 2 of the operand list) instead of raising Unsupported("mesh compressed export"), which dropped the whole shader. Uses the existing export_comps helper that the pixel-shader path already uses.

Why

A mesh shader containing one compressed export failed to translate, so its pipeline (PSO) was never built and the draw did not render.

Stacked on #9893

This branch contains the #9893 commit (mesh pos1 Layer/ViewportIndex) because both change Gen.ms_export and conflict; the conflict was resolved by keeping both (misc pos1 check first, then the compressed path). Only the top commit is new here. Rebase after #9893 merges.

Tested

  • python3 -m pytest tests/test_translate.py: 670 passed (73 s), including 4 new tests: pos1 compressed clip unpack, an off register writes nothing, compressed param unpack, uncompressed exports do not unpack halves.
  • Negative control: with tools/rdna2spirv.py from the #9893 base, 3 of the 4 new tests fail (the uncompressed guard passes on both).
  • Not run: GPU/lavapipe validation (pods are off); tests assert on the generated SPIR-V.

Rebased cleanly on current main; conflicts only with #9893, resolved as above.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5465043350 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/189). Originally posted by [Andretuta](https://github.com/Andretuta) on 2026-11-24T02:38:35Z. --- > Carried over from **old PR 9921** by `tedin7` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/9921`, exactly that PR's last commit. All carried-over PRs are listed in #17. > Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it. > `tedin7`: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one. --- Original description (mentions and `#N` references are disabled; the numbers refer to the old repository): ## What A mesh shader's compressed export (`exp pos1 ... compr` for clip/cull distances, `exp param N ... compr`) now unpacks its two fp16 pairs (UnpackHalf2x16 on registers 0 and 2 of the operand list) instead of raising `Unsupported("mesh compressed export")`, which dropped the whole shader. Uses the existing `export_comps` helper that the pixel-shader path already uses. ## Why A mesh shader containing one compressed export failed to translate, so its pipeline (PSO) was never built and the draw did not render. ## Stacked on `#9893` This branch contains the `#9893` commit (mesh pos1 Layer/ViewportIndex) because both change `Gen.ms_export` and conflict; the conflict was resolved by keeping both (misc pos1 check first, then the compressed path). Only the top commit is new here. Rebase after `#9893` merges. ## Tested - `python3 -m pytest tests/test_translate.py`: 670 passed (73 s), including 4 new tests: pos1 compressed clip unpack, an off register writes nothing, compressed param unpack, uncompressed exports do not unpack halves. - Negative control: with `tools/rdna2spirv.py` from the `#9893` base, 3 of the 4 new tests fail (the uncompressed guard passes on both). - Not run: GPU/lavapipe validation (pods are off); tests assert on the generated SPIR-V. Rebased cleanly on current main; conflicts only with `#9893`, resolved as above.
aslan2142 commented 2026-11-25 19:09:49 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-25T19:09:49Z.


Closing: everything this pull request changes is already in main. Merging it into main (490f5b9ec) leaves every file as it is. The same change landed with #1197 and #1203.

Thanks for the work! If something here is still missing from main, open a new pull request with what's left.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7171903531 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/189#issuecomment-7171903531). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-11-25T19:09:49Z. --- Closing: everything this pull request changes is already in `main`. Merging it into `main` (`490f5b9ec`) leaves every file as it is. The same change landed with #1197 and #1203. Thanks for the work! If something here is still missing from `main`, open a new pull request with what's left. AI-assisted (Claude Code, Claude Opus 5.5).

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!189
No description provided.