From a308becb48939ef712a185db9acf2295da1663fd Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 27 Jul 2019 12:49:06 +0300 Subject: [PATCH] - pass NSView instance when creating macOS Vulkan surface MoltenVK allows passing a layer, although Vulkan specs prohibit this https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/VkMacOSSurfaceCreateInfoMVK.html This helps with testing of renderer using Vulkan Portability Implementation --- src/posix/cocoa/i_video.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/posix/cocoa/i_video.mm b/src/posix/cocoa/i_video.mm index a03cae46c8..d157c4b335 100644 --- a/src/posix/cocoa/i_video.mm +++ b/src/posix/cocoa/i_video.mm @@ -903,7 +903,7 @@ bool I_CreateVulkanSurface(VkInstance instance, VkSurfaceKHR *surface) windowCreateInfo.sType = VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK; windowCreateInfo.pNext = nullptr; windowCreateInfo.flags = 0; - windowCreateInfo.pView = [[CocoaVideo::GetWindow() contentView] layer]; + windowCreateInfo.pView = [CocoaVideo::GetWindow() contentView]; const VkResult result = vkCreateMacOSSurfaceMVK(instance, &windowCreateInfo, nullptr, surface); return result == VK_SUCCESS;