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

Closed
github-bot wants to merge 2 commits from gh-pr/189/head into gh-pr/189/base
Owner

@⁠Andretuta on GitHub · 2026-11-24 02:38 UTC · original
ubiquitarianism:old-pr/9921 → main · +190 −61 · 2 files · 2 commits · closed without merging

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.

**@⁠Andretuta** on GitHub · 2026-11-24 02:38 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/189) `ubiquitarianism:old-pr/9921` → `main` · +190 −61 · 2 files · 2 commits · closed without merging > 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:48:06 +00:00
github-bot closed this pull request 2026-11-26 08:48:06 +00:00
Author
Owner

@⁠aslan2142 on GitHub · 2026-11-25 19:09 UTC · original

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).

**@⁠aslan2142** on GitHub · 2026-11-25 19:09 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/189#issuecomment-7171903531) 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

This discussion has been locked. Commenting is limited to contributors.
No description provided.