summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2020-04-07 18:49:40 +1000
committerStenzek <stenzek@gmail.com>2020-04-07 18:56:55 +1000
commita2f4fafe86b8407ecbe1228257ab993fd2c1b815 (patch)
tree1c26191fd452ff8dd74a9cb230e912cd8861fb9d /Source/Core/VideoBackends/Vulkan/VulkanContext.cpp
parent52d47566791672309ba984b22dd420168e88beb3 (diff)
Vulkan: Switch from vkCreateMacOSSurfaceMVK() to vkCreateMetalSurfaceEXT()
Since we are calling this off the UI thread, we can't use anything which accesses the underlying NSView object. We create and set the Metal layer on the UI thread before the video backend is initialized. This extension is both compatible with MoltenVK and gfx-portability for accepting a layer at surface creation.
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/VulkanContext.cpp')
-rw-r--r--Source/Core/VideoBackends/Vulkan/VulkanContext.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp b/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp
index 4feb4a85b2..c0fca1008c 100644
--- a/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp
+++ b/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp
@@ -211,8 +211,8 @@ bool VulkanContext::SelectInstanceExtensions(std::vector<const char*>* extension
return false;
}
#endif
-#if defined(VK_USE_PLATFORM_MACOS_MVK)
- if (wstype == WindowSystemType::MacOS && !AddExtension(VK_MVK_MACOS_SURFACE_EXTENSION_NAME, true))
+#if defined(VK_USE_PLATFORM_METAL_EXT)
+ if (wstype == WindowSystemType::MacOS && !AddExtension(VK_EXT_METAL_SURFACE_EXTENSION_NAME, true))
{
return false;
}