53#define RENDER_ALWAYS_SAFE_UBO_ALIGNMENT (256)
59#define RENDER_MAX_LAYERS (XRT_MAX_LAYERS)
65#define RENDER_CS_MAX_SAMPLERS_PER_VIEW 2
71#define RENDER_MAX_IMAGES_SIZE (RENDER_MAX_LAYERS * RENDER_CS_MAX_SAMPLERS_PER_VIEW)
80#define RENDER_MAX_LAYER_RUNS_SIZE (XRT_MAX_VIEWS)
81#define RENDER_MAX_LAYER_RUNS_COUNT(RENDER_RESOURCES) (RENDER_RESOURCES->view_count)
84#define RENDER_DISTORTION_IMAGE_DIMENSIONS (128)
87#define RENDER_DISTORTION_IMAGES_SIZE (3 * XRT_MAX_VIEWS)
88#define RENDER_DISTORTION_IMAGES_COUNT(RENDER_RESOURCES) (3 * RENDER_RESOURCES->view_count)
91#define RENDER_BINDING_LAYER_SHARED_UBO 0
94#define RENDER_BINDING_LAYER_SHARED_SRC 1
100#define RENDER_CS_MAX_SAMPLERS_PER_VIEW 2
167 VkShaderModule blit_comp;
168 VkShaderModule clear_comp;
169 VkShaderModule layer_comp;
170 VkShaderModule distortion_comp;
172 VkShaderModule mesh_vert;
173 VkShaderModule mesh_frag;
180 VkShaderModule layer_cylinder_vert;
181 VkShaderModule layer_cylinder_frag;
183 VkShaderModule layer_equirect2_vert;
184 VkShaderModule layer_equirect2_frag;
186 VkShaderModule layer_projection_vert;
187 VkShaderModule layer_quad_vert;
188 VkShaderModule layer_shared_frag;
239 VkBufferUsageFlags usage_flags,
240 VkMemoryPropertyFlags memory_property_flags,
249 VkBufferUsageFlags usage_flags,
250 VkMemoryPropertyFlags memory_property_flags,
353XRT_CHECK_RESULT VkResult
364XRT_CHECK_RESULT VkResult
407 VkCommandPool cmd_pool;
409 VkQueryPool query_pool;
478 uint32_t vertex_count;
479 uint32_t index_counts[XRT_MAX_VIEWS];
481 uint32_t index_offsets[XRT_MAX_VIEWS];
482 uint32_t index_count_total;
497 VkImageView image_view;
674 VkDeviceMemory device_memory;
676 VkImageView srgb_view;
677 VkImageView unorm_view;
765 VkPipeline cylinder_premultiplied_alpha;
766 VkPipeline cylinder_unpremultiplied_alpha;
768 VkPipeline equirect2_premultiplied_alpha;
769 VkPipeline equirect2_unpremultiplied_alpha;
771 VkPipeline proj_premultiplied_alpha;
772 VkPipeline proj_unpremultiplied_alpha;
774 VkPipeline quad_premultiplied_alpha;
775 VkPipeline quad_unpremultiplied_alpha;
788 VkAttachmentLoadOp load_op,
789 VkImageLayout final_layout);
973 float central_horizontal_angle;
974 float upper_vertical_angle;
975 float lower_vertical_angle;
1016XRT_CHECK_RESULT VkResult
1019 VkSampler src_sampler,
1020 VkImageView src_image_view,
1021 VkDescriptorSet *out_descriptor_set);
1029XRT_CHECK_RESULT VkResult
1032 VkSampler src_sampler,
1033 VkImageView src_image_view,
1034 VkDescriptorSet *out_descriptor_set);
1042XRT_CHECK_RESULT VkResult
1045 VkSampler src_sampler,
1046 VkImageView src_image_view,
1047 VkDescriptorSet *out_descriptor_set);
1055XRT_CHECK_RESULT VkResult
1058 VkSampler src_sampler,
1059 VkImageView src_image_view,
1060 VkDescriptorSet *out_descriptor_set);
1068XRT_CHECK_RESULT VkResult
1071 VkSampler src_sampler,
1072 VkImageView src_image_view,
1073 VkDescriptorSet *out_descriptor_set);
1095 const VkClearColorValue *color);
1234 uint32_t padding[3];
1247 uint32_t layer_type;
1248 uint32_t unpremultiplied_alpha;
1260 uint32_t color_image_index;
1261 uint32_t depth_image_index;
1278 float central_angle;
1290 float central_horizontal_angle;
1291 float upper_vertical_angle;
1292 float lower_vertical_angle;
1324 float padding[XRT_MAX_VIEWS];
1338 struct xrt_matrix_4x4 transform_timewarp_scanout_begin[XRT_MAX_VIEWS];
1339 struct xrt_matrix_4x4 transform_timewarp_scanout_end[XRT_MAX_VIEWS];
1390 VkDescriptorSet descriptor_set,
1395 VkImageView target_image_view,
1404 VkSampler src_samplers[XRT_MAX_VIEWS],
1405 VkImageView src_image_views[XRT_MAX_VIEWS],
1407 const struct xrt_pose src_poses[XRT_MAX_VIEWS],
1408 const struct xrt_fov src_fovs[XRT_MAX_VIEWS],
1409 const struct xrt_pose new_poses_scanout_begin[XRT_MAX_VIEWS],
1410 const struct xrt_pose new_poses_scanout_end[XRT_MAX_VIEWS],
1411 VkImage target_image,
1412 VkImageView target_image_view,
1419render_compute_projection_scanout_compensation(
struct render_compute *render,
1420 VkSampler src_samplers[XRT_MAX_VIEWS],
1421 VkImageView src_image_views[XRT_MAX_VIEWS],
1423 const struct xrt_fov src_fovs[XRT_MAX_VIEWS],
1424 const struct xrt_pose new_poses_scanout_begin[XRT_MAX_VIEWS],
1425 const struct xrt_pose new_poses_scanout_end[XRT_MAX_VIEWS],
1426 VkImage target_image,
1427 VkImageView target_image_view,
1434render_compute_projection_no_timewarp(
struct render_compute *render,
1435 VkSampler src_samplers[XRT_MAX_VIEWS],
1436 VkImageView src_image_views[XRT_MAX_VIEWS],
1438 VkImage target_image,
1439 VkImageView target_image_view,
1447 VkImage target_image,
1448 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:80
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:140
void render_compute_layers(struct render_compute *render, VkDescriptorSet descriptor_set, VkBuffer ubo, VkSampler src_samplers[((XRT_MAX_LAYERS) *2)], VkImageView src_image_views[((XRT_MAX_LAYERS) *2)], 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.
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:176
#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:87
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:187
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:71
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
uint32_t render_max_layers_capable(const struct vk_bundle *vk, bool use_compute, uint32_t desired_max_layers)
Determines the maximum number of compositor layers supported based on Vulkan device limits and the co...
Definition: render_util.c:91
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
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:214
VkDeviceSize alignment
Alignment of the buffer.
Definition: render_interface.h:228
VkDeviceSize allocation_size
Size of the memory allocation.
Definition: render_interface.h:225
VkDeviceMemory memory
Backing memory.
Definition: render_interface.h:216
VkBuffer buffer
Buffer.
Definition: render_interface.h:219
VkDeviceSize size
Size requested for the buffer.
Definition: render_interface.h:222
Push data that is sent to the blit shader.
Definition: render_interface.h:1217
UBO data that is sent to the compute distortion shaders.
Definition: render_interface.h:1334
UBO data that is sent to the compute layer shaders.
Definition: render_interface.h:1228
struct xrt_matrix_4x4 transforms_timewarp[(XRT_MAX_LAYERS)]
For projection layers.
Definition: render_interface.h:1301
struct render_compute_layer_ubo_data::@101 layer_data[(XRT_MAX_LAYERS)]
Corresponds to enum xrt_layer_type and unpremultiplied alpha.
struct render_compute_layer_ubo_data::@104 eq2_data[(XRT_MAX_LAYERS)]
For equirect2 layers.
struct render_compute_layer_ubo_data::@105 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:1269
struct render_compute_layer_ubo_data::@102 image_info[(XRT_MAX_LAYERS)]
Which image/sampler(s) correspond to each layer.
struct render_compute_layer_ubo_data::@107 quad_extent[(XRT_MAX_LAYERS)]
Quad extent in world scale.
uint32_t _padding0
Definition: render_interface.h:1249
struct render_compute_layer_ubo_data::@103 cylinder_data[(XRT_MAX_LAYERS)]
For cylinder layer.
The semi-low level resources and operations required to squash layers and/or apply distortion for a s...
Definition: render_interface.h:1196
struct render_resources * r
Shared resources.
Definition: render_interface.h:1198
VkDescriptorSet shared_descriptor_set
Shared descriptor set, used for the clear and distortion shaders.
Definition: render_interface.h:1208
VkDescriptorSet layer_descriptor_sets[(XRT_MAX_VIEWS)]
Layer descriptor set.
Definition: render_interface.h:1201
UBO data that is sent to the layer cylinder shader.
Definition: render_interface.h:950
UBO data that is sent to the layer equirect2 shader.
Definition: render_interface.h:965
struct xrt_normalized_rect to_tangent
See render_calc_uv_to_tangent_lengths_rect.
Definition: render_interface.h:970
UBO data that is sent to the layer projection shader.
Definition: render_interface.h:984
UBO data that is sent to the layer quad shader.
Definition: render_interface.h:996
UBO data that is sent to the mesh shaders.
Definition: render_interface.h:935
A render pass, while not depending on a VkFramebuffer, does depend on the format of the target image(...
Definition: render_interface.h:736
VkPipeline pipeline
Pipeline layout used for mesh, without timewarp.
Definition: render_interface.h:757
VkFormat format
The format of the image(s) we are rendering to.
Definition: render_interface.h:740
VkSampleCountFlagBits sample_count
Sample count for this render pass.
Definition: render_interface.h:743
VkAttachmentLoadOp load_op
Load op used on the attachment(s).
Definition: render_interface.h:746
VkImageLayout final_layout
Final layout of the target image(s).
Definition: render_interface.h:749
VkRenderPass render_pass
Render pass used for rendering.
Definition: render_interface.h:752
VkPipeline pipeline_timewarp
Pipeline layout used for mesh, with timewarp.
Definition: render_interface.h:760
Each rendering (render_gfx) render to one or more targets (render_gfx_target_resources),...
Definition: render_interface.h:815
struct render_resources * r
Collections of static resources.
Definition: render_interface.h:817
struct render_gfx_render_pass * rgrp
Render pass.
Definition: render_interface.h:820
VkFramebuffer framebuffer
Framebuffer for this target, depends on given VkImageView.
Definition: render_interface.h:826
The low-level resources and operations to perform layer squashing and/or mesh distortion for a single...
Definition: render_interface.h:878
struct render_resources * r
Resources that we are based on.
Definition: render_interface.h:880
struct render_gfx_target_resources * rtr
The current target we are rendering to, can change during command building.
Definition: render_interface.h:886
struct render_sub_alloc_tracker ubo_tracker
Shared buffer that we sub-allocate UBOs from.
Definition: render_interface.h:883
Holds all pools and static resources for rendering.
Definition: render_interface.h:382
uint32_t target_binding
Writing the image out too.
Definition: render_interface.h:514
uint32_t ubo_binding
The binding index for the UBO.
Definition: render_interface.h:467
VkCommandBuffer cmd
Command buffer for recording everything.
Definition: render_interface.h:417
uint32_t image_array_size
Size of combined image sampler array.
Definition: render_interface.h:534
uint32_t view_count
The count of views that we are rendering to.
Definition: render_interface.h:384
struct render_buffer ubos[XRT_MAX_VIEWS]
Info UBOs.
Definition: render_interface.h:485
struct vk_bundle * vk
Vulkan resources.
Definition: render_interface.h:387
VkSampler clamp_to_border_black
Sampler that clamps color samples to black in all directions.
Definition: render_interface.h:431
bool pre_rotated
Whether distortion images have been pre-rotated 90 degrees.
Definition: render_interface.h:585
VkPipeline non_timewarp_pipeline
Doesn't depend on target so is static.
Definition: render_interface.h:528
struct render_shaders * shaders
All shaders loaded.
Definition: render_interface.h:394
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:446
VkDescriptorSetLayout descriptor_set_layout
For projection and quad layer.
Definition: render_interface.h:453
struct xrt_normalized_rect uv_to_tanangle[XRT_MAX_VIEWS]
Transform to go from UV to tangle angles.
Definition: render_interface.h:573
VkPipeline timewarp_pipeline
Doesn't depend on target so is static.
Definition: render_interface.h:531
VkPipeline pipeline
Doesn't depend on target so is static.
Definition: render_interface.h:549
VkImage images[(3 *XRT_MAX_VIEWS)]
Distortion images.
Definition: render_interface.h:579
VkDescriptorPool ubo_and_src_descriptor_pool
Pool for shaders that uses one ubo and sampler.
Definition: render_interface.h:437
struct vk_cmd_pool distortion_pool
Pool used for distortion image uploads.
Definition: render_interface.h:402
VkSampler repeat
Sampler that repeats the texture in all directions.
Definition: render_interface.h:425
uint32_t src_binding
The binding index for the source texture.
Definition: render_interface.h:464
VkDeviceMemory device_memories[(3 *XRT_MAX_VIEWS)]
Backing memory to distortion images.
Definition: render_interface.h:576
VkSampler mock
Sampler for mock/null images.
Definition: render_interface.h:422
VkSampler clamp_to_edge
Sampler that clamps the coordinates to the edge in all directions.
Definition: render_interface.h:428
struct render_buffer ubo
Target info.
Definition: render_interface.h:555
uint32_t distortion_binding
Image storing the distortion.
Definition: render_interface.h:511
VkPipelineLayout pipeline_layout
For projection and quad layer.
Definition: render_interface.h:456
VkDescriptorPool descriptor_pool
Descriptor pool for compute work.
Definition: render_interface.h:505
VkPipelineCache pipeline_cache
Shared for all rendering.
Definition: render_interface.h:405
VkImageView image_views[(3 *XRT_MAX_VIEWS)]
The views into the distortion images.
Definition: render_interface.h:582
Small helper struct to hold a scratch image, intended to be used with the compute pipeline where both...
Definition: render_interface.h:673
Helper struct to hold scratch images.
Definition: render_interface.h:684
Holds all shaders.
Definition: render_interface.h:166
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:324
void * mapped
Start of memory, if buffer was mapped with initialised.
Definition: render_interface.h:332
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:329
VkDeviceSize used
Currently used memory.
Definition: render_interface.h:338
VkDeviceSize total_size
Total size of buffer.
Definition: render_interface.h:335
Per frame sub-allocation into a buffer, used to reduce the number of UBO objects we need to create.
Definition: render_interface.h:299
VkDeviceSize size
Size of sub-allocation.
Definition: render_interface.h:307
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:304
VkDeviceSize offset
Offset into buffer.
Definition: render_interface.h:310
The pure data information about a view that the renderer is rendering to.
Definition: render_interface.h:717
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:309
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.