Monado OpenXR Runtime
comp_render_gfx.c File Reference

Compositor gfx rendering code. More...

Include dependency graph for comp_render_gfx.c:

Data Structures

struct  gfx_layer_view_state
 Internal per-view for the layer squashing render step. More...
 
struct  gfx_layer_state
 Internal state for the layer squashing render step, contains all per-view state. More...
 
struct  gfx_mesh_state
 
struct  gfx_mesh_view_data
 
struct  gfx_mesh_data
 

Functions

static void gfx_mesh_add_view (struct gfx_mesh_data *md, uint32_t view_index, const struct xrt_pose *src_pose, const struct xrt_fov *src_fov, const struct xrt_normalized_rect *src_norm_rect, VkSampler src_sampler, VkImageView src_image_view)
 
static void calc_mvp_full (struct gfx_layer_view_state *state, const struct xrt_layer_data *layer_data, const struct xrt_pose *pose, const struct xrt_vec3 *scale, struct xrt_matrix_4x4 *result)
 
static void calc_mv_inv_full (struct gfx_layer_view_state *state, const struct xrt_layer_data *layer_data, const struct xrt_pose *pose, const struct xrt_vec3 *scale, struct xrt_matrix_4x4 *result)
 
static void calc_mvp_rot_only (struct gfx_layer_view_state *state, const struct xrt_layer_data *data, const struct xrt_pose *pose, const struct xrt_vec3 *scale, struct xrt_matrix_4x4 *result)
 
static const struct comp_swapchain_imageget_layer_image (const struct comp_layer *layer, uint32_t swapchain_index, uint32_t image_index)
 
static void add_layer (struct gfx_layer_view_state *state, const struct xrt_layer_data *data, VkDescriptorSet descriptor_set)
 
static VkResult do_cylinder_layer (struct render_gfx *rr, const struct comp_layer *layer, uint32_t view_index, VkSampler clamp_to_edge, VkSampler clamp_to_border_black, struct gfx_layer_view_state *state)
 
static VkResult do_equirect2_layer (struct render_gfx *rr, const struct comp_layer *layer, uint32_t view_index, VkSampler clamp_to_edge, VkSampler clamp_to_border_black, struct gfx_layer_view_state *state)
 
static VkResult do_projection_layer (struct render_gfx *rr, const struct comp_layer *layer, uint32_t view_index, VkSampler clamp_to_edge, VkSampler clamp_to_border_black, struct gfx_layer_view_state *state)
 
static VkResult do_quad_layer (struct render_gfx *rr, const struct comp_layer *layer, uint32_t view_index, VkSampler clamp_to_edge, VkSampler clamp_to_border_black, struct gfx_layer_view_state *state)
 
static void do_layers (struct render_gfx *rr, const struct comp_layer *layers, uint32_t layer_count, const struct comp_render_dispatch_data *d)
 
static void do_mesh (struct render_gfx *rr, bool do_timewarp, const struct gfx_mesh_data *md, const struct comp_render_dispatch_data *d)
 
static void do_mesh_from_proj (struct render_gfx *rr, const struct comp_render_dispatch_data *d, const struct comp_layer *layer, const struct xrt_layer_projection_view_data *vds[XRT_MAX_VIEWS])
 
void comp_render_gfx_dispatch (struct render_gfx *rr, const struct comp_layer *layers, const uint32_t layer_count, const struct comp_render_dispatch_data *d)
 Writes the needed commands to the render_gfx to do a full composition with distortion. More...
 

Variables

static const VkClearColorValue background_color_idle
 
static const VkClearColorValue background_color_active
 

Detailed Description

Variable Documentation

◆ background_color_active

const VkClearColorValue background_color_active
static
Initial value:
= {
.float32 = {0.0f, 0.0f, 0.0f, 1.0f},
}

◆ background_color_idle

const VkClearColorValue background_color_idle
static
Initial value:
= {
.float32 = {0.1f, 0.1f, 0.1f, 1.0f},
}