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

Closed
opened 2026-11-26 20:18:24 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/550
Author: @Stephan2620
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @QemmHD

Base: main ← Head: docs/cs-dpp-ops-moltenvk-row-continued


📝 Commits (1)

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

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 docs/testing.md (+1 -1)

📄 Description

Claimed in the coordination issue as: new item, https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7125098799

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.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/550 **Author:** [@Stephan2620](https://github.com/Stephan2620) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@QemmHD](https://github.com/QemmHD) **Base:** `main` ← **Head:** `docs/cs-dpp-ops-moltenvk-row-continued` --- ### 📝 Commits (1) - [`57ae634`](https://github.com/ubiquitarianism/leonida/commit/57ae634cdb3074357dcc85e9e857de58adb99507) docs/testing.md: the cs_dpp_ops MoltenVK 1.4.2 row is fixed in the translator (SHADER-529) ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `docs/testing.md` (+1 -1) </details> ### 📄 Description Claimed in the coordination issue as: new item, https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7125098799 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:18:24 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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.

Dependencies

No dependencies set

Reference
starred/leonida#595
No description provided.