|
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. More... | |
| 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. More... | |
| 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. More... | |
| void | chl_scratch_free_resources (struct chl_scratch *scratch, struct render_resources *rr) |
| Free all Vulkan resources that this scratch has created. More... | |
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. More... | |
| 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. More... | |
| 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. More... | |
Data Fields | |
| struct render_gfx_render_pass | render_pass |
| Shared render passed for the views. More... | |
| 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. More... | |
| VkExtent2D | extent |
| The extent used to create the images. More... | |
| VkFormat | format |
| Format requested. More... | |
| bool | render_pass_initialized |
| Has the render pass been initialized. More... | |
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 chl_scratch_free_resources(), extent, format, render_gfx_render_pass::render_gfx_render_pass_init(), render_pass, 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, comp_scratch_single_images::comp_scratch_single_images_destroy(), 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, comp_scratch_single_images::comp_scratch_single_images_free(), cssi, extent, format, render_gfx_render_pass::render_gfx_render_pass_fini(), render_gfx_target_resources::render_gfx_target_resources_fini(), render_pass, render_pass_initialized, targets, view_count, and render_resources::vk.
Referenced by chl_scratch_ensure().
|
inlinestatic |
Get the image, see comp_scratch_single_images_get_image.
References comp_scratch_single_images::comp_scratch_single_images_get_image(), and cssi.
|
inlinestatic |
Get the sample view, see comp_scratch_single_images_get_sample_view.
References comp_scratch_single_images::comp_scratch_single_images_get_sample_view(), and cssi.
|
inlinestatic |
Get the storage view, see comp_scratch_single_images_get_storage_view.
References comp_scratch_single_images::comp_scratch_single_images_get_storage_view(), and 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, comp_scratch_single_images::comp_scratch_single_images_init(), and cssi.
| struct comp_scratch_single_images chl_scratch::cssi |
Per-view scratch images.
Referenced by 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(), and chl_scratch_state::chl_scratch_state_init_and_get().
| 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_free_resources().
| struct render_gfx_target_resources chl_scratch::targets[(4)] |
Targets for rendering to the scratch buffer.
Referenced by 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().