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);
356 const uint32_t layer_count,
393 VkImage target_image,
394 VkImageView target_unorm_view,
400 data->fast_path = fast_path;
401 data->do_timewarp = do_timewarp;
403 data->cs.target_image = target_image;
404 data->cs.target_unorm_view = target_unorm_view;
450 target_viewport_data);
487 const uint32_t layer_count,
491 const VkImage target_image,
492 const VkImageView target_image_view,
525 const uint32_t layer_count,
527 VkImageLayout transition_to);
563 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 *crc, 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:661
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:430
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:392
void comp_render_cs_dispatch(struct render_compute *crc, const struct comp_layer *layers, const uint32_t layer_count, const struct comp_render_dispatch_data *d)
Write commands to crc to do a full composition with distortion.
Definition: comp_render_cs.c:708
void comp_render_cs_layer(struct render_compute *crc, 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:490
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 *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.
Definition: comp_render_gfx.c:816
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
A compute rendering is used to create command buffers needed to do one frame of compositor rendering ...
Definition: render_interface.h:1106
Each rendering (render_gfx) render to one or more targets (render_gfx_target_resources),...
Definition: render_interface.h:775
A rendering is used to create command buffers needed to do one frame of compositor rendering,...
Definition: render_interface.h:823
The pure data information about a view that the renderer is rendering to.
Definition: render_interface.h:677
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.