|
Monado OpenXR Runtime
|
Helper struct for mirroring the compositors rendering to the debug ui, which also enables recording. More...
#include <main/comp_mirror_to_debug_gui.h>

Public Member Functions | |
| VkResult | comp_mirror_init (struct comp_mirror_to_debug_gui *m, struct vk_bundle *vk, struct render_shaders *shaders, VkExtent2D extent) |
| Initialise the struct. | |
| void | comp_mirror_add_debug_vars (struct comp_mirror_to_debug_gui *m, struct comp_compositor *c) |
| One time adding of the debug variables. | |
| void | comp_mirror_fixup_ui_state (struct comp_mirror_to_debug_gui *m, struct comp_compositor *c) |
| Fixup various timing state. | |
| bool | comp_mirror_is_ready_and_active (struct comp_mirror_to_debug_gui *m, struct comp_compositor *c, uint64_t predicted_display_time_ns) |
| Is this struct ready and capable of mirroring the image, can only call comp_mirror_do_blit if this function has returned true. | |
| XRT_CHECK_RESULT xrt_result_t | comp_mirror_do_blit (struct comp_mirror_to_debug_gui *m, struct vk_bundle *vk, uint64_t frame_id, uint64_t predicted_display_time_ns, VkImage from_image, VkImageView from_view, VkSampler from_sampler, VkExtent2D from_extent, struct xrt_normalized_rect from_rect) |
| Do the blit. | |
| void | comp_mirror_fini (struct comp_mirror_to_debug_gui *m, struct vk_bundle *vk) |
| Finalise the struct, frees and resources. | |
Data Fields | ||
| struct u_frame_times_widget | push_frame_times | |
| float | target_frame_time_ms | |
| uint64_t | last_push_ts_ns | |
| int | push_every_frame_out_of_X | |
| struct u_sink_debug | debug_sink | |
| VkExtent2D | image_extent | |
| struct vk_image_readback_to_xf_pool * | pool | |
| struct { | ||
| VkImage image | ||
| VkImageView unorm_view | ||
| VkDeviceMemory mem | ||
| } | bounce | |
| struct { | ||
| VkPipelineCache pipeline_cache | ||
| Private here for now. More... | ||
| VkDescriptorPool descriptor_pool | ||
| Descriptor pool for blit. More... | ||
| VkDescriptorSetLayout descriptor_set_layout | ||
| Descriptor set layout for compute. More... | ||
| VkPipelineLayout pipeline_layout | ||
| Pipeline layout used for compute distortion. More... | ||
| VkPipeline pipeline | ||
| Doesn't depend on target so is static. More... | ||
| } | blit | |
| struct vk_cmd_pool | cmd_pool | |
Helper struct for mirroring the compositors rendering to the debug ui, which also enables recording.
Currently embedded in comp_renderer.
| void comp_mirror_add_debug_vars | ( | struct comp_mirror_to_debug_gui * | m, |
| struct comp_compositor * | c | ||
| ) |
One time adding of the debug variables.
References u_frame_times_widget::fps, comp_compositor::mirroring_to_debug_gui, and u_var_add_root().
| XRT_CHECK_RESULT xrt_result_t comp_mirror_do_blit | ( | struct comp_mirror_to_debug_gui * | m, |
| struct vk_bundle * | vk, | ||
| uint64_t | frame_id, | ||
| uint64_t | predicted_display_time_ns, | ||
| VkImage | from_image, | ||
| VkImageView | from_view, | ||
| VkSampler | from_sampler, | ||
| VkExtent2D | from_extent, | ||
| struct xrt_normalized_rect | from_rect | ||
| ) |
Do the blit.
References descriptor_pool, descriptor_set_layout, pipeline, pipeline_layout, xrt_frame::source_sequence, vk_cmd_blit_image_locked(), vk_cmd_copy_image_locked(), vk_cmd_image_barrier_locked(), vk_cmd_pool::vk_cmd_pool_create_and_begin_cmd_buffer_locked(), vk_cmd_pool::vk_cmd_pool_lock(), vk_cmd_pool::vk_cmd_pool_unlock(), vk_create_descriptor_set(), XRT_ERROR_VULKAN, and xrt_frame::xrt_frame_reference().
| void comp_mirror_fini | ( | struct comp_mirror_to_debug_gui * | m, |
| struct vk_bundle * | vk | ||
| ) |
Finalise the struct, frees and resources.
References D, descriptor_pool, descriptor_set_layout, DF, pipeline, pipeline_cache, pipeline_layout, and u_var_remove_root().
| void comp_mirror_fixup_ui_state | ( | struct comp_mirror_to_debug_gui * | m, |
| struct comp_compositor * | c | ||
| ) |
Fixup various timing state.
References comp_settings::nominal_frame_interval_ns, u_var_timing::range, u_var_timing::reference_timing, comp_compositor::settings, and time_ns_to_ms_f().
| VkResult comp_mirror_init | ( | struct comp_mirror_to_debug_gui * | m, |
| struct vk_bundle * | vk, | ||
| struct render_shaders * | shaders, | ||
| VkExtent2D | extent | ||
| ) |
Initialise the struct.
References C, descriptor_pool, descriptor_set_layout, pipeline, pipeline_cache, pipeline_layout, vk_cmd_pool::pool, vk_descriptor_pool_info::uniform_per_descriptor_count, vk_create_compute_pipeline(), vk_create_descriptor_pool(), and vk_create_pipeline_cache().
| bool comp_mirror_is_ready_and_active | ( | struct comp_mirror_to_debug_gui * | m, |
| struct comp_compositor * | c, | ||
| uint64_t | predicted_display_time_ns | ||
| ) |
Is this struct ready and capable of mirroring the image, can only call comp_mirror_do_blit if this function has returned true.
References comp_compositor::mirroring_to_debug_gui, and time_ns_to_ms_f().
| VkDescriptorPool comp_mirror_to_debug_gui::descriptor_pool |
Descriptor pool for blit.
Referenced by comp_mirror_do_blit(), comp_mirror_fini(), and comp_mirror_init().
| VkDescriptorSetLayout comp_mirror_to_debug_gui::descriptor_set_layout |
Descriptor set layout for compute.
Referenced by comp_mirror_do_blit(), comp_mirror_fini(), and comp_mirror_init().
| VkPipeline comp_mirror_to_debug_gui::pipeline |
Doesn't depend on target so is static.
Referenced by comp_mirror_do_blit(), comp_mirror_fini(), and comp_mirror_init().
| VkPipelineCache comp_mirror_to_debug_gui::pipeline_cache |
Private here for now.
Referenced by comp_mirror_fini(), and comp_mirror_init().
| VkPipelineLayout comp_mirror_to_debug_gui::pipeline_layout |
Pipeline layout used for compute distortion.
Referenced by comp_mirror_do_blit(), comp_mirror_fini(), and comp_mirror_init().