renderer_vulkan: Revert vkGetInstanceProcAddr symbol change for MoltenVK. (#7341)
This commit is contained in:
parent
19d5695aa3
commit
37f0a7484f
2 changed files with 2 additions and 13 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue