Skip to content

Commit ee7fe30

Browse files
committed
fix: Make sure right MoltenVK is loaded for macOS SDL.
1 parent b1ebb2f commit ee7fe30

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/video_core/renderer_vulkan/vk_platform.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ vk::UniqueInstance CreateInstance(Frontend::WindowSystemType window_type, bool e
223223
LOG_INFO(Render_Vulkan, "Creating vulkan instance");
224224

225225
#ifdef __APPLE__
226+
#ifdef ENABLE_QT_GUI
226227
// If the Vulkan loader exists in /usr/local/lib, give it priority. The Vulkan SDK
227228
// installs it here by default but it is not in the default library search path.
228229
// 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
231232
static vk::detail::DynamicLoader dl = std::filesystem::exists(usr_local_path)
232233
? vk::detail::DynamicLoader(usr_local_path)
233234
: vk::detail::DynamicLoader();
235+
#else
236+
// TODO: Support layer loading in SDL build. For now just make sure we load the right MoltenVK.
237+
static vk::detail::DynamicLoader dl("libMoltenVK.dylib");
238+
#endif
234239
#else
235240
static vk::detail::DynamicLoader dl;
236241
#endif

0 commit comments

Comments
 (0)