Monado OpenXR Runtime
client_d3d12_swapchain Struct Reference

Wraps the real compositor swapchain providing a D3D12 based interface. More...

Inheritance diagram for client_d3d12_swapchain:
Collaboration diagram for client_d3d12_swapchain:

Data Fields

struct xrt_swapchain_d3d12 base
 
unique_swapchain_ref xsc
 Owning reference to the imported swapchain. More...
 
struct client_d3d12_compositorc {nullptr}
 Non-owning reference to our parent compositor. More...
 
xrt_vec2 comp_uv_scale = {1.0f, 1.0f}
 UV coordinates scaling when translating from app to compositor image. More...
 
std::unique_ptr< client_d3d12_swapchain_datadata
 implementation struct with things that aren't standard_layout More...
 
- Data Fields inherited from xrt_swapchain_d3d12
struct xrt_swapchain base
 Base. More...
 
ID3D12Resource * images [XRT_MAX_SWAPCHAIN_IMAGES]
 Images to be used by the caller. More...
 
- Data Fields inherited from xrt_swapchain
struct xrt_reference reference
 Reference helper. More...
 
uint32_t image_count
 Number of images. More...
 
void(* destroy )(struct xrt_swapchain *xsc)
 dec_image_use must have been called as often as inc_image_use. More...
 
xrt_result_t(* acquire_image )(struct xrt_swapchain *xsc, uint32_t *out_index)
 Obtain the index of the next image to use, without blocking on being able to write to it. More...
 
xrt_result_t(* inc_image_use )(struct xrt_swapchain *xsc, uint32_t index)
 Increments the use counter of a swapchain image. More...
 
xrt_result_t(* dec_image_use )(struct xrt_swapchain *xsc, uint32_t index)
 Decrements the use counter of a swapchain image. More...
 
xrt_result_t(* wait_image )(struct xrt_swapchain *xsc, int64_t timeout_ns, uint32_t index)
 Wait until image index is available for exclusive use, or until timeout_ns expires. More...
 
xrt_result_t(* barrier_image )(struct xrt_swapchain *xsc, enum xrt_barrier_direction direction, uint32_t index)
 Do any barrier transitions to and from the application. More...
 
xrt_result_t(* release_image )(struct xrt_swapchain *xsc, uint32_t index)
 See xrReleaseSwapchainImage, state tracker needs to track index. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from xrt_swapchain
static xrt_result_t xrt_swapchain_acquire_image (struct xrt_swapchain *xsc, uint32_t *out_index)
 Obtain the index of the next image to use, without blocking on being able to write to it. More...
 
static xrt_result_t xrt_swapchain_inc_image_use (struct xrt_swapchain *xsc, uint32_t index)
 Increments the use counter of a swapchain image. More...
 
static xrt_result_t xrt_swapchain_dec_image_use (struct xrt_swapchain *xsc, uint32_t index)
 Decrements the use counter of a swapchain image. More...
 
static xrt_result_t xrt_swapchain_wait_image (struct xrt_swapchain *xsc, int64_t timeout_ns, uint32_t index)
 Wait until image index is available for exclusive use, or until timeout_ns expires. More...
 
static xrt_result_t xrt_swapchain_barrier_image (struct xrt_swapchain *xsc, enum xrt_barrier_direction direction, uint32_t index)
 Do any barrier transitions to and from the application. More...
 
static xrt_result_t xrt_swapchain_release_image (struct xrt_swapchain *xsc, uint32_t index)
 See xrReleaseSwapchainImage, state tracker needs to track index. More...
 

Detailed Description

Wraps the real compositor swapchain providing a D3D12 based interface.

Field Documentation

◆ c

struct client_d3d12_compositor* client_d3d12_swapchain::c {nullptr}

Non-owning reference to our parent compositor.

◆ comp_uv_scale

xrt_vec2 client_d3d12_swapchain::comp_uv_scale = {1.0f, 1.0f}

UV coordinates scaling when translating from app to compositor image.

◆ data

std::unique_ptr<client_d3d12_swapchain_data> client_d3d12_swapchain::data

implementation struct with things that aren't standard_layout

◆ xsc

unique_swapchain_ref client_d3d12_swapchain::xsc

Owning reference to the imported swapchain.

Referenced by client_d3d12_swapchain_wait_image().


The documentation for this struct was generated from the following file: