Monado OpenXR Runtime
comp_layer_accum Struct Reference

Collect a stack of layers - one frame's worth. More...

#include <util/comp_layer_accum.h>

Collaboration diagram for comp_layer_accum:

Public Member Functions

xrt_result_t comp_layer_accum_begin (struct comp_layer_accum *cla, const struct xrt_layer_frame_data *data)
 Reset all layer data and reset count to 0. More...
 
xrt_result_t comp_layer_accum_projection (struct comp_layer_accum *cla, struct xrt_swapchain *xsc[XRT_MAX_VIEWS], const struct xrt_layer_data *data)
 Accumulate swapchains and data for a projection layer for a frame. More...
 
xrt_result_t comp_layer_accum_projection_depth (struct comp_layer_accum *cla, struct xrt_swapchain *xsc[XRT_MAX_VIEWS], struct xrt_swapchain *d_xsc[XRT_MAX_VIEWS], const struct xrt_layer_data *data)
 Accumulate swapchains and data for a projection layer (with depth image) for a frame. More...
 
xrt_result_t comp_layer_accum_quad (struct comp_layer_accum *cla, struct xrt_swapchain *xsc, const struct xrt_layer_data *data)
 Accumulate swapchain and data for a quad layer for a frame. More...
 
xrt_result_t comp_layer_accum_cube (struct comp_layer_accum *cla, struct xrt_swapchain *xsc, const struct xrt_layer_data *data)
 Accumulate swapchain and data for a cube layer for a frame. More...
 
xrt_result_t comp_layer_accum_cylinder (struct comp_layer_accum *cla, struct xrt_swapchain *xsc, const struct xrt_layer_data *data)
 Accumulate swapchain and data for a cylinder layer for a frame. More...
 
xrt_result_t comp_layer_accum_equirect1 (struct comp_layer_accum *cla, struct xrt_swapchain *xsc, const struct xrt_layer_data *data)
 Accumulate swapchain and data for an equirect(1) layer for a frame. More...
 
xrt_result_t comp_layer_accum_equirect2 (struct comp_layer_accum *cla, struct xrt_swapchain *xsc, const struct xrt_layer_data *data)
 Accumulate swapchain and data for an equirect2 layer for a frame. More...
 
struct xrt_swapchaincomp_layer_accum_get_swapchain (const struct comp_layer_accum *cla, uint32_t layer_index, uint32_t swapchain_index)
 Get a (color) swapchain associated with a layer. More...
 
struct xrt_swapchaincomp_layer_accum_get_depth_swapchain (const struct comp_layer_accum *cla, uint32_t layer_index, uint32_t swapchain_index)
 Get a depth swapchain associated with a (projection with depth) layer. More...
 

Data Fields

struct xrt_layer_frame_data data
 The per frame data, supplied by begin. More...
 
struct comp_layer layers [XRT_MAX_LAYERS]
 All of the layers. More...
 
uint32_t layer_count
 Number of submitted layers. More...
 

Detailed Description

Collect a stack of layers - one frame's worth.

Independent of graphics API, swapchain implementation, etc.

Used to turn the step by step "one call per layer" compositor API back into a single structure per frame.

See also
comp_layer

Member Function Documentation

◆ comp_layer_accum_begin()

xrt_result_t comp_layer_accum_begin ( struct comp_layer_accum cla,
const struct xrt_layer_frame_data data 
)

Reset all layer data and reset count to 0.

Call at the beginning of a frame.

◆ comp_layer_accum_cube()

xrt_result_t comp_layer_accum_cube ( struct comp_layer_accum cla,
struct xrt_swapchain xsc,
const struct xrt_layer_data data 
)

Accumulate swapchain and data for a cube layer for a frame.

◆ comp_layer_accum_cylinder()

xrt_result_t comp_layer_accum_cylinder ( struct comp_layer_accum cla,
struct xrt_swapchain xsc,
const struct xrt_layer_data data 
)

Accumulate swapchain and data for a cylinder layer for a frame.

◆ comp_layer_accum_equirect1()

xrt_result_t comp_layer_accum_equirect1 ( struct comp_layer_accum cla,
struct xrt_swapchain xsc,
const struct xrt_layer_data data 
)

Accumulate swapchain and data for an equirect(1) layer for a frame.

◆ comp_layer_accum_equirect2()

xrt_result_t comp_layer_accum_equirect2 ( struct comp_layer_accum cla,
struct xrt_swapchain xsc,
const struct xrt_layer_data data 
)

Accumulate swapchain and data for an equirect2 layer for a frame.

◆ comp_layer_accum_get_depth_swapchain()

struct xrt_swapchain * comp_layer_accum_get_depth_swapchain ( const struct comp_layer_accum cla,
uint32_t  layer_index,
uint32_t  swapchain_index 
)
inline

Get a depth swapchain associated with a (projection with depth) layer.

Parameters
claself
layer_indexindex of layer
swapchain_indexindex of color swapchain - typically this is the view index.

References comp_layer::data, layers, and xrt_layer_data::type.

◆ comp_layer_accum_get_swapchain()

struct xrt_swapchain * comp_layer_accum_get_swapchain ( const struct comp_layer_accum cla,
uint32_t  layer_index,
uint32_t  swapchain_index 
)
inline

Get a (color) swapchain associated with a layer.

Parameters
claself
layer_indexindex of layer
swapchain_indexindex of swapchain - typically this is 0 for most layers, the view index for projection.

References layers, and comp_layer::sc_array.

◆ comp_layer_accum_projection()

xrt_result_t comp_layer_accum_projection ( struct comp_layer_accum cla,
struct xrt_swapchain xsc[XRT_MAX_VIEWS],
const struct xrt_layer_data data 
)

Accumulate swapchains and data for a projection layer for a frame.

◆ comp_layer_accum_projection_depth()

xrt_result_t comp_layer_accum_projection_depth ( struct comp_layer_accum cla,
struct xrt_swapchain xsc[XRT_MAX_VIEWS],
struct xrt_swapchain d_xsc[XRT_MAX_VIEWS],
const struct xrt_layer_data data 
)

Accumulate swapchains and data for a projection layer (with depth image) for a frame.

◆ comp_layer_accum_quad()

xrt_result_t comp_layer_accum_quad ( struct comp_layer_accum cla,
struct xrt_swapchain xsc,
const struct xrt_layer_data data 
)

Accumulate swapchain and data for a quad layer for a frame.

Field Documentation

◆ data

struct xrt_layer_frame_data comp_layer_accum::data

The per frame data, supplied by begin.

◆ layer_count

uint32_t comp_layer_accum::layer_count

Number of submitted layers.

Referenced by can_do_one_projection_layer_fast_path(), and sdl_program_plus_render().

◆ layers


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