diff --git a/Source/Core/VideoBackends/Vulkan/main.cpp b/Source/Core/VideoBackends/Vulkan/main.cpp index 80063ff844..4d6b1296ac 100644 --- a/Source/Core/VideoBackends/Vulkan/main.cpp +++ b/Source/Core/VideoBackends/Vulkan/main.cpp @@ -342,6 +342,10 @@ void VideoBackend::PrepareWindow(WindowSystemInfo& wsi) // layer.contentsScale = factor reinterpret_cast(objc_msgSend)(layer, sel_getUid("setContentsScale:"), factor); + + // Store the layer pointer, that way MoltenVK doesn't call [NSView layer] outside the main thread. + wsi.render_surface = layer; + // The Metal version included with MacOS 10.13 and below does not support several features we // require. Furthermore, the drivers seem to choke on our shaders (mainly Intel). So, we warn // the user that this is an unsupported configuration, but permit them to continue.