Monado OpenXR Runtime
comp_swapchain.h File Reference

Independent swapchain implementation. More...

Include dependency graph for comp_swapchain.h:

Go to the source code of this file.

Data Structures

struct  comp_swapchain_shared
 Shared resource(s) and garbage collector for swapchains. More...
 
struct  comp_swapchain_image
 A single swapchain image, holds the needed state for tracking image usage. More...
 
struct  comp_swapchain
 A swapchain that is almost a one to one mapping to a OpenXR swapchain. More...
 

Typedefs

typedef void(* comp_swapchain_destroy_func_t) (struct comp_swapchain *sc)
 Callback for implementing own destroy function, should call comp_swapchain_teardown and is responsible for memory. More...
 

Functions

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_swapchain within another struct. More...
 
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_swapchain within another struct. More...
 
void comp_swapchain_teardown (struct comp_swapchain *sc)
 De-inits a comp_swapchain, usable for classes sub-classing comp_swapchain. More...
 
XRT_CHECK_RESULT xrt_result_t comp_swapchain_shared_init (struct comp_swapchain_shared *cscs, struct vk_bundle *vk)
 Create the shared struct. More...
 
void comp_swapchain_shared_destroy (struct comp_swapchain_shared *cscs, struct vk_bundle *vk)
 Destroy the shared struct. More...
 
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 threads. More...
 
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. More...
 
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. More...
 
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. More...
 

Detailed Description