53#define RENDER_ALWAYS_SAFE_UBO_ALIGNMENT (256)
59#define RENDER_MAX_LAYERS (XRT_MAX_LAYERS)
65#define RENDER_MAX_IMAGES_SIZE (RENDER_MAX_LAYERS * XRT_MAX_VIEWS)
66#define RENDER_MAX_IMAGES_COUNT(RENDER_RESOURCES) (RENDER_MAX_LAYERS * RENDER_RESOURCES->view_count)
75#define RENDER_MAX_LAYER_RUNS_SIZE (XRT_MAX_VIEWS)
76#define RENDER_MAX_LAYER_RUNS_COUNT(RENDER_RESOURCES) (RENDER_RESOURCES->view_count)
79#define RENDER_DISTORTION_IMAGE_DIMENSIONS (128)
82#define RENDER_DISTORTION_IMAGES_SIZE (3 * XRT_MAX_VIEWS)
83#define RENDER_DISTORTION_IMAGES_COUNT(RENDER_RESOURCES) (3 * RENDER_RESOURCES->view_count)
86#define RENDER_BINDING_LAYER_SHARED_UBO 0
89#define RENDER_BINDING_LAYER_SHARED_SRC 1
144 VkShaderModule blit_comp;
145 VkShaderModule clear_comp;
146 VkShaderModule layer_comp;
147 VkShaderModule distortion_comp;
149 VkShaderModule mesh_vert;
150 VkShaderModule mesh_frag;
157 VkShaderModule layer_cylinder_vert;
158 VkShaderModule layer_cylinder_frag;
160 VkShaderModule layer_equirect2_vert;
161 VkShaderModule layer_equirect2_frag;
163 VkShaderModule layer_projection_vert;
164 VkShaderModule layer_quad_vert;
165 VkShaderModule layer_shared_frag;
216 VkBufferUsageFlags usage_flags,
217 VkMemoryPropertyFlags memory_property_flags,
226 VkBufferUsageFlags usage_flags,
227 VkMemoryPropertyFlags memory_property_flags,
330XRT_CHECK_RESULT VkResult
341XRT_CHECK_RESULT VkResult
384 VkCommandPool cmd_pool;
386 VkQueryPool query_pool;
455 uint32_t vertex_count;
456 uint32_t index_counts[XRT_MAX_VIEWS];
458 uint32_t index_offsets[XRT_MAX_VIEWS];
459 uint32_t index_count_total;
474 VkImageView image_view;
651 VkDeviceMemory device_memory;
653 VkImageView srgb_view;
654 VkImageView unorm_view;
742 VkPipeline cylinder_premultiplied_alpha;
743 VkPipeline cylinder_unpremultiplied_alpha;
745 VkPipeline equirect2_premultiplied_alpha;
746 VkPipeline equirect2_unpremultiplied_alpha;
748 VkPipeline proj_premultiplied_alpha;
749 VkPipeline proj_unpremultiplied_alpha;
751 VkPipeline quad_premultiplied_alpha;
752 VkPipeline quad_unpremultiplied_alpha;
765 VkAttachmentLoadOp load_op,
766 VkImageLayout final_layout);
950 float central_horizontal_angle;
951 float upper_vertical_angle;
952 float lower_vertical_angle;
993XRT_CHECK_RESULT VkResult
996 VkSampler src_sampler,
997 VkImageView src_image_view,
998 VkDescriptorSet *out_descriptor_set);
1006XRT_CHECK_RESULT VkResult
1009 VkSampler src_sampler,
1010 VkImageView src_image_view,
1011 VkDescriptorSet *out_descriptor_set);
1019XRT_CHECK_RESULT VkResult
1022 VkSampler src_sampler,
1023 VkImageView src_image_view,
1024 VkDescriptorSet *out_descriptor_set);
1032XRT_CHECK_RESULT VkResult
1035 VkSampler src_sampler,
1036 VkImageView src_image_view,
1037 VkDescriptorSet *out_descriptor_set);
1045XRT_CHECK_RESULT VkResult
1048 VkSampler src_sampler,
1049 VkImageView src_image_view,
1050 VkDescriptorSet *out_descriptor_set);
1072 const VkClearColorValue *color);
1211 uint32_t padding[3];
1224 uint32_t layer_type;
1225 uint32_t unpremultiplied_alpha;
1237 uint32_t color_image_index;
1238 uint32_t depth_image_index;
1255 float central_angle;
1267 float central_horizontal_angle;
1268 float upper_vertical_angle;
1269 float lower_vertical_angle;
1301 float padding[XRT_MAX_VIEWS];
1315 struct xrt_matrix_4x4 transform_timewarp_scanout_begin[XRT_MAX_VIEWS];
1316 struct xrt_matrix_4x4 transform_timewarp_scanout_end[XRT_MAX_VIEWS];
1367 VkDescriptorSet descriptor_set,
1372 VkImageView target_image_view,
1381 VkSampler src_samplers[XRT_MAX_VIEWS],
1382 VkImageView src_image_views[XRT_MAX_VIEWS],
1384 const struct xrt_pose src_poses[XRT_MAX_VIEWS],
1385 const struct xrt_fov src_fovs[XRT_MAX_VIEWS],
1386 const struct xrt_pose new_poses_scanout_begin[XRT_MAX_VIEWS],
1387 const struct xrt_pose new_poses_scanout_end[XRT_MAX_VIEWS],
1388 VkImage target_image,
1389 VkImageView target_image_view,
1396render_compute_projection_scanout_compensation(
struct render_compute *render,
1397 VkSampler src_samplers[XRT_MAX_VIEWS],
1398 VkImageView src_image_views[XRT_MAX_VIEWS],
1400 const struct xrt_fov src_fovs[XRT_MAX_VIEWS],
1401 const struct xrt_pose new_poses_scanout_begin[XRT_MAX_VIEWS],
1402 const struct xrt_pose new_poses_scanout_end[XRT_MAX_VIEWS],
1403 VkImage target_image,
1404 VkImageView target_image_view,
1411render_compute_projection_no_timewarp(
struct render_compute *render,
1412 VkSampler src_samplers[XRT_MAX_VIEWS],
1413 VkImageView src_image_views[XRT_MAX_VIEWS],
1415 VkImage target_image,
1416 VkImageView target_image_view,
1424 VkImage target_image,
1425 VkImageView target_image_view,
bool render_resources_init(struct render_resources *r, struct render_shaders *shaders, struct vk_bundle *vk, struct xrt_device *xdev)
Allocate pools and static resources.
Definition: render_resources.c:509
VkResult render_buffer_map_and_write(struct vk_bundle *vk, struct render_buffer *buffer, void *data, VkDeviceSize size)
Maps the buffer, and copies the given data to the buffer.
Definition: render_buffer.c:209
#define RENDER_MAX_LAYER_RUNS_SIZE
Maximum number of times that the layer squasher shader can run per render_compute.
Definition: render_interface.h:75
VkResult render_buffer_write(struct vk_bundle *vk, struct render_buffer *buffer, void *data, VkDeviceSize size)
Writes the given data to the buffer, will map it temporarily if not mapped.
Definition: render_buffer.c:231
void render_gfx_end_view(struct render_gfx *render)
Definition: render_gfx.c:1137
void render_gfx_mesh_draw(struct render_gfx *render, uint32_t mesh_index, VkDescriptorSet descriptor_set, bool do_timewarp)
Dispatch one mesh shader instance, using the give mesh_index as source for mesh geometry,...
Definition: render_gfx.c:1166
bool render_gfx_end(struct render_gfx *render)
Frees any unneeded resources and ends the command buffer so it can be used, also unlocks the vk_bundl...
Definition: render_gfx.c:1007
XRT_CHECK_RESULT VkResult render_gfx_layer_equirect2_alloc_and_write(struct render_gfx *render, const struct render_gfx_layer_equirect2_data *data, VkSampler src_sampler, VkImageView src_image_view, VkDescriptorSet *out_descriptor_set)
Allocate and write a UBO and descriptor_set to be used for equirect2 layer rendering,...
Definition: render_gfx.c:1271
void render_gfx_begin_view(struct render_gfx *render, uint32_t view, const struct render_viewport_data *viewport_data)
Definition: render_gfx.c:1086
void render_gfx_layer_equirect2(struct render_gfx *render, bool premultiplied_alpha, VkDescriptorSet descriptor_set)
Dispatch a equirect2 layer shader into the current target and view.
Definition: render_gfx.c:1361
void render_shaders_fini(struct render_shaders *s, struct vk_bundle *vk)
Unload and cleanup shaders.
Definition: render_shaders.c:129
XRT_CHECK_RESULT VkResult render_gfx_layer_cylinder_alloc_and_write(struct render_gfx *render, const struct render_gfx_layer_cylinder_data *data, VkSampler src_sampler, VkImageView src_image_view, VkDescriptorSet *out_descriptor_set)
Allocate and write a UBO and descriptor_set to be used for cylinder layer rendering,...
Definition: render_gfx.c:1249
bool render_resources_get_timestamps(struct render_resources *r, uint64_t *out_gpu_start_ns, uint64_t *out_gpu_end_ns)
Returns the timestamps for when the latest GPU work started and stopped that was submitted using rend...
Definition: render_resources.c:1147
void render_gfx_fini(struct render_gfx *render)
Frees all resources held by the rendering, does not free the struct itself.
Definition: render_gfx.c:1025
void render_distortion_images_fini(struct render_resources *r)
Free distortion images.
Definition: render_distortion.c:396
void render_calc_time_warp_matrix(const struct xrt_pose *src_pose, const struct xrt_fov *src_fov, const struct xrt_pose *new_pose, struct xrt_matrix_4x4 *matrix)
Calculates a timewarp matrix which takes in NDC coords and gives out results in [-1,...
Definition: render_util.c:91
bool render_gfx_target_resources_init(struct render_gfx_target_resources *rtr, struct render_resources *r, struct render_gfx_render_pass *rgrp, VkImageView target, VkExtent2D extent)
Init a target resource struct, caller has to keep target alive until closed.
Definition: render_gfx.c:915
bool render_compute_end(struct render_compute *render)
Frees any unneeded resources and ends the command buffer so it can be used, also unlocks the vk_bundl...
Definition: render_compute.c:479
void render_calc_time_warp_projection(const struct xrt_fov *fov, struct xrt_matrix_4x4 *result)
Create a simplified projection matrix for timewarp.
Definition: render_util.c:127
#define RENDER_MAX_LAYERS
Max number of layers for layer squasher, can be different from XRT_MAX_LAYERS as the render module is...
Definition: render_interface.h:59
#define RENDER_DISTORTION_IMAGES_SIZE
How many distortion images we have, one for each channel (3 rgb) and per view.
Definition: render_interface.h:82
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:138
void render_gfx_target_resources_fini(struct render_gfx_target_resources *rtr)
Frees all resources held by the target, does not free the struct itself.
Definition: render_gfx.c:943
bool render_gfx_begin_target(struct render_gfx *render, struct render_gfx_target_resources *rtr, const VkClearColorValue *color)
This function allocates everything to start a single rendering.
Definition: render_gfx.c:1048
#define RENDER_MAX_IMAGES_SIZE
Max number of images that can be given at a single time to the layer squasher in a single dispatch.
Definition: render_interface.h:65
VkResult render_buffer_init(struct vk_bundle *vk, struct render_buffer *buffer, VkBufferUsageFlags usage_flags, VkMemoryPropertyFlags memory_property_flags, VkDeviceSize size)
Initialize a buffer.
Definition: render_buffer.c:118
bool render_gfx_begin(struct render_gfx *render)
Begins the rendering, takes the vk_bundle's pool lock and leaves it locked.
Definition: render_gfx.c:972
bool render_gfx_render_pass_init(struct render_gfx_render_pass *rgrp, struct render_resources *r, VkFormat format, VkAttachmentLoadOp load_op, VkImageLayout final_layout)
Creates all resources held by the render pass.
Definition: render_gfx.c:710
XRT_CHECK_RESULT VkResult render_gfx_layer_projection_alloc_and_write(struct render_gfx *render, const struct render_gfx_layer_projection_data *data, VkSampler src_sampler, VkImageView src_image_view, VkDescriptorSet *out_descriptor_set)
Allocate and write a UBO and descriptor_set to be used for projection layer rendering,...
Definition: render_gfx.c:1293
XRT_CHECK_RESULT VkResult render_gfx_layer_quad_alloc_and_write(struct render_gfx *render, const struct render_gfx_layer_quad_data *data, VkSampler src_sampler, VkImageView src_image_view, VkDescriptorSet *out_descriptor_set)
Allocate and write a UBO and descriptor_set to be used for quad layer rendering, the content of data ...
Definition: render_gfx.c:1315
void render_gfx_layer_projection(struct render_gfx *render, bool premultiplied_alpha, VkDescriptorSet descriptor_set)
Dispatch a projection layer shader into the current target and view.
Definition: render_gfx.c:1377
void render_resources_fini(struct render_resources *r)
Free all pools and static resources, does not free the struct itself.
Definition: render_resources.c:1084
bool render_compute_begin(struct render_compute *render)
Begin the compute command buffer building, takes the vk_bundle's pool lock and leaves it locked.
Definition: render_compute.c:445
bool render_compute_init(struct render_compute *render, struct render_resources *r)
Init struct and create resources needed for compute rendering.
Definition: render_compute.c:412
bool render_shaders_load(struct render_shaders *s, struct vk_bundle *vk)
Loads all of the shaders that the compositor uses.
Definition: render_shaders.c:102
void render_scratch_images_fini(struct render_resources *r, struct render_scratch_images *rsi)
Close all resources on the given render_scratch_images.
Definition: render_resources.c:1279
void render_gfx_end_target(struct render_gfx *render)
Definition: render_gfx.c:1074
void render_buffer_unmap(struct vk_bundle *vk, struct render_buffer *buffer)
Unmaps the memory.
Definition: render_buffer.c:200
bool render_resources_get_duration(struct render_resources *r, uint64_t *out_gpu_duration_ns)
Returns the duration for the latest GPU work that was submitted using render_gfx or render_compute cm...
Definition: render_resources.c:1200
void render_compute_fini(struct render_compute *render)
Frees all resources held by the compute rendering, does not free the struct itself.
Definition: render_compute.c:497
bool render_gfx_init(struct render_gfx *render, struct render_resources *r)
Init struct and create resources needed for rendering.
Definition: render_gfx.c:960
void render_gfx_render_pass_fini(struct render_gfx_render_pass *rgrp)
Frees all resources held by the render pass, does not free the struct itself.
Definition: render_gfx.c:887
void render_sub_alloc_tracker_init(struct render_sub_alloc_tracker *rsat, struct render_buffer *buffer)
Init a render_sub_alloc_tracker struct from a render_buffer, the caller is responsible for keeping bu...
Definition: render_sub_alloc.c:29
VkResult render_buffer_init_exportable(struct vk_bundle *vk, struct render_buffer *buffer, VkBufferUsageFlags usage_flags, VkMemoryPropertyFlags memory_property_flags, VkDeviceSize size)
Initialize a buffer, making it exportable.
Definition: render_buffer.c:144
XRT_CHECK_RESULT VkResult render_gfx_mesh_alloc_and_write(struct render_gfx *render, const struct render_gfx_mesh_ubo_data *data, VkSampler src_sampler, VkImageView src_image_view, VkDescriptorSet *out_descriptor_set)
Allocate needed resources for one mesh shader dispatch, will also update the descriptor set,...
Definition: render_gfx.c:1144
void render_gfx_layer_cylinder(struct render_gfx *render, bool premultiplied_alpha, VkDescriptorSet descriptor_set)
Dispatch a cylinder layer shader into the current target and view.
Definition: render_gfx.c:1337
bool render_distortion_images_ensure(struct render_resources *r, struct vk_bundle *vk, struct xrt_device *xdev, bool pre_rotate)
Creates or recreates the compute distortion textures if necessary.
Definition: render_distortion.c:408
VkResult render_buffer_map(struct vk_bundle *vk, struct render_buffer *buffer)
Maps the memory, sets render_buffer::mapped to the memory.
Definition: render_buffer.c:189
void render_gfx_layer_quad(struct render_gfx *render, bool premultiplied_alpha, VkDescriptorSet descriptor_set)
Dispatch a quad layer shader into the current target and view.
Definition: render_gfx.c:1393
void render_compute_layers(struct render_compute *render, VkDescriptorSet descriptor_set, VkBuffer ubo, VkSampler src_samplers[((XRT_MAX_LAYERS) *XRT_MAX_VIEWS)], VkImageView src_image_views[((XRT_MAX_LAYERS) *XRT_MAX_VIEWS)], uint32_t num_srcs, VkImageView target_image_view, const struct render_viewport_data *view, bool timewarp)
Updates the given descriptor_set and dispatches the layer shader.
XRT_CHECK_RESULT VkResult render_sub_alloc_ubo_alloc_and_get_ptr(struct vk_bundle *vk, struct render_sub_alloc_tracker *rsat, VkDeviceSize size, void **out_ptr, struct render_sub_alloc *out_rsa)
Allocate enough memory (with constraints of UBOs) of size, return the pointer to the mapped memory or...
Definition: render_sub_alloc.c:38
XRT_CHECK_RESULT VkResult render_sub_alloc_ubo_alloc_and_write(struct vk_bundle *vk, struct render_sub_alloc_tracker *rsat, const void *ptr, VkDeviceSize size, struct render_sub_alloc *out_rsa)
Allocate enough memory (with constraints of UBOs) to hold the memory in ptr and copy that memory to t...
Definition: render_sub_alloc.c:84
bool render_scratch_images_ensure(struct render_resources *r, struct render_scratch_images *rsi, VkExtent2D extent)
Ensure that the scratch images are created and have the given extent.
Definition: render_resources.c:1245
void render_buffer_fini(struct vk_bundle *vk, struct render_buffer *buffer)
Frees all resources that this buffer has, but does not free the buffer itself.
Definition: render_buffer.c:181
Helper struct holding a buffer and its memory.
Definition: render_interface.h:191
VkDeviceSize alignment
Alignment of the buffer.
Definition: render_interface.h:205
VkDeviceSize allocation_size
Size of the memory allocation.
Definition: render_interface.h:202
VkDeviceMemory memory
Backing memory.
Definition: render_interface.h:193
VkBuffer buffer
Buffer.
Definition: render_interface.h:196
VkDeviceSize size
Size requested for the buffer.
Definition: render_interface.h:199
Push data that is sent to the blit shader.
Definition: render_interface.h:1194
UBO data that is sent to the compute distortion shaders.
Definition: render_interface.h:1311
UBO data that is sent to the compute layer shaders.
Definition: render_interface.h:1205
struct xrt_matrix_4x4 transforms_timewarp[(XRT_MAX_LAYERS)]
For projection layers.
Definition: render_interface.h:1278
struct render_compute_layer_ubo_data::@103 eq2_data[(XRT_MAX_LAYERS)]
For equirect2 layers.
struct render_compute_layer_ubo_data::@104 quad_position[(XRT_MAX_LAYERS)]
For quad layers.
struct xrt_matrix_4x4 mv_inverse[(XRT_MAX_LAYERS)]
Shared between cylinder and equirect2.
Definition: render_interface.h:1246
struct render_compute_layer_ubo_data::@102 cylinder_data[(XRT_MAX_LAYERS)]
For cylinder layer.
struct render_compute_layer_ubo_data::@101 image_info[(XRT_MAX_LAYERS)]
Which image/sampler(s) correspond to each layer.
uint32_t _padding0
Definition: render_interface.h:1226
struct render_compute_layer_ubo_data::@100 layer_data[(XRT_MAX_LAYERS)]
Corresponds to enum xrt_layer_type and unpremultiplied alpha.
struct render_compute_layer_ubo_data::@106 quad_extent[(XRT_MAX_LAYERS)]
Quad extent in world scale.
The semi-low level resources and operations required to squash layers and/or apply distortion for a s...
Definition: render_interface.h:1173
struct render_resources * r
Shared resources.
Definition: render_interface.h:1175
VkDescriptorSet shared_descriptor_set
Shared descriptor set, used for the clear and distortion shaders.
Definition: render_interface.h:1185
VkDescriptorSet layer_descriptor_sets[(XRT_MAX_VIEWS)]
Layer descriptor set.
Definition: render_interface.h:1178
UBO data that is sent to the layer cylinder shader.
Definition: render_interface.h:927
UBO data that is sent to the layer equirect2 shader.
Definition: render_interface.h:942
struct xrt_normalized_rect to_tangent
See render_calc_uv_to_tangent_lengths_rect.
Definition: render_interface.h:947
UBO data that is sent to the layer projection shader.
Definition: render_interface.h:961
UBO data that is sent to the layer quad shader.
Definition: render_interface.h:973
UBO data that is sent to the mesh shaders.
Definition: render_interface.h:912
A render pass, while not depending on a VkFramebuffer, does depend on the format of the target image(...
Definition: render_interface.h:713
VkPipeline pipeline
Pipeline layout used for mesh, without timewarp.
Definition: render_interface.h:734
VkFormat format
The format of the image(s) we are rendering to.
Definition: render_interface.h:717
VkSampleCountFlagBits sample_count
Sample count for this render pass.
Definition: render_interface.h:720
VkAttachmentLoadOp load_op
Load op used on the attachment(s).
Definition: render_interface.h:723
VkImageLayout final_layout
Final layout of the target image(s).
Definition: render_interface.h:726
VkRenderPass render_pass
Render pass used for rendering.
Definition: render_interface.h:729
VkPipeline pipeline_timewarp
Pipeline layout used for mesh, with timewarp.
Definition: render_interface.h:737
Each rendering (render_gfx) render to one or more targets (render_gfx_target_resources),...
Definition: render_interface.h:792
struct render_resources * r
Collections of static resources.
Definition: render_interface.h:794
struct render_gfx_render_pass * rgrp
Render pass.
Definition: render_interface.h:797
VkFramebuffer framebuffer
Framebuffer for this target, depends on given VkImageView.
Definition: render_interface.h:803
The low-level resources and operations to perform layer squashing and/or mesh distortion for a single...
Definition: render_interface.h:855
struct render_resources * r
Resources that we are based on.
Definition: render_interface.h:857
struct render_gfx_target_resources * rtr
The current target we are rendering to, can change during command building.
Definition: render_interface.h:863
struct render_sub_alloc_tracker ubo_tracker
Shared buffer that we sub-allocate UBOs from.
Definition: render_interface.h:860
Holds all pools and static resources for rendering.
Definition: render_interface.h:359
uint32_t target_binding
Writing the image out too.
Definition: render_interface.h:491
uint32_t ubo_binding
The binding index for the UBO.
Definition: render_interface.h:444
VkCommandBuffer cmd
Command buffer for recording everything.
Definition: render_interface.h:394
uint32_t image_array_size
Size of combined image sampler array.
Definition: render_interface.h:511
uint32_t view_count
The count of views that we are rendering to.
Definition: render_interface.h:361
struct render_buffer ubos[XRT_MAX_VIEWS]
Info UBOs.
Definition: render_interface.h:462
struct vk_bundle * vk
Vulkan resources.
Definition: render_interface.h:364
VkSampler clamp_to_border_black
Sampler that clamps color samples to black in all directions.
Definition: render_interface.h:408
bool pre_rotated
Whether distortion images have been pre-rotated 90 degrees.
Definition: render_interface.h:562
VkPipeline non_timewarp_pipeline
Doesn't depend on target so is static.
Definition: render_interface.h:505
struct render_shaders * shaders
All shaders loaded.
Definition: render_interface.h:371
struct render_buffer shared_ubo
Shared UBO buffer that we sub-allocate out of, this is to have fewer buffers that the kernel needs to...
Definition: render_interface.h:423
VkDescriptorSetLayout descriptor_set_layout
For projection and quad layer.
Definition: render_interface.h:430
struct xrt_normalized_rect uv_to_tanangle[XRT_MAX_VIEWS]
Transform to go from UV to tangle angles.
Definition: render_interface.h:550
VkPipeline timewarp_pipeline
Doesn't depend on target so is static.
Definition: render_interface.h:508
VkPipeline pipeline
Doesn't depend on target so is static.
Definition: render_interface.h:526
VkImage images[(3 *XRT_MAX_VIEWS)]
Distortion images.
Definition: render_interface.h:556
VkDescriptorPool ubo_and_src_descriptor_pool
Pool for shaders that uses one ubo and sampler.
Definition: render_interface.h:414
struct vk_cmd_pool distortion_pool
Pool used for distortion image uploads.
Definition: render_interface.h:379
VkSampler repeat
Sampler that repeats the texture in all directions.
Definition: render_interface.h:402
uint32_t src_binding
The binding index for the source texture.
Definition: render_interface.h:441
VkDeviceMemory device_memories[(3 *XRT_MAX_VIEWS)]
Backing memory to distortion images.
Definition: render_interface.h:553
VkSampler mock
Sampler for mock/null images.
Definition: render_interface.h:399
VkSampler clamp_to_edge
Sampler that clamps the coordinates to the edge in all directions.
Definition: render_interface.h:405
struct render_buffer ubo
Target info.
Definition: render_interface.h:532
uint32_t distortion_binding
Image storing the distortion.
Definition: render_interface.h:488
VkPipelineLayout pipeline_layout
For projection and quad layer.
Definition: render_interface.h:433
VkDescriptorPool descriptor_pool
Descriptor pool for compute work.
Definition: render_interface.h:482
VkPipelineCache pipeline_cache
Shared for all rendering.
Definition: render_interface.h:382
VkImageView image_views[(3 *XRT_MAX_VIEWS)]
The views into the distortion images.
Definition: render_interface.h:559
Small helper struct to hold a scratch image, intended to be used with the compute pipeline where both...
Definition: render_interface.h:650
Helper struct to hold scratch images.
Definition: render_interface.h:661
Holds all shaders.
Definition: render_interface.h:143
A per-frame tracker of sub-allocation out of a buffer, used to reduce the number of UBO objects we ne...
Definition: render_interface.h:301
void * mapped
Start of memory, if buffer was mapped with initialised.
Definition: render_interface.h:309
VkBuffer buffer
The buffer to allocate from, it is the caller's responsibility to keep it alive for as long as the su...
Definition: render_interface.h:306
VkDeviceSize used
Currently used memory.
Definition: render_interface.h:315
VkDeviceSize total_size
Total size of buffer.
Definition: render_interface.h:312
Per frame sub-allocation into a buffer, used to reduce the number of UBO objects we need to create.
Definition: render_interface.h:276
VkDeviceSize size
Size of sub-allocation.
Definition: render_interface.h:284
VkBuffer buffer
The buffer this is allocated from, it is the caller's responsibility to keep it alive for as long as ...
Definition: render_interface.h:281
VkDeviceSize offset
Offset into buffer.
Definition: render_interface.h:287
The pure data information about a view that the renderer is rendering to.
Definition: render_interface.h:694
A bundle of Vulkan functions and objects, used by both Compositor and Compositor client code.
Definition: vk_helpers.h:78
Small helper to manage lock around a command pool.
Definition: vk_cmd_pool.h:33
A single HMD or input device.
Definition: xrt_device.h:284
Describes a projection matrix fov.
Definition: xrt_defines.h:499
A tightly packed 2x2 matrix of floats.
Definition: xrt_defines.h:526
A tightly packed 4x4 matrix of floats.
Definition: xrt_defines.h:573
Normalized image rectangle, coordinates and size in 0 .
Definition: xrt_defines.h:467
A pose composed of a position and orientation.
Definition: xrt_defines.h:479
Image rectangle.
Definition: xrt_defines.h:444
A 2 element vector with single floats.
Definition: xrt_defines.h:268
A 3 element vector with single floats.
Definition: xrt_defines.h:289
Common Vulkan code header.
Header holding common defines.
Common defines and enums for XRT.