55#define RENDER_ALWAYS_SAFE_UBO_ALIGNMENT (256)
61#define RENDER_MAX_LAYERS (XRT_MAX_LAYERS)
67#define RENDER_CS_MAX_SAMPLERS_PER_VIEW 2
73#define RENDER_MAX_IMAGES_SIZE (RENDER_MAX_LAYERS * RENDER_CS_MAX_SAMPLERS_PER_VIEW)
82#define RENDER_MAX_LAYER_RUNS_SIZE (XRT_MAX_VIEWS)
83#define RENDER_MAX_LAYER_RUNS_COUNT(RENDER_RESOURCES) (RENDER_RESOURCES->view_count)
86#define RENDER_DISTORTION_IMAGE_DIMENSIONS (128)
89#define RENDER_DISTORTION_IMAGES_SIZE (3 * XRT_MAX_VIEWS)
90#define RENDER_DISTORTION_IMAGES_COUNT(RENDER_RESOURCES) (3 * RENDER_RESOURCES->view_count)
93#define RENDER_BINDING_LAYER_SHARED_UBO 0
96#define RENDER_BINDING_LAYER_SHARED_SRC 1
102#define RENDER_CS_MAX_SAMPLERS_PER_VIEW 2
193 VkBufferUsageFlags usage_flags,
194 VkMemoryPropertyFlags memory_property_flags,
203 VkBufferUsageFlags usage_flags,
204 VkMemoryPropertyFlags memory_property_flags,
307XRT_CHECK_RESULT VkResult
318XRT_CHECK_RESULT VkResult
361 VkCommandPool cmd_pool;
363 VkQueryPool query_pool;
432 uint32_t vertex_count;
433 uint32_t index_counts[XRT_MAX_VIEWS];
435 uint32_t index_offsets[XRT_MAX_VIEWS];
436 uint32_t index_count_total;
451 VkImageView image_view;
628 VkDeviceMemory device_memory;
630 VkImageView srgb_view;
631 VkImageView unorm_view;
719 VkPipeline cylinder_premultiplied_alpha;
720 VkPipeline cylinder_unpremultiplied_alpha;
722 VkPipeline equirect2_premultiplied_alpha;
723 VkPipeline equirect2_unpremultiplied_alpha;
725 VkPipeline proj_premultiplied_alpha;
726 VkPipeline proj_unpremultiplied_alpha;
728 VkPipeline quad_premultiplied_alpha;
729 VkPipeline quad_unpremultiplied_alpha;
742 VkAttachmentLoadOp load_op,
743 VkImageLayout final_layout);
927 float central_horizontal_angle;
928 float upper_vertical_angle;
929 float lower_vertical_angle;
970XRT_CHECK_RESULT VkResult
973 VkSampler src_sampler,
974 VkImageView src_image_view,
975 VkDescriptorSet *out_descriptor_set);
983XRT_CHECK_RESULT VkResult
986 VkSampler src_sampler,
987 VkImageView src_image_view,
988 VkDescriptorSet *out_descriptor_set);
996XRT_CHECK_RESULT VkResult
999 VkSampler src_sampler,
1000 VkImageView src_image_view,
1001 VkDescriptorSet *out_descriptor_set);
1009XRT_CHECK_RESULT VkResult
1012 VkSampler src_sampler,
1013 VkImageView src_image_view,
1014 VkDescriptorSet *out_descriptor_set);
1022XRT_CHECK_RESULT VkResult
1025 VkSampler src_sampler,
1026 VkImageView src_image_view,
1027 VkDescriptorSet *out_descriptor_set);
1049 const VkClearColorValue *color);
1188 uint32_t padding[3];
1201 uint32_t layer_type;
1202 uint32_t unpremultiplied_alpha;
1214 uint32_t color_image_index;
1215 uint32_t depth_image_index;
1232 float central_angle;
1244 float central_horizontal_angle;
1245 float upper_vertical_angle;
1246 float lower_vertical_angle;
1278 float padding[XRT_MAX_VIEWS];
1292 struct xrt_matrix_4x4 transform_timewarp_scanout_begin[XRT_MAX_VIEWS];
1293 struct xrt_matrix_4x4 transform_timewarp_scanout_end[XRT_MAX_VIEWS];
1344 VkDescriptorSet descriptor_set,
1349 VkImageView target_image_view,
1358 VkSampler src_samplers[XRT_MAX_VIEWS],
1359 VkImageView src_image_views[XRT_MAX_VIEWS],
1361 const struct xrt_pose src_poses[XRT_MAX_VIEWS],
1362 const struct xrt_fov src_fovs[XRT_MAX_VIEWS],
1363 const struct xrt_pose new_poses_scanout_begin[XRT_MAX_VIEWS],
1364 const struct xrt_pose new_poses_scanout_end[XRT_MAX_VIEWS],
1365 VkImage target_image,
1366 VkImageView target_image_view,
1373render_compute_projection_scanout_compensation(
struct render_compute *render,
1374 VkSampler src_samplers[XRT_MAX_VIEWS],
1375 VkImageView src_image_views[XRT_MAX_VIEWS],
1377 const struct xrt_fov src_fovs[XRT_MAX_VIEWS],
1378 const struct xrt_pose new_poses_scanout_begin[XRT_MAX_VIEWS],
1379 const struct xrt_pose new_poses_scanout_end[XRT_MAX_VIEWS],
1380 VkImage target_image,
1381 VkImageView target_image_view,
1388render_compute_projection_no_timewarp(
struct render_compute *render,
1389 VkSampler src_samplers[XRT_MAX_VIEWS],
1390 VkImageView src_image_views[XRT_MAX_VIEWS],
1392 VkImage target_image,
1393 VkImageView target_image_view,
1401 VkImage target_image,
1402 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:82
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
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:61
#define RENDER_DISTORTION_IMAGES_SIZE
How many distortion images we have, one for each channel (3 rgb) and per view.
Definition: render_interface.h:89
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:73
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
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
Shader loading interface.
Helper struct holding a buffer and its memory.
Definition: render_interface.h:168
VkDeviceSize alignment
Alignment of the buffer.
Definition: render_interface.h:182
VkDeviceSize allocation_size
Size of the memory allocation.
Definition: render_interface.h:179
VkDeviceMemory memory
Backing memory.
Definition: render_interface.h:170
VkBuffer buffer
Buffer.
Definition: render_interface.h:173
VkDeviceSize size
Size requested for the buffer.
Definition: render_interface.h:176
Push data that is sent to the blit shader.
Definition: render_interface.h:1171
UBO data that is sent to the compute distortion shaders.
Definition: render_interface.h:1288
UBO data that is sent to the compute layer shaders.
Definition: render_interface.h:1182
struct xrt_matrix_4x4 transforms_timewarp[(XRT_MAX_LAYERS)]
For projection layers.
Definition: render_interface.h:1255
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:1223
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:1203
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:1150
struct render_resources * r
Shared resources.
Definition: render_interface.h:1152
VkDescriptorSet shared_descriptor_set
Shared descriptor set, used for the clear and distortion shaders.
Definition: render_interface.h:1162
VkDescriptorSet layer_descriptor_sets[(XRT_MAX_VIEWS)]
Layer descriptor set.
Definition: render_interface.h:1155
UBO data that is sent to the layer cylinder shader.
Definition: render_interface.h:904
UBO data that is sent to the layer equirect2 shader.
Definition: render_interface.h:919
struct xrt_normalized_rect to_tangent
See render_calc_uv_to_tangent_lengths_rect.
Definition: render_interface.h:924
UBO data that is sent to the layer projection shader.
Definition: render_interface.h:938
UBO data that is sent to the layer quad shader.
Definition: render_interface.h:950
UBO data that is sent to the mesh shaders.
Definition: render_interface.h:889
A render pass, while not depending on a VkFramebuffer, does depend on the format of the target image(...
Definition: render_interface.h:690
VkPipeline pipeline
Pipeline layout used for mesh, without timewarp.
Definition: render_interface.h:711
VkFormat format
The format of the image(s) we are rendering to.
Definition: render_interface.h:694
VkSampleCountFlagBits sample_count
Sample count for this render pass.
Definition: render_interface.h:697
VkAttachmentLoadOp load_op
Load op used on the attachment(s).
Definition: render_interface.h:700
VkImageLayout final_layout
Final layout of the target image(s).
Definition: render_interface.h:703
VkRenderPass render_pass
Render pass used for rendering.
Definition: render_interface.h:706
VkPipeline pipeline_timewarp
Pipeline layout used for mesh, with timewarp.
Definition: render_interface.h:714
Each rendering (render_gfx) render to one or more targets (render_gfx_target_resources),...
Definition: render_interface.h:769
struct render_resources * r
Collections of static resources.
Definition: render_interface.h:771
struct render_gfx_render_pass * rgrp
Render pass.
Definition: render_interface.h:774
VkFramebuffer framebuffer
Framebuffer for this target, depends on given VkImageView.
Definition: render_interface.h:780
The low-level resources and operations to perform layer squashing and/or mesh distortion for a single...
Definition: render_interface.h:832
struct render_resources * r
Resources that we are based on.
Definition: render_interface.h:834
struct render_gfx_target_resources * rtr
The current target we are rendering to, can change during command building.
Definition: render_interface.h:840
struct render_sub_alloc_tracker ubo_tracker
Shared buffer that we sub-allocate UBOs from.
Definition: render_interface.h:837
Holds all pools and static resources for rendering.
Definition: render_interface.h:336
uint32_t target_binding
Writing the image out too.
Definition: render_interface.h:468
uint32_t ubo_binding
The binding index for the UBO.
Definition: render_interface.h:421
VkCommandBuffer cmd
Command buffer for recording everything.
Definition: render_interface.h:371
uint32_t image_array_size
Size of combined image sampler array.
Definition: render_interface.h:488
uint32_t view_count
The count of views that we are rendering to.
Definition: render_interface.h:338
struct render_buffer ubos[XRT_MAX_VIEWS]
Info UBOs.
Definition: render_interface.h:439
struct vk_bundle * vk
Vulkan resources.
Definition: render_interface.h:341
VkSampler clamp_to_border_black
Sampler that clamps color samples to black in all directions.
Definition: render_interface.h:385
bool pre_rotated
Whether distortion images have been pre-rotated 90 degrees.
Definition: render_interface.h:539
VkPipeline non_timewarp_pipeline
Doesn't depend on target so is static.
Definition: render_interface.h:482
struct render_shaders * shaders
All shaders loaded.
Definition: render_interface.h:348
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:400
VkDescriptorSetLayout descriptor_set_layout
For projection and quad layer.
Definition: render_interface.h:407
struct xrt_normalized_rect uv_to_tanangle[XRT_MAX_VIEWS]
Transform to go from UV to tangle angles.
Definition: render_interface.h:527
VkPipeline timewarp_pipeline
Doesn't depend on target so is static.
Definition: render_interface.h:485
VkPipeline pipeline
Doesn't depend on target so is static.
Definition: render_interface.h:503
VkImage images[(3 *XRT_MAX_VIEWS)]
Distortion images.
Definition: render_interface.h:533
VkDescriptorPool ubo_and_src_descriptor_pool
Pool for shaders that uses one ubo and sampler.
Definition: render_interface.h:391
struct vk_cmd_pool distortion_pool
Pool used for distortion image uploads.
Definition: render_interface.h:356
VkSampler repeat
Sampler that repeats the texture in all directions.
Definition: render_interface.h:379
uint32_t src_binding
The binding index for the source texture.
Definition: render_interface.h:418
VkDeviceMemory device_memories[(3 *XRT_MAX_VIEWS)]
Backing memory to distortion images.
Definition: render_interface.h:530
VkSampler mock
Sampler for mock/null images.
Definition: render_interface.h:376
VkSampler clamp_to_edge
Sampler that clamps the coordinates to the edge in all directions.
Definition: render_interface.h:382
struct render_buffer ubo
Target info.
Definition: render_interface.h:509
uint32_t distortion_binding
Image storing the distortion.
Definition: render_interface.h:465
VkPipelineLayout pipeline_layout
For projection and quad layer.
Definition: render_interface.h:410
VkDescriptorPool descriptor_pool
Descriptor pool for compute work.
Definition: render_interface.h:459
VkPipelineCache pipeline_cache
Shared for all rendering.
Definition: render_interface.h:359
VkImageView image_views[(3 *XRT_MAX_VIEWS)]
The views into the distortion images.
Definition: render_interface.h:536
Small helper struct to hold a scratch image, intended to be used with the compute pipeline where both...
Definition: render_interface.h:627
Helper struct to hold scratch images.
Definition: render_interface.h:638
Holds all shaders.
Definition: render_shaders_interface.h:26
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:278
void * mapped
Start of memory, if buffer was mapped with initialised.
Definition: render_interface.h:286
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:283
VkDeviceSize used
Currently used memory.
Definition: render_interface.h:292
VkDeviceSize total_size
Total size of buffer.
Definition: render_interface.h:289
Per frame sub-allocation into a buffer, used to reduce the number of UBO objects we need to create.
Definition: render_interface.h:253
VkDeviceSize size
Size of sub-allocation.
Definition: render_interface.h:261
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:258
VkDeviceSize offset
Offset into buffer.
Definition: render_interface.h:264
The pure data information about a view that the renderer is rendering to.
Definition: render_interface.h:671
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:310
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.