mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-11-21 15:42:46 +00:00
renderer_vulkan: Revert vkGetInstanceProcAddr symbol change for MoltenVK. (#7341)
This commit is contained in:
parent
19d5695aa3
commit
37f0a7484f
|
@ -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()
|
||||
|
||||
|
|
|
@ -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<PFN_vkGetInstanceProcAddr>("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<PFN_vkGetInstanceProcAddr>("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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue