mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-22 04:20:05 +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")
|
set(MOLTENVK_TAR "${CMAKE_BINARY_DIR}/externals/MoltenVK.tar")
|
||||||
if (NOT EXISTS ${MOLTENVK_DIR})
|
if (NOT EXISTS ${MOLTENVK_DIR})
|
||||||
if (NOT EXISTS ${MOLTENVK_TAR})
|
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)
|
${MOLTENVK_TAR} SHOW_PROGRESS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -283,21 +283,10 @@ vk::UniqueInstance CreateInstance(const Common::DynamicLibrary& library,
|
|||||||
throw std::runtime_error("Failed to load Vulkan driver library");
|
throw std::runtime_error("Failed to load Vulkan driver library");
|
||||||
}
|
}
|
||||||
|
|
||||||
auto vkGetInstanceProcAddr =
|
const auto vkGetInstanceProcAddr =
|
||||||
library.GetSymbol<PFN_vkGetInstanceProcAddr>("vkGetInstanceProcAddr");
|
library.GetSymbol<PFN_vkGetInstanceProcAddr>("vkGetInstanceProcAddr");
|
||||||
if (!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");
|
throw std::runtime_error("Failed GetSymbol vkGetInstanceProcAddr");
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
VULKAN_HPP_DEFAULT_DISPATCHER.init(vkGetInstanceProcAddr);
|
VULKAN_HPP_DEFAULT_DISPATCHER.init(vkGetInstanceProcAddr);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user