Monado OpenXR Runtime
|
A compute rendering is used to create command buffers needed to do one frame of compositor rendering using compute shaders, it holds onto resources used by the command buffer. More...
#include <render/render_interface.h>
Public Member Functions | |
bool | render_compute_init (struct render_compute *crc, struct render_resources *r) |
Init struct and create resources needed for compute rendering. More... | |
void | render_compute_fini (struct render_compute *crc) |
Frees all resources held by the compute rendering, does not free the struct itself. More... | |
bool | render_compute_begin (struct render_compute *crc) |
Begin the compute command buffer building, takes the vk_bundle's pool lock and leaves it locked. More... | |
bool | render_compute_end (struct render_compute *crc) |
Frees any unneeded resources and ends the command buffer so it can be used, also unlocks the vk_bundle's pool lock that was taken by begin. More... | |
void | render_compute_layers (struct render_compute *crc, 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. More... | |
void | render_compute_projection_timewarp (struct render_compute *crc, VkSampler src_samplers[XRT_MAX_VIEWS], VkImageView src_image_views[XRT_MAX_VIEWS], const struct xrt_normalized_rect src_rects[XRT_MAX_VIEWS], const struct xrt_pose src_poses[XRT_MAX_VIEWS], const struct xrt_fov src_fovs[XRT_MAX_VIEWS], const struct xrt_pose new_poses[XRT_MAX_VIEWS], VkImage target_image, VkImageView target_image_view, const struct render_viewport_data views[XRT_MAX_VIEWS]) |
void | render_compute_projection (struct render_compute *crc, VkSampler src_samplers[XRT_MAX_VIEWS], VkImageView src_image_views[XRT_MAX_VIEWS], const struct xrt_normalized_rect src_rects[XRT_MAX_VIEWS], VkImage target_image, VkImageView target_image_view, const struct render_viewport_data views[XRT_MAX_VIEWS]) |
void | render_compute_clear (struct render_compute *crc, VkImage target_image, VkImageView target_image_view, const struct render_viewport_data views[XRT_MAX_VIEWS]) |
Data Fields | |
struct render_resources * | r |
Shared resources. More... | |
VkDescriptorSet | layer_descriptor_sets [(XRT_MAX_VIEWS)] |
Layer descriptor set. More... | |
VkDescriptorSet | shared_descriptor_set |
Shared descriptor set, used for the clear and distortion shaders. More... | |
A compute rendering is used to create command buffers needed to do one frame of compositor rendering using compute shaders, it holds onto resources used by the command buffer.
VkDescriptorSet render_compute::layer_descriptor_sets[(XRT_MAX_VIEWS)] |
Layer descriptor set.
Referenced by render_compute_fini().
struct render_resources* render_compute::r |
Shared resources.
Referenced by comp_render_cs_layer(), render_compute_begin(), render_compute_end(), render_compute_fini(), render_compute_init(), and vk_from_crc().
VkDescriptorSet render_compute::shared_descriptor_set |
Shared descriptor set, used for the clear and distortion shaders.
It is used in the functions render_compute_projection_timewarp, render_compute_projection, and render_compute_clear.
Referenced by render_compute_fini().