24 #define XRT_MAX_SWAPCHAIN_IMAGES 8 31 #define XRT_MAX_SWAPCHAIN_FORMATS 8 117 xrt_swapchain_acquire_image(
struct xrt_swapchain *xsc, uint32_t *index)
141 xrt_swapchain_release_image(
struct xrt_swapchain *xsc, uint32_t index)
189 uint32_t sample_count,
225 uint64_t *predicted_display_time,
226 uint64_t *predicted_display_period);
252 const uint32_t *image_index,
254 uint32_t num_swapchains);
275 uint32_t sample_count,
283 width, height, face_count, array_size,
338 uint64_t *predicted_display_time,
339 uint64_t *predicted_display_period)
341 xc->
wait_frame(xc, predicted_display_time, predicted_display_period);
375 const uint32_t *image_index,
377 uint32_t num_swapchains)
379 xc->
end_frame(xc, blend_mode, xscs, image_index, layers,
449 typedef struct VkImage_T *
VkImage;
void(* begin_session)(struct xrt_compositor *xc, enum xrt_view_type view_type)
See xrBeginSession.
Definition: xrt_compositor.h:211
void(* destroy)(struct xrt_swapchain *xsc)
Must have called release_image before calling this function.
Definition: xrt_compositor.h:90
void(* end_session)(struct xrt_compositor *xc)
See xrEndSession, unlike the OpenXR one the state tracker is responsible to call discard frame before...
Definition: xrt_compositor.h:219
Main compositor.
Definition: xrt_compositor.h:527
Base class for a Vulkan client compositor.
Definition: xrt_compositor.h:474
int _pad
Definition: xrt_compositor.h:507
void(* poll_events)(struct xrt_compositor *xc, uint64_t *WIP)
Poll events from this compositor.
Definition: xrt_compositor.h:201
Definition: xrt_compositor.h:56
uint64_t VkImage
Definition: xrt_compositor.h:452
#define XRT_MAX_SWAPCHAIN_FORMATS
Max formats supported by a compositor, artificial limit.
Definition: xrt_compositor.h:31
Definition: xrt_compositor.h:51
A swapchain that exposes fd to be imported into a client API.
Definition: xrt_compositor.h:515
void(* discard_frame)(struct xrt_compositor *xc)
This isn't in the OpenXR API but is explicit in the XRT interfaces.
Definition: xrt_compositor.h:244
Definition: xrt_compositor.h:411
Base class for a Vulkan client swapchain.
Definition: xrt_compositor.h:461
xrt_swapchain_usage_bits
Usage of the swapchain images.
Definition: xrt_compositor.h:48
Definition: xrt_compositor.h:50
Definition: xrt_compositor.h:53
Definition: xrt_compositor.h:54
Definition: xrt_compositor.h:52
void(* end_frame)(struct xrt_compositor *xc, enum xrt_blend_mode blend_mode, struct xrt_swapchain **xscs, const uint32_t *image_index, uint32_t *layers, uint32_t num_swapchains)
See xrEndFrame.
Definition: xrt_compositor.h:249
Common defines and enums for XRT.
int fd
Definition: xrt_compositor.h:506
Common swapchain base.
Definition: xrt_compositor.h:75
Definition: xrt_compositor.h:424
uint64_t VkDeviceMemory
Definition: xrt_compositor.h:453
xrt_blend_mode
Which blend mode does the device support, used as both a bitfield and value.
Definition: xrt_defines.h:35
void(* wait_frame)(struct xrt_compositor *xc, uint64_t *predicted_display_time, uint64_t *predicted_display_period)
See xrWaitFrame.
Definition: xrt_compositor.h:224
bool(* acquire_image)(struct xrt_swapchain *xsc, uint32_t *index)
See xrWaitSwapchainImage, must make sure that no image is acquired before calling acquire_image...
Definition: xrt_compositor.h:96
Definition: xrt_compositor.h:67
void(* prepare_session)(struct xrt_compositor *xc)
This function is implicit in the OpenXR spec but made explicit here.
Definition: xrt_compositor.h:206
Definition: xrt_compositor.h:66
uint32_t array_size
Number of array layers per image.
Definition: xrt_compositor.h:85
Common compositor base.
Definition: xrt_compositor.h:169
Definition: xrt_compositor.h:55
#define XRT_MAX_SWAPCHAIN_IMAGES
Max swapchain images, artificial limit.
Definition: xrt_compositor.h:24
void(* destroy)(struct xrt_compositor *xc)
Teardown the compositor.
Definition: xrt_compositor.h:262
bool(* release_image)(struct xrt_swapchain *xsc, uint32_t index)
See xrReleaseSwapchainImage, state tracker needs to track index.
Definition: xrt_compositor.h:108
xrt_view_type
View type to be rendered to by the compositor.
Definition: xrt_compositor.h:64
Definition: xrt_compositor.h:40
struct xrt_swapchain *(* create_swapchain)(struct xrt_compositor *xc, enum xrt_swapchain_create_flags create, enum xrt_swapchain_usage_bits bits, int64_t format, uint32_t sample_count, uint32_t width, uint32_t height, uint32_t face_count, uint32_t array_size, uint32_t mip_count)
Create a swapchain with a set of images.
Definition: xrt_compositor.h:184
uint32_t num_formats
Number of formats.
Definition: xrt_compositor.h:174
size_t size
Definition: xrt_compositor.h:505
bool(* wait_image)(struct xrt_swapchain *xsc, uint64_t timeout, uint32_t index)
See xrWaitSwapchainImage, state tracker needs to track index.
Definition: xrt_compositor.h:101
xrt_swapchain_create_flags
Special flags for creating swapchain images.
Definition: xrt_compositor.h:38
uint32_t num_images
Number of images, the images themselves are on the subclasses.
Definition: xrt_compositor.h:80
void(* begin_frame)(struct xrt_compositor *xc)
See xrBeginFrame.
Definition: xrt_compositor.h:231
A single image of a fd based swapchain.
Definition: xrt_compositor.h:503