victory-gpu native tests fail cryptically without Apple's Metal Shader Converter; GPTK's bundled dylib is not a substitute #379

Closed
opened 2026-11-27 14:57:05 +00:00 by wz11wz · 5 comments
wz11wz commented 2026-11-27 14:57:05 +00:00 (Migrated from github.com)
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by wz11wz on 2026-11-27T14:57:05Z.


Environment

M1 Max, macOS 26 (Darwin 27.2), clean main (728845d1), no Metal Shader Converter installed.

What happens

cargo test -p victory-gpu --lib fails 3 native::tests::texture_tests cases on main:

  • a_drawn_target_is_not_filled_from_title_memory_again
  • an_indirect_dispatch_mesh_x_draws_the_groups_its_record_holds
  • described_rectangle_list_draw_uses_supplied_triangles

Two panic with no mesh pipeline (texture_tests.rs:1154 / 1207), one with the dlopen directly:

dlopen /usr/local/lib/libmetalirconverter.dylib: no such file

Why it is easy to miss

native-setup.sh warns when the Metal Shader Converter is missing, but nothing stops a test run without it: 356 of 359 tests still pass, and the 3 failures only name the missing dylib indirectly. They look like GPU bugs but are a missing prerequisite.

GPTK's bundled dylib is not a substitute

VICTORY_MSC_DYLIB is honoured by msc.rs, and D3DMetal 4.0b3 ships a libmetalirconverter.dylib inside its framework. Pointing VICTORY_MSC_DYLIB at that copy makes it dramatically worse: 129 of 359 fail (shader_tests included, e.g. render_pipelines_come_from_the_translated_shaders_and_the_streams_state). The converter ABI the code expects matches Apple's standalone distribution only.

Suggestion

