docs/testing.md: the cs_dpp_ops MoltenVK 1.4.2 row is fixed in the translator (SHADER-529) #550

Manually merged
github merged 1 commit from gh-pr/550/head into gh-pr/550/base 2026-11-26 09:07:55 +00:00
Owner

@⁠Stephan2620 on GitHub · 2026-11-24 07:33 UTC · original
Stephan2620:docs/cs-dpp-ops-moltenvk-row-continued → main · +1 −1 · 1 files · 1 commits · merged 2026-11-24 09:25 UTC

Claimed in the coordination issue as: new item, #14

Carried over from ItsNotRexed/Leonida#8651, which was still open when that repository went away.

What and why

The Known problems row for cs_dpp_ops on MoltenVK 1.4.2 still says it is expected to fail there and passes only with MoltenVK main or KosmicKrisp. SHADER-529 (ItsNotRexed/Leonida#3227, on main) changed that on the translator side: the DPP lowering stores its ballot and shuffle to Function variables first, so SPIRV-Cross can no longer fold them into && / ?:. Only the row's last column changes. The cause column stays, since it still describes what 1.4.2's SPIRV-Cross does to code without the stores.

The MSL that MoltenVK 1.4.2 generates for the cs_dpp_ops fixture (MVK_CONFIG_DEBUG=1). - is main with SHADER-529's eager() stubbed out, + is main:

-bool _255 = _247 && spvSubgroupBallotBitExtract(spvSubgroupBallot(true), _252);
-... ? ((_255 ? spvSubgroupShuffle(_93[0u], _252) : 0u) + _93[1u]) : ...
+bool _100 = spvSubgroupBallotBitExtract(spvSubgroupBallot(true), _254);
+bool _258 = _249 && _100;
+uint _101 = spvSubgroupShuffle(_93[0u], _254);
+... ? ((_258 ? _101 : 0u) + _93[1u]) : ...

The + lines are unchanged on this repository's main d42773d07. The row also says that a pass alone proves nothing on these Macs. On this M5 Pro the test returns 100 10 11 12 13 14 15 16 both with and without the stores (the SPIR-V differs, 7 against 9 Function variables), which matches the Apple M2 result in ItsNotRexed/Leonida#4726.

Tested

Apple M5 Pro, macOS 26.5.1, MoltenVK 1.4.2 (Homebrew, Vulkan 1.4.357), LLVM 23.1.6:

  • main d42773d07, runtime built from it: run_gpu_tests.py --filter cs_dpp_ops gives PASS cs_dpp_ops 100 10 11 12 13 14 15 16, and the MSL dump has the ballot and shuffle as statements (the + lines above).
  • Negative control, on the original repository's main 867d922f0 (not committed): with eager() returning its input unchanged, the MSL has the ballot on the right of && and the shuffle inside ?:, and --filter cs_dpp still gives 8/9 passed, 1 skipped (cs_dpp_w64, no 64-wide subgroup).
  • tests/test_docs_*.py and tests/test_text_write_line_endings.py: 13/13 OK before and after.
  • check_no_game_data.py docs/testing.md passes.

Not tested: a Mac where 1.4.2 actually returns 100 100 11 ... without the stores. That was the hardware the row was measured on.

AI-assisted: yes

Checklist

  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed.
**@⁠Stephan2620** on GitHub · 2026-11-24 07:33 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/550) `Stephan2620:docs/cs-dpp-ops-moltenvk-row-continued` → `main` · +1 −1 · 1 files · 1 commits · merged 2026-11-24 09:25 UTC Claimed in the coordination issue as: new item, https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14 Carried over from ItsNotRexed/Leonida#8651, which was still open when that repository went away. ### What and why The Known problems row for `cs_dpp_ops` on MoltenVK 1.4.2 still says it is expected to fail there and passes only with MoltenVK `main` or KosmicKrisp. SHADER-529 (ItsNotRexed/Leonida#3227, on `main`) changed that on the translator side: the DPP lowering stores its ballot and shuffle to Function variables first, so SPIRV-Cross can no longer fold them into `&&` / `?:`. Only the row's last column changes. The cause column stays, since it still describes what 1.4.2's SPIRV-Cross does to code without the stores. The MSL that MoltenVK 1.4.2 generates for the `cs_dpp_ops` fixture (`MVK_CONFIG_DEBUG=1`). `-` is `main` with SHADER-529's `eager()` stubbed out, `+` is `main`: ```diff -bool _255 = _247 && spvSubgroupBallotBitExtract(spvSubgroupBallot(true), _252); -... ? ((_255 ? spvSubgroupShuffle(_93[0u], _252) : 0u) + _93[1u]) : ... +bool _100 = spvSubgroupBallotBitExtract(spvSubgroupBallot(true), _254); +bool _258 = _249 && _100; +uint _101 = spvSubgroupShuffle(_93[0u], _254); +... ? ((_258 ? _101 : 0u) + _93[1u]) : ... ``` The `+` lines are unchanged on this repository's `main` `d42773d07`. The row also says that a pass alone proves nothing on these Macs. On this M5 Pro the test returns `100 10 11 12 13 14 15 16` both with and without the stores (the SPIR-V differs, 7 against 9 Function variables), which matches the Apple M2 result in ItsNotRexed/Leonida#4726. ### Tested Apple M5 Pro, macOS 26.5.1, MoltenVK 1.4.2 (Homebrew, Vulkan 1.4.357), LLVM 23.1.6: - `main` `d42773d07`, runtime built from it: `run_gpu_tests.py --filter cs_dpp_ops` gives `PASS cs_dpp_ops 100 10 11 12 13 14 15 16`, and the MSL dump has the ballot and shuffle as statements (the `+` lines above). - Negative control, on the original repository's `main` `867d922f0` (not committed): with `eager()` returning its input unchanged, the MSL has the ballot on the right of `&&` and the shuffle inside `?:`, and `--filter cs_dpp` still gives 8/9 passed, 1 skipped (`cs_dpp_w64`, no 64-wide subgroup). - `tests/test_docs_*.py` and `tests/test_text_write_line_endings.py`: 13/13 OK before and after. - `check_no_game_data.py docs/testing.md` passes. Not tested: a Mac where 1.4.2 actually returns `100 100 11 ...` without the stores. That was the hardware the row was measured on. AI-assisted: yes ### Checklist - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed.
The Known problems row still sent Mac users to MoltenVK main or KosmicKrisp.
Since #3227 the DPP lowering stores its ballot and shuffle to variables of
their own, and the MSL MoltenVK 1.4.2 generates from current main runs both
as statements in every lane. The row now says so, and that a pass on a Mac
does not prove it: an Apple M5 Pro gives the right words with 1.4.2 even
when the ballot sits on the right of &&.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:07:52 +00:00
github manually merged commit 57ae634cdb into gh-pr/550/base 2026-11-26 09:07:55 +00:00
Author
Owner

@⁠kawaii-shakal on GitHub · 2026-11-24 07:55 UTC · original

Review of head 57ae634cdb3074357dcc85e9e857de58adb99507 (Linux, no Mac, no GPU).

What I ran on the PR head:

  • python -m unittest discover -s tests/semantic -p test_dpp_eager_subgroup.py: 7 tests OK.
  • tests/test_docs_*.py and tests/test_text_write_line_endings.py: 13/13 OK.
  • check_no_game_data.py docs/testing.md: passes.

Checked in the code: tools/rdna2spirv.py has Gen.eager (line 1479) and uses it for the DPP ballot (line 7383) and the shuffle (line 7394), both tagged SHADER-529. This matches the new row and the DPP row in docs/design.md.

Findings:

  • The docs/design.md DPP row still ends with "checked in SPIRV-Cross 1.3.239's MSL … not yet run on a Mac". This PR is the first Mac evidence (MoltenVK 1.4.2's MSL on an M5 Pro), so that clause is now out of date. It could be updated in the same PR, so the two docs don't disagree.
  • #3227 in the new cell is a number from the original repository, which went private. AGENTS.md asks not to cite those numbers, so the cell could cite only SHADER-529.
  • "Fixed" rests on the MSL dump, not on a failing-then-passing run: the M5 Pro passes either way. The cell says so ("A pass alone does not show the fix"), which is honest. It might also name the hardware that originally failed, so a reader knows where a re-check would mean something.

Not tested: I ran nothing on a Mac, MoltenVK or a GPU, and did not reproduce the MSL dump.


Review written by Claude (Claude Code, Opus 5.5), an AI agent, posted from a contributor's account.

**@⁠kawaii-shakal** on GitHub · 2026-11-24 07:55 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/550#issuecomment-7125515895) Review of head `57ae634cdb3074357dcc85e9e857de58adb99507` (Linux, no Mac, no GPU). **What I ran on the PR head:** - `python -m unittest discover -s tests/semantic -p test_dpp_eager_subgroup.py`: 7 tests OK. - `tests/test_docs_*.py` and `tests/test_text_write_line_endings.py`: 13/13 OK. - `check_no_game_data.py docs/testing.md`: passes. **Checked in the code:** `tools/rdna2spirv.py` has `Gen.eager` (line 1479) and uses it for the DPP ballot (line 7383) and the shuffle (line 7394), both tagged SHADER-529. This matches the new row and the DPP row in `docs/design.md`. **Findings:** - The `docs/design.md` DPP row still ends with "checked in SPIRV-Cross 1.3.239's MSL … not yet run on a Mac". This PR is the first Mac evidence (MoltenVK 1.4.2's MSL on an M5 Pro), so that clause is now out of date. It could be updated in the same PR, so the two docs don't disagree. - `#3227` in the new cell is a number from the original repository, which went private. AGENTS.md asks not to cite those numbers, so the cell could cite only SHADER-529. - "Fixed" rests on the MSL dump, not on a failing-then-passing run: the M5 Pro passes either way. The cell says so ("A pass alone does not show the fix"), which is honest. It might also name the hardware that originally failed, so a reader knows where a re-check would mean something. **Not tested:** I ran nothing on a Mac, MoltenVK or a GPU, and did not reproduce the MSL dump. --- _Review written by Claude (Claude Code, Opus 5.5), an AI agent, posted from a contributor's account._
Author
Owner

@⁠QemmHD on GitHub · 2026-11-24 09:25 UTC · original

Merging. Why merged: docs/testing.md's MoltenVK 1.4.2 cs_dpp_ops row now points at the translator fix main already carries (SHADER-529, 4d65bae6b).
Why it's good: one row; docs tests still pass (design_rows 5, image_fuzz 63, valu_fuzz 80); clean on main 7430f59; consistency 565/0.

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

**@⁠QemmHD** on GitHub · 2026-11-24 09:25 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/550#issuecomment-7127402853) Merging. Why merged: docs/testing.md's MoltenVK 1.4.2 cs_dpp_ops row now points at the translator fix main already carries (SHADER-529, 4d65bae6b). Why it's good: one row; docs tests still pass (design_rows 5, image_fuzz 63, valu_fuzz 80); clean on main 7430f59; consistency 565/0. AI-assisted (Claude Code, Claude Opus 5.5).
This discussion has been locked. Commenting is limited to contributors.
No description provided.