xrt: Add formats list to xrt_swapchain_create_info

This commit is contained in:
Simon Zeni 2023-11-17 21:29:20 -05:00 committed by Jakob Bornecrantz
parent b727aa9df7
commit 2571ef8d57
2 changed files with 12 additions and 0 deletions

View file

@ -814,6 +814,13 @@ struct xrt_swapchain_create_info
uint32_t face_count;
uint32_t array_size;
uint32_t mip_count;
/*
* List of formats that could be use when creating views of the swapchain images.
* See XR_KHR_vulkan_swapchain_format_list and VK_KHR_image_format_list
*/
uint32_t format_count;
uint32_t formats[XRT_MAX_SWAPCHAIN_CREATE_INFO_FORMAT_LIST_COUNT];
};
/*!

View file

@ -34,6 +34,11 @@
*/
#define XRT_MAX_SWAPCHAIN_FORMATS 16
/*!
* Max formats in the swapchain creation info formats list, artificial limit.
*/
#define XRT_MAX_SWAPCHAIN_CREATE_INFO_FORMAT_LIST_COUNT 8
/*!
* @}
*/