From 37f0a7484f52bf75b9efa11cf92602c54d7480ba Mon Sep 17 00:00:00 2001 From: Steveice10 <1269164+Steveice10@users.noreply.github.com> Date: Fri, 12 Jan 2024 09:16:04 -0800 Subject: [PATCH] renderer_vulkan: Revert vkGetInstanceProcAddr symbol change for MoltenVK. (#7341) --- CMakeModules/DownloadExternals.cmake | 2 +- src/video_core/renderer_vulkan/vk_platform.cpp | 13 +------------ 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/CMakeModules/DownloadExternals.cmake b/CMakeModules/DownloadExternals.cmake index d242dea6b..19b8f477c 100644 --- a/CMakeModules/DownloadExternals.cmake +++ b/CMakeModules/DownloadExternals.cmake @@ -121,7 +121,7 @@ function(download_moltenvk) set(MOLTENVK_TAR "${CMAKE_BINARY_DIR}/externals/MoltenVK.tar") if (NOT EXISTS ${MOLTENVK_DIR}) if (NOT EXISTS ${MOLTENVK_TAR}) - file(DOWNLOAD https://github.com/KhronosGroup/MoltenVK/releases/download/v1.2.7-rc1/MoltenVK-all.tar + file(DOWNLOAD https://github.com/KhronosGroup/MoltenVK/releases/download/v1.2.7-rc2/MoltenVK-all.tar ${MOLTENVK_TAR} SHOW_PROGRESS) endif() diff --git a/src/video_core/renderer_vulkan/vk_platform.cpp b/src/video_core/renderer_vulkan/vk_platform.cpp index c5a084c42..2b415354f 100644 --- a/src/video_core/renderer_vulkan/vk_platform.cpp +++ b/src/video_core/renderer_vulkan/vk_platform.cpp @@ -283,21 +283,10 @@ vk::UniqueInstance CreateInstance(const Common::DynamicLibrary& library, throw std::runtime_error("Failed to load Vulkan driver library"); } - auto vkGetInstanceProcAddr = + const auto vkGetInstanceProcAddr = library.GetSymbol("vkGetInstanceProcAddr"); if (!vkGetInstanceProcAddr) { -#ifdef __APPLE__ - // MoltenVK now hides most Vulkan symbols by default to avoid clashes, - // so we may need to use the ICD hook instead. - vkGetInstanceProcAddr = - library.GetSymbol("vk_icdGetInstanceProcAddr"); - if (!vkGetInstanceProcAddr) { - throw std::runtime_error( - "Failed GetSymbol vkGetInstanceProcAddr or vk_icdGetInstanceProcAddr"); - } -#else throw std::runtime_error("Failed GetSymbol vkGetInstanceProcAddr"); -#endif } VULKAN_HPP_DEFAULT_DISPATCHER.init(vkGetInstanceProcAddr);