|
Monado OpenXR Runtime
|
Compositor (gfx - graphics shader) rendering code. More...
#include "xrt/xrt_compositor.h"#include "util/comp_swapchain.h"#include "math/m_api.h"#include "math/m_mathinclude.h"#include "util/u_trace_marker.h"#include "vk/vk_helpers.h"#include "render/render_interface.h"#include "util/comp_render.h"#include "util/comp_render_helpers.h"
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_image * | get_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 *render, const struct comp_layer *layer, uint32_t view_index, VkSampler clamp_to_edge, VkSampler clamp_to_border_black, struct gfx_layer_view_state *state) |
| Data setup for a cylinder layer Also allocates and writes a descriptor set! | |
| static VkResult | do_equirect2_layer (struct render_gfx *render, const struct comp_layer *layer, uint32_t view_index, VkSampler clamp_to_edge, VkSampler clamp_to_border_black, struct gfx_layer_view_state *state) |
| Data setup for an "equirect2" layer Also allocates and writes a descriptor set! | |
| static VkResult | do_projection_layer (struct render_gfx *render, const struct comp_layer *layer, uint32_t view_index, VkSampler clamp_to_edge, VkSampler clamp_to_border_black, struct gfx_layer_view_state *state) |
| Data setup for a projection layer Also allocates and writes a descriptor set! | |
| static VkResult | do_quad_layer (struct render_gfx *render, const struct comp_layer *layer, uint32_t view_index, VkSampler clamp_to_edge, VkSampler clamp_to_border_black, struct gfx_layer_view_state *state) |
| Data setup for a quad layer Also allocates and writes a descriptor set! | |
| static void | crg_clear_output (struct render_gfx *render, const struct comp_render_dispatch_data *d) |
| static void | crg_distortion_common (struct render_gfx *render, bool do_timewarp, const struct gfx_mesh_data *md, const struct comp_render_dispatch_data *d) |
| Used in both fast-path and layer-squashed routes. | |
| static void | crg_distortion_after_squash (struct render_gfx *render, const struct comp_render_dispatch_data *d) |
| For use after squashing layers. | |
| static void | crg_distortion_fast_path (struct render_gfx *render, const struct comp_render_dispatch_data *d, const struct comp_layer *layer, const struct xrt_layer_projection_view_data *vds[XRT_MAX_VIEWS]) |
| Fast path. | |
| void | comp_render_gfx_layers (struct render_gfx *render, const struct comp_layer *layers, uint32_t layer_count, const struct comp_render_dispatch_data *d, VkImageLayout transition_to) |
| Dispatch the (graphics pipeline) layer squasher, on any number of views. | |
| void | comp_render_gfx_dispatch (struct render_gfx *render, 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. | |
Variables | |
| static const VkClearColorValue | background_color_idle |
| static const VkClearColorValue | background_color_active |
Compositor (gfx - graphics shader) rendering code.
|
static |
For use after squashing layers.
References render_resources::clamp_to_border_black, crg_distortion_common(), comp_render_view_data::fov, comp_render_view_data::norm_rect, render_gfx::r, comp_render_view_data::sample_view, comp_render_dispatch_data::view_count, comp_render_view_data::world_pose_scanout_begin, and XRT_STRUCT_INIT.
Referenced by comp_render_gfx_dispatch().
|
static |
Used in both fast-path and layer-squashed routes.
References comp_render_dispatch_data::gfx, comp_render_view_data::pre_transform, render_gfx::r, render_calc_time_warp_matrix(), render_gfx_end_view(), comp_render_dispatch_data::rtr, comp_render_view_data::vertex_rot, comp_render_dispatch_data::view_count, comp_render_view_data::viewport_data, render_resources::vk, VK_CHK_WITH_GOTO, comp_render_view_data::world_pose_scanout_begin, and XRT_STRUCT_INIT.
Referenced by crg_distortion_after_squash(), and crg_distortion_fast_path().
|
static |
Fast path.
References render_resources::clamp_to_border_black, crg_distortion_common(), comp_layer::data, comp_render_dispatch_data::do_timewarp, render_gfx::r, comp_render_dispatch_data::view_count, and XRT_STRUCT_INIT.
Referenced by comp_render_gfx_dispatch().
|
static |
Data setup for a cylinder layer Also allocates and writes a descriptor set!
References xrt_sub_image::array_index, comp_layer::data, xrt_layer_data::flags, xrt_sub_image::image_index, xrt_sub_image::norm_rect, render_gfx::r, render_resources::vk, and VK_CHK_AND_RET.
Referenced by comp_render_gfx_layers().
|
static |
Data setup for an "equirect2" layer Also allocates and writes a descriptor set!
References xrt_sub_image::array_index, comp_layer::data, xrt_layer_data::flags, xrt_sub_image::image_index, xrt_sub_image::norm_rect, render_gfx::r, gfx_layer_view_state::to_tangent, render_resources::vk, and VK_CHK_AND_RET.
Referenced by comp_render_gfx_layers().
|
static |
Data setup for a projection layer Also allocates and writes a descriptor set!
References xrt_sub_image::array_index, comp_layer::data, xrt_layer_data::flags, xrt_sub_image::image_index, xrt_sub_image::norm_rect, render_gfx::r, render_calc_uv_to_tangent_lengths_rect(), xrt_layer_data::type, render_resources::vk, and VK_CHK_AND_RET.
Referenced by comp_render_gfx_layers().
|
static |
Data setup for a quad layer Also allocates and writes a descriptor set!
References xrt_sub_image::array_index, comp_layer::data, xrt_layer_data::flags, xrt_sub_image::image_index, xrt_sub_image::norm_rect, render_gfx::r, render_resources::vk, and VK_CHK_AND_RET.
Referenced by comp_render_gfx_layers().
|
static |
|
static |