From bec9a30bfe95668420eb0c40828e574db0c88d71 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Tue, 4 Apr 2023 13:29:05 +0100 Subject: [PATCH] xrt: Re-order compositor header for better grouping [NFC] --- src/xrt/include/xrt/xrt_compositor.h | 78 ++++++++++++++++------------ 1 file changed, 46 insertions(+), 32 deletions(-) diff --git a/src/xrt/include/xrt/xrt_compositor.h b/src/xrt/include/xrt/xrt_compositor.h index 18806c2d9..e9d98a6fb 100644 --- a/src/xrt/include/xrt/xrt_compositor.h +++ b/src/xrt/include/xrt/xrt_compositor.h @@ -61,40 +61,12 @@ typedef uint64_t VkDeviceMemory; * @{ */ -/*! - * Special flags for creating swapchain images. - */ -enum xrt_swapchain_create_flags -{ - //! Our compositor just ignores this bit. - XRT_SWAPCHAIN_CREATE_PROTECTED_CONTENT = (1u << 0u), - //! Signals that the allocator should only allocate one image. - XRT_SWAPCHAIN_CREATE_STATIC_IMAGE = (1u << 1u), -}; -/*! - * Usage of the swapchain images. +/* + * + * Layers. + * */ -enum xrt_swapchain_usage_bits -{ - XRT_SWAPCHAIN_USAGE_COLOR = 0x00000001, - XRT_SWAPCHAIN_USAGE_DEPTH_STENCIL = 0x00000002, - XRT_SWAPCHAIN_USAGE_UNORDERED_ACCESS = 0x00000004, - XRT_SWAPCHAIN_USAGE_TRANSFER_SRC = 0x00000008, - XRT_SWAPCHAIN_USAGE_TRANSFER_DST = 0x00000010, - XRT_SWAPCHAIN_USAGE_SAMPLED = 0x00000020, - XRT_SWAPCHAIN_USAGE_MUTABLE_FORMAT = 0x00000040, - XRT_SWAPCHAIN_USAGE_INPUT_ATTACHMENT = 0x00000080, -}; - -/*! - * View type to be rendered to by the compositor. - */ -enum xrt_view_type -{ - XRT_VIEW_TYPE_MONO = 1, - XRT_VIEW_TYPE_STEREO = 2, -}; /*! * Layer type. @@ -362,6 +334,39 @@ struct xrt_layer_data }; }; + +/* + * + * Swapchain. + * + */ + +/*! + * Special flags for creating swapchain images. + */ +enum xrt_swapchain_create_flags +{ + //! Our compositor just ignores this bit. + XRT_SWAPCHAIN_CREATE_PROTECTED_CONTENT = (1u << 0u), + //! Signals that the allocator should only allocate one image. + XRT_SWAPCHAIN_CREATE_STATIC_IMAGE = (1u << 1u), +}; + +/*! + * Usage of the swapchain images. + */ +enum xrt_swapchain_usage_bits +{ + XRT_SWAPCHAIN_USAGE_COLOR = 0x00000001, + XRT_SWAPCHAIN_USAGE_DEPTH_STENCIL = 0x00000002, + XRT_SWAPCHAIN_USAGE_UNORDERED_ACCESS = 0x00000004, + XRT_SWAPCHAIN_USAGE_TRANSFER_SRC = 0x00000008, + XRT_SWAPCHAIN_USAGE_TRANSFER_DST = 0x00000010, + XRT_SWAPCHAIN_USAGE_SAMPLED = 0x00000020, + XRT_SWAPCHAIN_USAGE_MUTABLE_FORMAT = 0x00000040, + XRT_SWAPCHAIN_USAGE_INPUT_ATTACHMENT = 0x00000080, +}; + /*! * @interface xrt_swapchain * @@ -700,6 +705,15 @@ union xrt_compositor_event { * */ +/*! + * View type to be rendered to by the compositor. + */ +enum xrt_view_type +{ + XRT_VIEW_TYPE_MONO = 1, + XRT_VIEW_TYPE_STEREO = 2, +}; + enum xrt_compositor_frame_point { XRT_COMPOSITOR_FRAME_POINT_WOKE, //!< The client woke up after waiting.