|
Monado OpenXR Runtime
|
Scratch images that can be used for staging buffers. More...
#include <util/comp_high_level_scratch.h>

Public Member Functions | |
| void | chl_scratch_init (struct chl_scratch *scratch) |
| Must becalled before used and before the scratch images are registered with the u_var system. | |
| void | chl_scratch_fini (struct chl_scratch *scratch) |
| Resources must be manually called before calling this functions, and the scratch images unregistered from the u_var system. | |
| bool | chl_scratch_ensure (struct chl_scratch *scratch, struct render_resources *rr, uint32_t view_count, VkExtent2D extent, const VkFormat format) |
| Ensure the scratch images and the render target resources are created. | |
| void | chl_scratch_free_resources (struct chl_scratch *scratch, struct render_resources *rr) |
| Free all Vulkan resources that this scratch has created. | |
Static Public Member Functions | |
| static VkImage | chl_scratch_get_image (struct chl_scratch *scratch, uint32_t view_index, uint32_t image_index) |
| Get the image, see comp_scratch_single_images_get_image. | |
| static VkImageView | chl_scratch_get_sample_view (struct chl_scratch *scratch, uint32_t view_index, uint32_t image_index) |
| Get the sample view, see comp_scratch_single_images_get_sample_view. | |
| static VkImageView | chl_scratch_get_storage_view (struct chl_scratch *scratch, uint32_t view_index, uint32_t image_index) |
| Get the storage view, see comp_scratch_single_images_get_storage_view. | |
Data Fields | ||
| struct render_gfx_render_pass | render_pass | |
| Shared render passed for the views. | ||
| struct { | ||
| struct comp_scratch_single_images cssi | ||
| Per-view scratch images. More... | ||
| struct render_gfx_target_resources targets [(4)] | ||
| Targets for rendering to the scratch buffer. More... | ||
| } | views [XRT_MAX_VIEWS] | |
| uint32_t | view_count | |
| Number of views that has been ensured and have Vulkan resources, all comp_scratch_single_images are always inited. | ||
| VkExtent2D | extent | |
| The extent used to create the images. | ||
| VkFormat | format | |
| Format requested. | ||
| bool | render_pass_initialized | |
| Has the render pass been initialized. | ||
Scratch images that can be used for staging buffers.
| bool chl_scratch_ensure | ( | struct chl_scratch * | scratch, |
| struct render_resources * | rr, | ||
| uint32_t | view_count, | ||
| VkExtent2D | extent, | ||
| const VkFormat | format | ||
| ) |
Ensure the scratch images and the render target resources are created.
References COMP_SCRATCH_NUM_IMAGES, comp_scratch_single_images::comp_scratch_single_images_ensure(), comp_scratch_single_images::comp_scratch_single_images_ensure_mutable(), cssi, extent, format, render_pass, render_pass_initialized, targets, view_count, and render_resources::vk.
| void chl_scratch_fini | ( | struct chl_scratch * | scratch | ) |
Resources must be manually called before calling this functions, and the scratch images unregistered from the u_var system.
References ARRAY_SIZE, and cssi.
| void chl_scratch_free_resources | ( | struct chl_scratch * | scratch, |
| struct render_resources * | rr | ||
| ) |
Free all Vulkan resources that this scratch has created.
References COMP_SCRATCH_NUM_IMAGES, cssi, extent, format, render_pass, render_pass_initialized, targets, view_count, and render_resources::vk.
|
inlinestatic |
Get the image, see comp_scratch_single_images_get_image.
References cssi.
|
inlinestatic |
Get the sample view, see comp_scratch_single_images_get_sample_view.
References cssi.
|
inlinestatic |
Get the storage view, see comp_scratch_single_images_get_storage_view.
References cssi.
| void chl_scratch_init | ( | struct chl_scratch * | scratch | ) |
Must becalled before used and before the scratch images are registered with the u_var system.
References ARRAY_SIZE, and cssi.
| struct comp_scratch_single_images chl_scratch::cssi |
Per-view scratch images.
Referenced by chl_scratch_ensure(), chl_scratch_fini(), chl_scratch_free_resources(), chl_scratch_get_image(), chl_scratch_get_sample_view(), chl_scratch_get_storage_view(), chl_scratch_init(), chl_scratch_state::chl_scratch_state_discard_or_done(), chl_scratch_state::chl_scratch_state_init_and_get(), xrt_system_compositor::comp_main_create_system_compositor(), and comp_renderer::comp_renderer_draw().
| VkExtent2D chl_scratch::extent |
The extent used to create the images.
Referenced by chl_scratch_ensure(), and chl_scratch_free_resources().
| VkFormat chl_scratch::format |
Format requested.
Referenced by chl_scratch_ensure(), and chl_scratch_free_resources().
| struct render_gfx_render_pass chl_scratch::render_pass |
Shared render passed for the views.
Referenced by chl_scratch_ensure(), and chl_scratch_free_resources().
| bool chl_scratch::render_pass_initialized |
Has the render pass been initialized.
Referenced by chl_scratch_ensure(), and chl_scratch_free_resources().
| struct render_gfx_target_resources chl_scratch::targets[(4)] |
Targets for rendering to the scratch buffer.
Referenced by chl_scratch_ensure(), and chl_scratch_free_resources().
| uint32_t chl_scratch::view_count |
Number of views that has been ensured and have Vulkan resources, all comp_scratch_single_images are always inited.
Referenced by chl_scratch_ensure(), chl_scratch_free_resources(), chl_scratch_state::chl_scratch_state_discard_or_done(), and chl_scratch_state::chl_scratch_state_init_and_get().