Log which shader converter was loaded (#295) #300

Manually merged
github merged 1 commit from gh-pr/300/head into gh-pr/300/base 2026-11-27 10:37:34 +00:00
Owner

@⁠m0rff on GitHub · 2026-11-27 09:34 UTC · original
m0rff:m0rff/log-msc-converter → main · +62 −2 · 2 files · 1 commits · merged 2026-11-27 10:37 UTC

Refs #295

The reporter's suggestion only: the start-up log now names the converter it loaded and where the path came from, and warns when it is not Apple's default.

  • metal: shader converter <path> <size> <mtime> (from VICTORY_MSC_DYLIB | the installed default), logged once per run (msc::try_open_default).
  • A warning when the path is not /usr/local/lib/libmetalirconverter.dylib. The variable set to the default path itself is not warned about. An empty VICTORY_MSC_DYLIB now counts as unset, as it already did in native-setup.sh.
  • No version is logged. The library does not expose one: its Mach-O current version is 0.0.0, and the C API has no version call. (There is an undocumented C++ symbol IRCompilerGetBinaryVersion(unsigned char*), but its buffer size and format are unknown, so it is not called.)
  • This does not try to fix the missing art.

Does the shader cache key tell converters apart? Yes. The Msc id (path, file size, modification time) is part of every library cache key (convert_with and mesh_threads), so a different converter path, or a replaced file at the same path, gets its own cache entries. Nothing changed there.

Tests: msc::tests::the_converter_path_is_the_override_if_set_else_the_default, msc::tests::the_load_note_names_its_source_and_warns_only_off_the_default_path. Docs: docs/native-host.md, next to the shader cache's library keys.

**@⁠m0rff** on GitHub · 2026-11-27 09:34 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/300) `m0rff:m0rff/log-msc-converter` → `main` · +62 −2 · 2 files · 1 commits · merged 2026-11-27 10:37 UTC Refs #295 The reporter's suggestion only: the start-up log now names the converter it loaded and where the path came from, and warns when it is not Apple's default. - `metal: shader converter <path> <size> <mtime> (from VICTORY_MSC_DYLIB | the installed default)`, logged once per run (`msc::try_open_default`). - A warning when the path is not `/usr/local/lib/libmetalirconverter.dylib`. The variable set to the default path itself is not warned about. An empty `VICTORY_MSC_DYLIB` now counts as unset, as it already did in `native-setup.sh`. - **No version is logged.** The library does not expose one: its Mach-O current version is 0.0.0, and the C API has no version call. (There is an undocumented C++ symbol `IRCompilerGetBinaryVersion(unsigned char*)`, but its buffer size and format are unknown, so it is not called.) - This does not try to fix the missing art. **Does the shader cache key tell converters apart?** Yes. The `Msc` id (path, file size, modification time) is part of every library cache key (`convert_with` and `mesh_threads`), so a different converter path, or a replaced file at the same path, gets its own cache entries. Nothing changed there. Tests: `msc::tests::the_converter_path_is_the_override_if_set_else_the_default`, `msc::tests::the_load_note_names_its_source_and_warns_only_off_the_default_path`. Docs: `docs/native-host.md`, next to the shader cache's library keys.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 10:37:30 +00:00
github manually merged commit 61f6ce2b1e into gh-pr/300/base 2026-11-27 10:37:34 +00:00
Author
Owner

@⁠LakshanSivakumar on GitHub · 2026-11-27 10:37 UTC · original

Thank you. Merged.

**@⁠LakshanSivakumar** on GitHub · 2026-11-27 10:37 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/300#issuecomment-7216114213) Thank you. Merged.
This discussion has been locked. Commenting is limited to contributors.
No description provided.