verify.sh / native-setup.sh could fail fast with "install Apple's Metal Shader Converter" when VICTORY_MSC_DYLIB is unset and the default path is missing, instead of letting 3 tests fail with an indirect panic. Found while wiring victory-gpu into a verification gate (#370).

Happy to send that small check as a PR.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:issue:6648876682 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/379). Originally posted by [wz11wz](https://github.com/wz11wz) on 2026-11-27T14:57:05Z. --- ## Environment M1 Max, macOS 26 (Darwin 27.2), clean `main` (`728845d1`), no Metal Shader Converter installed. ## What happens `cargo test -p victory-gpu --lib` fails 3 `native::tests::texture_tests` cases on `main`: - `a_drawn_target_is_not_filled_from_title_memory_again` - `an_indirect_dispatch_mesh_x_draws_the_groups_its_record_holds` - `described_rectangle_list_draw_uses_supplied_triangles` Two panic with `no mesh pipeline` (texture_tests.rs:1154 / 1207), one with the dlopen directly: ``` dlopen /usr/local/lib/libmetalirconverter.dylib: no such file ``` ## Why it is easy to miss `native-setup.sh` warns when the Metal Shader Converter is missing, but nothing stops a test run without it: 356 of 359 tests still pass, and the 3 failures only name the missing dylib indirectly. They look like GPU bugs but are a missing prerequisite. ## GPTK's bundled dylib is not a substitute `VICTORY_MSC_DYLIB` is honoured by `msc.rs`, and D3DMetal 4.0b3 ships a `libmetalirconverter.dylib` inside its framework. Pointing `VICTORY_MSC_DYLIB` at that copy makes it dramatically worse: **129 of 359 fail** (shader_tests included, e.g. `render_pipelines_come_from_the_translated_shaders_and_the_streams_state`). The converter ABI the code expects matches Apple's standalone distribution only. ## Suggestion `verify.sh` / `native-setup.sh` could fail fast with "install Apple's Metal Shader Converter" when `VICTORY_MSC_DYLIB` is unset and the default path is missing, instead of letting 3 tests fail with an indirect panic. Found while wiring victory-gpu into a verification gate (#370). Happy to send that small check as a PR.
LakshanSivakumar commented 2026-11-27 15:07:33 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T15:07:33Z.


Please send it as a PR, thank you

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7221657242 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/379#issuecomment-7221657242). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T15:07:33Z. --- Please send it as a PR, thank you
AnastasisKon commented 2026-11-27 16:11:58 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-27T16:11:58Z.


/claim

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7222974696 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/379#issuecomment-7222974696). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-27T16:11:58Z. --- /claim
github-actions[bot] commented 2026-11-27 16:12:13 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-27T16:12:13Z.


Claimed by @AnastasisKon. Open a draft pull request with Refs #379 in its description within 24 hours, or the claim expires.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7222979920 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/379#issuecomment-7222979920). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-27T16:12:13Z. --- Claimed by @AnastasisKon. Open a draft pull request with `Refs #379` in its description within 24 hours, or the claim expires.
AnastasisKon commented 2026-11-27 22:18:20 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-27T22:18:20Z.


Evidence that this one is resolved on main, so it can close:

  • tools/macos/test-native.sh is on main and fails fast exactly as you asked, before cargo runs. With VICTORY_MSC_DYLIB=/nonexistent/x.dylib:

    fail: Metal Shader Converter not found at /nonexistent/x.dylib
          Download "Metal shader converter" from https://developer.apple.com/metal/shader-converter/
          and run its installer (free with an Apple ID), or point VICTORY_MSC_DYLIB at Apple's
          libmetalirconverter.dylib. A copy bundled with another tool is not a substitute (#379).
    

    and it exits 1 without invoking the test binary, so the dlopen panic it used to produce is gone.

  • tools/macos/verify.sh fails the same way (tools/macos/tests/verify-msc.sh and tests/msc-check.sh pin both, and run in the macos-scripts CI job).

  • With Apple's converter installed (I have it here now, /usr/local/lib/libmetalirconverter.dylib), test-native.sh -p victory-gpu runs the suite whole: 402 passed, 0 failed, 3 ignored. So the cryptic failure was the missing library, not the tests.

Nothing left to do in this issue as far as I can see; the only thing worth adding later is a note in docs/macos.md about the install, if you want the download steps written down outside the script.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7229211982 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/379#issuecomment-7229211982). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-27T22:18:20Z. --- Evidence that this one is resolved on main, so it can close: - `tools/macos/test-native.sh` is on `main` and fails fast exactly as you asked, before cargo runs. With `VICTORY_MSC_DYLIB=/nonexistent/x.dylib`: ``` fail: Metal Shader Converter not found at /nonexistent/x.dylib Download "Metal shader converter" from https://developer.apple.com/metal/shader-converter/ and run its installer (free with an Apple ID), or point VICTORY_MSC_DYLIB at Apple's libmetalirconverter.dylib. A copy bundled with another tool is not a substitute (#379). ``` and it exits 1 without invoking the test binary, so the `dlopen` panic it used to produce is gone. - `tools/macos/verify.sh` fails the same way (`tools/macos/tests/verify-msc.sh` and `tests/msc-check.sh` pin both, and run in the `macos-scripts` CI job). - With Apple's converter installed (I have it here now, `/usr/local/lib/libmetalirconverter.dylib`), `test-native.sh -p victory-gpu` runs the suite whole: 402 passed, 0 failed, 3 ignored. So the cryptic failure was the missing library, not the tests. Nothing left to do in this issue as far as I can see; the only thing worth adding later is a note in `docs/macos.md` about the install, if you want the download steps written down outside the script.
wz11wz commented 2026-11-27 23:14:53 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by wz11wz on 2026-11-27T23:14:53Z.


Resolved - thanks for the fast fail in test-native.sh/verify.sh and for confirming the full suite runs green (402 passed) once Apple's standalone converter is installed. The install steps are now written down too: #511. Closing as done.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7229990600 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/379#issuecomment-7229990600). Originally posted by [wz11wz](https://github.com/wz11wz) on 2026-11-27T23:14:53Z. --- Resolved - thanks for the fast fail in test-native.sh/verify.sh and for confirming the full suite runs green (402 passed) once Apple's standalone converter is installed. The install steps are now written down too: #511. Closing as done.
Sign in to join this conversation.
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
LakshanSivakumar/Native-Victory-macOS#379
No description provided.