From 673b2afaa8e82e49c3817f42c270f36fa901c5a0 Mon Sep 17 00:00:00 2001 From: squidbus <175574877+squidbus@users.noreply.github.com> Date: Fri, 29 Aug 2025 18:29:34 -0700 Subject: [PATCH] vk_platform: Remove workaround to use Vulkan loader on macOS. (#3484) --- src/video_core/renderer_vulkan/vk_platform.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/video_core/renderer_vulkan/vk_platform.cpp b/src/video_core/renderer_vulkan/vk_platform.cpp index c49e62f4e..79f802cf6 100644 --- a/src/video_core/renderer_vulkan/vk_platform.cpp +++ b/src/video_core/renderer_vulkan/vk_platform.cpp @@ -226,8 +226,7 @@ vk::UniqueInstance CreateInstance(Frontend::WindowSystemType window_type, bool e bool enable_crash_diagnostic) { LOG_INFO(Render_Vulkan, "Creating vulkan instance"); -#ifdef __APPLE__ -#ifndef ENABLE_QT_GUI +#if defined(__APPLE__) && !defined(ENABLE_QT_GUI) // Initialize the environment with the path to the MoltenVK ICD, so that the loader will // find it. static const auto icd_path = [] { @@ -238,17 +237,8 @@ vk::UniqueInstance CreateInstance(Frontend::WindowSystemType window_type, bool e }(); setenv("VK_DRIVER_FILES", icd_path.c_str(), true); #endif - // 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 - // libMoltenVK.dylib, so we need to handle it ourselves to give it priority. - static const std::string usr_local_path = "/usr/local/lib/libvulkan.dylib"; - static vk::detail::DynamicLoader dl = std::filesystem::exists(usr_local_path) - ? vk::detail::DynamicLoader(usr_local_path) - : vk::detail::DynamicLoader(); -#else + static vk::detail::DynamicLoader dl; -#endif VULKAN_HPP_DEFAULT_DISPATCHER.init( dl.getProcAddress("vkGetInstanceProcAddr"));