From 2571ef8d57ca01c63beaf9e6976bd759614dd348 Mon Sep 17 00:00:00 2001 From: Simon Zeni Date: Fri, 17 Nov 2023 21:29:20 -0500 Subject: [PATCH] xrt: Add formats list to xrt_swapchain_create_info --- src/xrt/include/xrt/xrt_compositor.h | 7 +++++++ src/xrt/include/xrt/xrt_limits.h | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/src/xrt/include/xrt/xrt_compositor.h b/src/xrt/include/xrt/xrt_compositor.h index 6769e272b..543fc5a77 100644 --- a/src/xrt/include/xrt/xrt_compositor.h +++ b/src/xrt/include/xrt/xrt_compositor.h @@ -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]; }; /*! diff --git a/src/xrt/include/xrt/xrt_limits.h b/src/xrt/include/xrt/xrt_limits.h index 9c9cfbd6f..4b5d21477 100644 --- a/src/xrt/include/xrt/xrt_limits.h +++ b/src/xrt/include/xrt/xrt_limits.h @@ -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 + /*! * @} */