Skip to content

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

Open
Stephan2620 wants to merge 1 commit into
ItsNotRexed:mainfrom
Stephan2620:docs/cs-dpp-ops-moltenvk-row
Open

Stephan2620 wants to merge 1 commit into
ItsNotRexed:mainfrom
Stephan2620:docs/cs-dpp-ops-moltenvk-row

Conversation

@Stephan2620

@Stephan2620 Stephan2620 commented Nov 23, 2026 •

Copy link
Copy Markdown

Claimed in the coordination issue as: new item, #8504 (comment)

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 (#3227, merged) 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 current main with SHADER-529's eager() stubbed out, + is current 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 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 #4726 on an M2 and the M5 Pro run in #166 that asked for a second pair of eyes on this row.

Tested

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

  • run_gpu_tests.py: 180/241 passed, 60 skipped, 1 failed (cs_fma_fused, word 7 reads 0x00000000, docs: cs_fma_fused reads 0 at word 7 on MoltenVK 1.4.2, not 0x3c00 #8183). With LEONIDA_W64_EMULATE=1: 210/241 passed, 30 skipped, the same single failure.
  • ctest: 64/64 passed.
  • run_gpu_tests.py --filter cs_dpp with eager() returning its input unchanged (negative control, not committed): 8/9 passed, 1 skipped (cs_dpp_w64, no 64-wide subgroup), the same as without the change.
  • tests/test_docs_*.py and tests/test_text_write_line_endings.py give the same results before and after. docs_cli_flags, docs_design_rows, docs_links and text_write_line_endings already fail on main for other files.
  • 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.

…anslator (SHADER-529)

The Known problems row still sent Mac users to MoltenVK main or KosmicKrisp.
Since ItsNotRexed#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 &&.

@Grimkeh Grimkeh left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent Linux docs review (0b55117d)

What changed: docs/testing.md marks the cs_dpp_ops MoltenVK 1.4.2 row as fixed in the translator (SHADER-529).

Checked:

  • One-line docs update.

Looks fine; no game files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants