204 uint32_t i = data->view_count++;
219 view->target_viewport_data = *target_viewport_data;
261 data->fast_path = fast_path;
262 data->do_timewarp = do_timewarp;
312 target_viewport_data);
348 uint32_t layer_count,
350 VkImageLayout transition_to);
389 const uint32_t layer_count,
426 VkImage target_image,
427 VkImageView target_unorm_view,
433 data->fast_path = fast_path;
434 data->do_timewarp = do_timewarp;
436 data->cs.target_image = target_image;
437 data->cs.target_unorm_view = target_unorm_view;
483 target_viewport_data);
520 const uint32_t layer_count,
524 const VkImage target_image,
525 const VkImageView target_image_view,
558 const uint32_t layer_count,
560 VkImageLayout transition_to);
596 const uint32_t layer_count,
static struct comp_render_view_data * comp_render_dispatch_add_view(struct comp_render_dispatch_data *data, const struct xrt_pose *world_pose, const struct xrt_pose *eye_pose, const struct xrt_fov *fov, const struct render_viewport_data *layer_viewport_data, const struct xrt_normalized_rect *layer_norm_rect, VkImage image, VkImageView srgb_view, const struct render_viewport_data *target_viewport_data)
Shared implementation setting up common view params between GFX and CS.
Definition: comp_render.h:194
#define U_ZERO(PTR)
Zeroes the correct amount of memory based on the type pointed-to by the argument.
Definition: u_misc.h:68
void comp_render_cs_layers(struct render_compute *render, const struct comp_layer *layers, const uint32_t layer_count, const struct comp_render_dispatch_data *d, VkImageLayout transition_to)
Dispatch the layer squasher, on any number of views.
Definition: comp_render_cs.c:669
static void comp_render_cs_add_view(struct comp_render_dispatch_data *data, const struct xrt_pose *world_pose, const struct xrt_pose *eye_pose, const struct xrt_fov *fov, const struct render_viewport_data *layer_viewport_data, const struct xrt_normalized_rect *layer_norm_rect, VkImage image, VkImageView srgb_view, VkImageView unorm_view, const struct render_viewport_data *target_viewport_data)
Add view to the common data, as required by the CS renderer.
Definition: comp_render.h:463
void comp_render_cs_dispatch(struct render_compute *render, const struct comp_layer *layers, const uint32_t layer_count, const struct comp_render_dispatch_data *d)
Write commands to render to do a full composition with distortion.
Definition: comp_render_cs.c:716
static void comp_render_cs_initial_init(struct comp_render_dispatch_data *data, VkImage target_image, VkImageView target_unorm_view, bool fast_path, bool do_timewarp)
Initialize structure for use of the CS renderer.
Definition: comp_render.h:425
void comp_render_cs_layer(struct render_compute *render, uint32_t view_index, const struct comp_layer *layers, const uint32_t layer_count, const struct xrt_normalized_rect *pre_transform, const struct xrt_pose *world_pose, const struct xrt_pose *eye_pose, const VkImage target_image, const VkImageView target_image_view, const struct render_viewport_data *target_view, bool do_timewarp)
Dispatch the layer squasher for a single view.
Definition: comp_render_cs.c:498
static void comp_render_gfx_initial_init(struct comp_render_dispatch_data *data, struct render_gfx_target_resources *rtr, bool fast_path, bool do_timewarp)
Initialize structure for use of the GFX renderer.
Definition: comp_render.h:254
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.
Definition: comp_render_gfx.c:883
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.
Definition: comp_render_gfx.c:677
static void comp_render_gfx_add_view(struct comp_render_dispatch_data *data, const struct xrt_pose *world_pose, const struct xrt_pose *eye_pose, const struct xrt_fov *fov, struct render_gfx_target_resources *rtr, const struct render_viewport_data *layer_viewport_data, const struct xrt_normalized_rect *layer_norm_rect, VkImage image, VkImageView srgb_view, const struct xrt_matrix_2x2 *vertex_rot, const struct render_viewport_data *target_viewport_data)
Add view to the common data, as required by the GFX renderer.
Definition: comp_render.h:291
void render_calc_uv_to_tangent_lengths_rect(const struct xrt_fov *fov, struct xrt_normalized_rect *out_rect)
This function constructs a transformation in the form of a normalized rect that lets you go from a UV...
Definition: render_util.c:127
The NEW compositor rendering code header.
A single layer in a comp_layer_accum.
Definition: comp_layer_accum.h:36
The input data needed for a complete layer squashing distortion rendering to a target.
Definition: comp_render.h:138
uint32_t view_count
The number of views currently in this dispatch data.
Definition: comp_render.h:142
struct render_gfx_target_resources * rtr
The resources needed for the target.
Definition: comp_render.h:154
bool do_timewarp
Very often true, can be disabled for debugging.
Definition: comp_render.h:148
struct comp_render_dispatch_data::@111 cs
Members used only by CS Comp_render_cs.
VkImage target_image
Target image for distortion, used for barrier.
Definition: comp_render.h:161
VkImageView target_unorm_view
Target image view for distortion.
Definition: comp_render.h:164
bool fast_path
Fast path can be disabled for mirroing so needs to be an argument.
Definition: comp_render.h:145
struct comp_render_dispatch_data::@110 gfx
Members used only by GFX Comp_render_gfx.
The input data needed for a single view, shared between both GFX and CS paths.
Definition: comp_render.h:72
VkImageView unorm_view
Only used on compute path.
Definition: comp_render.h:127
VkImageView srgb_view
View into layer image (aka scratch image), used for both GFX (read/write) and CS (read) paths.
Definition: comp_render.h:95
struct xrt_fov fov
New fov of this view, used for the layer scratch image.
Definition: comp_render.h:83
struct render_viewport_data layer_viewport_data
Pre-view layer target viewport_data (where in the image we should render the view).
Definition: comp_render.h:101
struct xrt_matrix_2x2 vertex_rot
Distortion target vertex rotation information.
Definition: comp_render.h:121
struct xrt_pose world_pose
New world pose of this view.
Definition: comp_render.h:74
struct render_gfx_target_resources * rtr
Per-view layer target resources.
Definition: comp_render.h:118
struct xrt_pose eye_pose
New eye pose of this view.
Definition: comp_render.h:77
VkImage image
The layer image for this view (aka scratch image), used for barrier operations.
Definition: comp_render.h:89
struct xrt_normalized_rect layer_norm_rect
When sampling from the layer image (aka scratch image), how should we transform it to get to the pixe...
Definition: comp_render.h:107
struct xrt_normalized_rect target_pre_transform
Go from UV to tanangle for the target, this needs to match fov.
Definition: comp_render.h:110
The semi-low level resources and operations required to squash layers and/or apply distortion for a s...
Definition: render_interface.h:1166
Each rendering (render_gfx) render to one or more targets (render_gfx_target_resources),...
Definition: render_interface.h:785
The low-level resources and operations to perform layer squashing and/or mesh distortion for a single...
Definition: render_interface.h:848
The pure data information about a view that the renderer is rendering to.
Definition: render_interface.h:687
Describes a projection matrix fov.
Definition: xrt_defines.h:486
A tightly packed 2x2 matrix of floats.
Definition: xrt_defines.h:513
Normalized image rectangle, coordinates and size in 0 .
Definition: xrt_defines.h:453
A pose composed of a position and orientation.
Definition: xrt_defines.h:465
#define ARRAY_SIZE(a)
Array size helper.
Definition: xrt_compiler.h:30
Common defines and enums for XRT.
Include all of the Vulkan headers in one place, and cope with any "messy" includes implied by it.