mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Vulkan: Support macOS via MoltenVK
The path to the MoltenVK library can be specified by the LIBMOLTENVK_PATH environment variable, otherwise it assumes it is located in the application bundle's Contents/MacOS directory.
This commit is contained in:
@ -186,6 +186,9 @@ bool VulkanContext::SelectInstanceExtensions(ExtensionList* extension_list, bool
|
||||
#elif defined(VK_USE_PLATFORM_ANDROID_KHR)
|
||||
if (enable_surface && !SupportsExtension(VK_KHR_ANDROID_SURFACE_EXTENSION_NAME, true))
|
||||
return false;
|
||||
#elif defined(VK_USE_PLATFORM_MACOS_MVK)
|
||||
if (enable_surface && !SupportsExtension(VK_MVK_MACOS_SURFACE_EXTENSION_NAME, true))
|
||||
return false;
|
||||
#endif
|
||||
|
||||
// VK_EXT_debug_report
|
||||
@ -833,6 +836,13 @@ void VulkanContext::InitDriverDetails()
|
||||
driver = DriverDetails::DRIVER_UNKNOWN;
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
// Vulkan on macOS goes through Metal, and is not susceptible to the same bugs
|
||||
// as the vendor's native Vulkan drivers. We use a different driver fields to
|
||||
// differentiate MoltenVK.
|
||||
driver = DriverDetails::DRIVER_PORTABILITY;
|
||||
#endif
|
||||
|
||||
DriverDetails::Init(DriverDetails::API_VULKAN, vendor, driver,
|
||||
static_cast<double>(m_device_properties.driverVersion),
|
||||
DriverDetails::Family::UNKNOWN);
|
||||
|
Reference in New Issue
Block a user