63 VkImageView *no_alpha;
166 uint32_t native_image_count);
void(* comp_swapchain_destroy_func_t)(struct comp_swapchain *sc)
Callback for implementing own destroy function, should call comp_swapchain_teardown and is responsibl...
Definition: comp_swapchain.h:33
void comp_swapchain_shared_garbage_collect(struct comp_swapchain_shared *cscs)
Do garbage collection, destroying any resources that has been scheduled for destruction from other th...
Definition: comp_swapchain.c:646
void comp_swapchain_teardown(struct comp_swapchain *sc)
De-inits a comp_swapchain, usable for classes sub-classing comp_swapchain.
Definition: comp_swapchain.c:591
xrt_result_t comp_swapchain_create_init(struct comp_swapchain *sc, comp_swapchain_destroy_func_t destroy_func, struct vk_bundle *vk, struct comp_swapchain_shared *cscs, const struct xrt_swapchain_create_info *info, const struct xrt_swapchain_create_properties *xsccp)
Helper to init a comp_swachain struct as if it was a create operation, useful for wrapping comp_swapc...
Definition: comp_swapchain.c:493
xrt_result_t comp_swapchain_import(struct vk_bundle *vk, struct comp_swapchain_shared *cscs, const struct xrt_swapchain_create_info *info, struct xrt_image_native *native_images, uint32_t image_count, struct xrt_swapchain **out_xsc)
A compositor function that is implemented in the swapchain code.
Definition: comp_swapchain.c:708
XRT_CHECK_RESULT xrt_result_t comp_swapchain_shared_init(struct comp_swapchain_shared *cscs, struct vk_bundle *vk)
Create the shared struct.
Definition: comp_swapchain.c:628
void comp_swapchain_shared_destroy(struct comp_swapchain_shared *cscs, struct vk_bundle *vk)
Destroy the shared struct.
Definition: comp_swapchain.c:640
xrt_result_t comp_swapchain_create(struct vk_bundle *vk, struct comp_swapchain_shared *cscs, const struct xrt_swapchain_create_info *info, const struct xrt_swapchain_create_properties *xsccp, struct xrt_swapchain **out_xsc)
A compositor function that is implemented in the swapchain code.
Definition: comp_swapchain.c:680
xrt_result_t comp_swapchain_import_init(struct comp_swapchain *sc, comp_swapchain_destroy_func_t destroy_func, struct vk_bundle *vk, struct comp_swapchain_shared *cscs, const struct xrt_swapchain_create_info *info, struct xrt_image_native *native_images, uint32_t native_image_count)
Helper to init a comp_swachain struct as if it was a import operation, useful for wrapping comp_swapc...
Definition: comp_swapchain.c:552
xrt_result_t comp_swapchain_get_create_properties(const struct xrt_swapchain_create_info *info, struct xrt_swapchain_create_properties *xsccp)
A compositor function that is implemented in the swapchain code.
Definition: comp_swapchain.c:663
#define XRT_MAX_SWAPCHAIN_IMAGES
Max swapchain images, artificial limit.
Definition: xrt_limits.h:34
enum xrt_result xrt_result_t
Result type used across Monado.
A single swapchain image, holds the needed state for tracking image usage.
Definition: comp_swapchain.h:58
struct os_mutex use_mutex
A mutex per swapchain image that is used with use_cond.
Definition: comp_swapchain.h:75
struct comp_swapchain_image::@113 views
Views used by the renderer and distortion code, for each array layer.
pthread_cond_t use_cond
A condition variable per swapchain image that is notified when use_count count reaches 0.
Definition: comp_swapchain.h:72
size_t array_size
The number of array slices in a texture, 1 == regular 2D texture.
Definition: comp_swapchain.h:66
uint32_t use_count
A usage counter, similar to a reference counter.
Definition: comp_swapchain.h:69
Shared resource(s) and garbage collector for swapchains.
Definition: comp_swapchain.h:44
struct u_threading_stack destroy_swapchains
Thread object for safely destroying swapchain.
Definition: comp_swapchain.h:46
A swapchain that is almost a one to one mapping to a OpenXR swapchain.
Definition: comp_swapchain.h:92
struct u_index_fifo fifo
This fifo is used to always give out the oldest image to acquire image, this should probably be made ...
Definition: comp_swapchain.h:105
comp_swapchain_destroy_func_t real_destroy
Virtual real destroy function.
Definition: comp_swapchain.h:108
A wrapper around a native mutex.
Definition: os_threading.h:55
Definition: u_worker.c:49
Definition: u_index_fifo.h:21
Definition: u_threading.h:17
A bundle of Vulkan functions and objects, used by both Compositor and Compositor client code.
Definition: vk_helpers.h:49
Small helper to manage lock around a command pool.
Definition: vk_cmd_pool.h:33
Definition: vk_image_allocator.h:36
A single image of a swapchain based on native buffer handles.
Definition: xrt_compositor.h:2150
Swapchain creation info.
Definition: xrt_compositor.h:876
Struct used to negotiate properties of a swapchain that is created outside of the compositor.
Definition: xrt_compositor.h:918
Base class for a swapchain that exposes a native buffer handle to be imported into a client API.
Definition: xrt_compositor.h:2191
struct xrt_swapchain base
Base.
Definition: xrt_compositor.h:2193
Common swapchain interface/base.
Definition: xrt_compositor.h:536
uint32_t image_count
Number of images.
Definition: xrt_compositor.h:547
Slightly higher level thread safe helpers.
Vulkan image allocator helper.