aux/vk: Fix creation of Windows external memory backed image.

This commit is contained in:
Ryan Pavlik 2021-04-02 17:29:55 -05:00
parent e5a77ea80d
commit 607eae4fdd

View file

@ -155,8 +155,12 @@ create_image(struct vk_bundle *vk, const struct xrt_swapchain_create_info *info,
.sType = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR,
#if defined(XRT_GRAPHICS_BUFFER_HANDLE_IS_AHARDWAREBUFFER)
.handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID,
#else
#elif defined(XRT_GRAPHICS_BUFFER_HANDLE_IS_WIN32_HANDLE)
.handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR,
#elif defined(XRT_GRAPHICS_BUFFER_HANDLE_IS_FD)
.handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR,
#else
#error "need port"
#endif
};
@ -231,7 +235,7 @@ create_image(struct vk_bundle *vk, const struct xrt_swapchain_create_info *info,
VkExportMemoryAllocateInfo export_alloc_info = {
.sType = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR,
.pNext = &dedicated_memory_info,
.handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT,
.handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR,
};
#else