- 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
This commit is contained in:
alexey.lysiuk 2019-07-27 12:49:06 +03:00
parent 8219c3fd07
commit a308becb48
1 changed files with 1 additions and 1 deletions

View File

@ -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;