![]() |
UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
|
#include <vulkan_context.hpp>

Public Member Functions | |
| VulkanContext ()=default | |
| uint32_t | acquire_next_swapchain_image (vk::Semaphore acquire_semaphore) const |
| void | create_framebuffers (vk::RenderPass render_pass) |
| void | destroy () |
| vk::Device | get_device () |
| vk::Framebuffer | get_framebuffer (uint32_t framebuffer_id) |
| vk::PhysicalDevice | get_gpu () |
| vk::Queue | get_queue () |
| uint32_t | get_queue_family_index () |
| vk::Extent2D | get_render_area_size () |
| vk::SwapchainKHR | get_swapchain () |
| size_t | get_swapchain_image_count () |
| vk::Format | get_swapchain_image_format () |
| uint32_t | get_vulkan_version () const |
| vulkan_display::WindowParameters | get_window_parameters () const |
| void | init (vulkan_display::VulkanInstance &&instance, vk::SurfaceKHR surface, vulkan_display::WindowParameters window_parameters, uint32_t gpu_index, vk::PresentModeKHR preferred_mode) |
| bool | is_yCbCr_supported () const |
| void | recreate_swapchain (vulkan_display::WindowParameters parameters, vk::RenderPass render_pass) |
Private Member Functions | |
| void | create_logical_device () |
| void | create_swap_chain (vk::SwapchainKHR &&old_swap_chain=vk::SwapchainKHR{}) |
| void | destroy_framebuffers () |
| void | destroy_swapchain_views () |
Private Attributes | ||
| vk::Device | device | |
| std::unique_ptr< vk::DispatchLoaderDynamic > | dynamic_dispatcher {} | |
| vk::PhysicalDevice | gpu | |
| vk::Instance | instance | |
| vk::DebugUtilsMessengerEXT | messenger | |
| vk::PresentModeKHR | preferred_present_mode {} | |
| vk::Queue | queue | |
| uint32_t | queue_family_index = no_queue_index_found | |
| vk::SurfaceKHR | surface | |
| vk::SwapchainKHR | swapchain | |
| struct { | ||
| vk::SurfaceCapabilitiesKHR capabilities | ||
| vk::SurfaceFormatKHR format | ||
| vk::Extent2D image_size | ||
| vk::PresentModeKHR mode = vk::PresentModeKHR::eFifo | ||
| } | swapchain_atributes | |
| std::vector< SwapchainImage > | swapchain_images {} | |
| uint32_t | vulkan_version {} | |
| vulkan_display::WindowParameters | window_parameters | |
| bool | yCbCr_supported = false | |
Definition at line 131 of file vulkan_context.hpp.
|
default |
| uint32_t vulkan_display_detail::VulkanContext::acquire_next_swapchain_image | ( | vk::Semaphore | acquire_semaphore | ) | const |
Definition at line 545 of file vulkan_context.cpp.
References device, swapchain, vulkan_display_detail::swapchain_image_out_of_date, and vulkan_display_detail::swapchain_image_timeout.
Referenced by vulkan_display::VulkanDisplay::display_queued_image().
| void vulkan_display_detail::VulkanContext::create_framebuffers | ( | vk::RenderPass | render_pass | ) |
Definition at line 516 of file vulkan_context.cpp.
References device, swapchain_atributes, and swapchain_images.
Referenced by vulkan_display::VulkanDisplay::init(), and recreate_swapchain().
|
private |
Definition at line 378 of file vulkan_context.cpp.
References device, gpu, vulkan_display_detail::no_queue_index_found, queue_family_index, vulkan_display_detail::vulkan_log_msg, vulkan_version, and yCbCr_supported.
Referenced by init().
|
private |
Definition at line 416 of file vulkan_context.cpp.
References capabilities, vulkan_display_detail::concat(), device, gpu, vulkan_display::WindowParameters::height, preferred_present_mode, surface, swapchain, swapchain_atributes, vulkan_display_detail::vulkan_log_msg, vulkan_display::WindowParameters::width, and window_parameters.
Referenced by init(), and recreate_swapchain().

| void vulkan_display_detail::VulkanContext::destroy | ( | ) |
Definition at line 565 of file vulkan_context.cpp.
References destroy_framebuffers(), destroy_swapchain_views(), device, dynamic_dispatcher, instance, messenger, surface, and swapchain.
Referenced by vulkan_display::VulkanDisplay::destroy().

