fix: Make sure right MoltenVK is loaded for macOS SDL.
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions

This commit is contained in:
squidbus 2025-04-22 23:18:39 -07:00
parent b1ebb2fec5
commit ee7fe305c9

View file

@ -223,6 +223,7 @@ vk::UniqueInstance CreateInstance(Frontend::WindowSystemType window_type, bool e
LOG_INFO(Render_Vulkan, "Creating vulkan instance");
#ifdef __APPLE__
#ifdef ENABLE_QT_GUI
// If the Vulkan loader exists in /usr/local/lib, give it priority. The Vulkan SDK
// installs it here by default but it is not in the default library search path.
// The loader has a clause to check for it, but at a lower priority than the bundled
@ -231,6 +232,10 @@ vk::UniqueInstance CreateInstance(Frontend::WindowSystemType window_type, bool e
static vk::detail::DynamicLoader dl = std::filesystem::exists(usr_local_path)
? vk::detail::DynamicLoader(usr_local_path)
: vk::detail::DynamicLoader();
#else
// TODO: Support layer loading in SDL build. For now just make sure we load the right MoltenVK.
static vk::detail::DynamicLoader dl("libMoltenVK.dylib");
#endif
#else
static vk::detail::DynamicLoader dl;
#endif