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.
This commit is contained in:
Stenzek
2020-04-07 18:49:40 +10:00
parent 52d4756679
commit a2f4fafe86
5 changed files with 14 additions and 13 deletions

View File

@ -19,7 +19,7 @@
#endif
#if defined(__APPLE__)
#define VK_USE_PLATFORM_MACOS_MVK
#define VK_USE_PLATFORM_METAL_EXT
#endif
#include "vulkan/vulkan.h"