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
 
struct  gfx_layer_state
 
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 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)
 Helper function that takes a set of layers, new device poses, a scratch images with associated render_gfx_target_resources and 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

Compositor gfx rendering code.

Author
Jakob Bornecrantz jakob.nosp@m.@col.nosp@m.labor.nosp@m.a.co.nosp@m.m

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},
}