|
inlineprivate |
Definition at line 181 of file vulkan_context.hpp.
References device, and swapchain_images.
Referenced by destroy(), and recreate_swapchain().
|
inlineprivate |
Definition at line 174 of file vulkan_context.hpp.
References device, and swapchain_images.
Referenced by destroy(), and recreate_swapchain().
|
inline |
Definition at line 161 of file vulkan_context.hpp.
References device.
Referenced by vulkan_display_detail::RenderPipeline::create(), vulkan_display::VulkanDisplay::init(), vulkan_display_detail::Image2D::init(), and vulkan_display_detail::TransferImageImpl::recreate().
|
inline |
Definition at line 200 of file vulkan_context.hpp.
References swapchain_images.
Referenced by vulkan_display::VulkanDisplay::record_graphics_commands().
|
inline |
Definition at line 160 of file vulkan_context.hpp.
References gpu.
Referenced by vulkan_display_detail::Image2D::init(), and vulkan_display::VulkanDisplay::is_image_description_supported().
|
inline |
Definition at line 164 of file vulkan_context.hpp.
References queue.
Referenced by vulkan_display::VulkanDisplay::display_queued_image(), and vulkan_display::VulkanDisplay::reconfigure().
|
inline |
Definition at line 163 of file vulkan_context.hpp.
References queue_family_index.
Referenced by vulkan_display::VulkanDisplay::init().
|
inline |
Definition at line 168 of file vulkan_context.hpp.
References swapchain_atributes.
Referenced by vulkan_display::VulkanDisplay::display_queued_image(), vulkan_display::VulkanDisplay::reconfigure(), and vulkan_display::VulkanDisplay::window_parameters_changed().
|
inline |
Definition at line 165 of file vulkan_context.hpp.
References swapchain.
Referenced by vulkan_display::VulkanDisplay::display_queued_image().
|
inline |
|
inline |
Definition at line 166 of file vulkan_context.hpp.
References swapchain_atributes.
Referenced by vulkan_display_detail::RenderPipeline::create().
|
inline |
Definition at line 159 of file vulkan_context.hpp.
References vulkan_version.
Referenced by vulkan_display::VulkanDisplay::get_vulkan_version().
|
inline |
Definition at line 204 of file vulkan_context.hpp.
References window_parameters.
Referenced by vulkan_display::VulkanDisplay::window_parameters_changed().
| void vulkan_display_detail::VulkanContext::init | ( | vulkan_display::VulkanInstance && | instance, |
| vk::SurfaceKHR | surface, | ||
| vulkan_display::WindowParameters | window_parameters, | ||
| uint32_t | gpu_index, | ||
| vk::PresentModeKHR | preferred_mode ) |
Definition at line 483 of file vulkan_context.cpp.
References create_logical_device(), create_swap_chain(), device, dynamic_dispatcher, gpu, instance, messenger, vulkan_display_detail::no_queue_index_found, queue_family_index, surface, swapchain, swapchain_atributes, swapchain_images, vulkan_version, and window_parameters.
Referenced by vulkan_display::VulkanDisplay::init().

|
inline |
Definition at line 162 of file vulkan_context.hpp.
References yCbCr_supported.
Referenced by vulkan_display::VulkanDisplay::is_image_description_supported(), and vulkan_display::VulkanDisplay::is_yCbCr_supported().
| void vulkan_display_detail::VulkanContext::recreate_swapchain | ( | vulkan_display::WindowParameters | parameters, |
| vk::RenderPass | render_pass ) |
Definition at line 532 of file vulkan_context.cpp.
References create_framebuffers(), create_swap_chain(), destroy_framebuffers(), destroy_swapchain_views(), device, swapchain, swapchain_atributes, swapchain_images, and window_parameters.
Referenced by vulkan_display::VulkanDisplay::display_queued_image(), and vulkan_display::VulkanDisplay::window_parameters_changed().

| vk::SurfaceCapabilitiesKHR vulkan_display_detail::VulkanContext::capabilities |
Definition at line 147 of file vulkan_context.hpp.
Referenced by create_swap_chain().
|
private |
Definition at line 138 of file vulkan_context.hpp.
Referenced by acquire_next_swapchain_image(), create_framebuffers(), create_logical_device(), create_swap_chain(), destroy(), destroy_framebuffers(), destroy_swapchain_views(), get_device(), init(), and recreate_swapchain().
|
private |
| vk::SurfaceFormatKHR vulkan_display_detail::VulkanContext::format |
Definition at line 148 of file vulkan_context.hpp.
|
private |
Definition at line 137 of file vulkan_context.hpp.
Referenced by create_logical_device(), create_swap_chain(), get_gpu(), and init().
| vk::Extent2D vulkan_display_detail::VulkanContext::image_size |
Definition at line 150 of file vulkan_context.hpp.
|
private |
Definition at line 132 of file vulkan_context.hpp.
|
private |
Definition at line 134 of file vulkan_context.hpp.
| vk::PresentModeKHR vulkan_display_detail::VulkanContext::mode = vk::PresentModeKHR::eFifo |
Definition at line 149 of file vulkan_context.hpp.
|
private |
|
private |
Definition at line 142 of file vulkan_context.hpp.
Referenced by get_queue().
|
private |
Definition at line 141 of file vulkan_context.hpp.
Referenced by create_logical_device(), get_queue_family_index(), and init().
|
private |
Definition at line 144 of file vulkan_context.hpp.
Referenced by create_swap_chain(), destroy(), and init().
|
private |
Definition at line 145 of file vulkan_context.hpp.
Referenced by acquire_next_swapchain_image(), create_swap_chain(), destroy(), get_swapchain(), init(), and recreate_swapchain().
| struct { ... } vulkan_display_detail::VulkanContext::swapchain_atributes |
Referenced by create_framebuffers(), create_swap_chain(), get_render_area_size(), get_swapchain_image_format(), init(), and recreate_swapchain().
|
private |
Definition at line 153 of file vulkan_context.hpp.
Referenced by create_framebuffers(), destroy_framebuffers(), destroy_swapchain_views(), get_framebuffer(), get_swapchain_image_count(), init(), and recreate_swapchain().
|
private |
Definition at line 135 of file vulkan_context.hpp.
Referenced by create_logical_device(), get_vulkan_version(), and init().
|
private |
Definition at line 156 of file vulkan_context.hpp.
Referenced by create_swap_chain(), get_window_parameters(), init(), and recreate_swapchain().
|
private |
Definition at line 139 of file vulkan_context.hpp.
Referenced by create_logical_device(), and is_yCbCr_supported().