|
Monado OpenXR Runtime
|
Wraps and manage VkSwapchainKHR and VkSurfaceKHR, used by Compositor code. More...
#include <main/comp_target_swapchain.h>


Data Fields | ||
| struct comp_target | base | |
| Base target. | ||
| struct u_pacing_compositor * | upc | |
| Compositor frame pacing helper. | ||
| enum comp_target_display_timing_usage | timing_usage | |
| If we should use display timing. | ||
| int64_t | current_frame_id | |
| Also works as a frame index. | ||
| struct { | ||
| bool compositor_extent | ||
| Should we ignore the compositor's preferred extents. More... | ||
| VkExtent2D extent | ||
The extents that a sub-class wants us to use, see ignore_compositor_extent above. More... | ||
| } | override | |
| struct { | ||
| VkSwapchainKHR handle | ||
| } | swapchain | |
| struct { | ||
| VkSurfaceKHR handle | ||
| VkSurfaceFormatKHR format | ||
| } | surface | |
| struct { | ||
| VkFormat color_format | ||
| VkColorSpaceKHR color_space | ||
| } | preferred | |
| VkPresentModeKHR | present_mode | |
| Present mode that the system must support. | ||
| VkDisplayKHR | display | |
| The current display used for direct mode, VK_NULL_HANDLE else. | ||
| struct { | ||
| bool thread_running | ||
| Must only be accessed from main compositor thread. More... | ||
| bool should_wait | ||
| Protected by event_thread lock. More... | ||
| uint64_t last_vblank_ns | ||
| Protected by event_thread lock. More... | ||
| struct os_thread_helper event_thread | ||
| Thread waiting on vblank_event_fence (first pixel out). More... | ||
| bool event_active | ||
| Skipping the event on the first vblank avoids a spurious VK_ERROR_OUT_OF_HOST_MEMORY error. More... | ||
| } | vblank | |
| bool | has_logged_info | |
| We print swapchain info as INFO the first time we create a VkSWapchain, this keeps track if we have done it. | ||
Protected Member Functions | |
| void | comp_target_swapchain_init_and_set_fnptrs (struct comp_target_swapchain *cts, enum comp_target_display_timing_usage timing_usage) |
| Pre Vulkan initialisation, sets function pointers. | |
| void | comp_target_swapchain_override_extents (struct comp_target_swapchain *cts, VkExtent2D extent) |
Set that any size from the compositor should be ignored and that given size must be used for the VkSwapchain the helper code creates. | |
| void | comp_target_swapchain_cleanup (struct comp_target_swapchain *cts) |
| Free all managed resources on the given comp_target_swapchain, does not free the struct itself. | |
Wraps and manage VkSwapchainKHR and VkSurfaceKHR, used by Compositor code.
| struct comp_target comp_target_swapchain::base |
Base target.
Referenced by comp_target_swapchain_acquire_next_image(), comp_target_swapchain_init_and_set_fnptrs(), comp_target_swapchain_override_extents(), comp_window_direct_create_surface(), comp_window_direct_nvidia::comp_window_direct_nvidia_create(), comp_window_direct_randr::comp_window_direct_randr_create(), comp_window_direct_wayland_create(), comp_window_mswin_thread(), comp_window_wayland::comp_window_wayland_create(), and comp_window_xcb::comp_window_xcb_create().
| bool comp_target_swapchain::compositor_extent |
Should we ignore the compositor's preferred extents.
Some targets, like the direct mode ones, requires a particular set of dimensions.
Referenced by comp_target_swapchain_override_extents().
| int64_t comp_target_swapchain::current_frame_id |
Also works as a frame index.
| VkDisplayKHR comp_target_swapchain::display |
The current display used for direct mode, VK_NULL_HANDLE else.
Referenced by comp_window_direct_nvidia::comp_window_direct_nvidia_create(), comp_window_direct_randr::comp_window_direct_randr_create(), comp_window_direct_wayland_create(), comp_window_wayland::comp_window_wayland_create(), and comp_window_xcb::comp_window_xcb_create().
| bool comp_target_swapchain::event_active |
Skipping the event on the first vblank avoids a spurious VK_ERROR_OUT_OF_HOST_MEMORY error.
| struct os_thread_helper comp_target_swapchain::event_thread |
Thread waiting on vblank_event_fence (first pixel out).
Referenced by comp_target_swapchain_cleanup(), and comp_target_swapchain_init_and_set_fnptrs().
| VkExtent2D comp_target_swapchain::extent |
The extents that a sub-class wants us to use, see ignore_compositor_extent above.
Referenced by comp_target_swapchain_override_extents().
| bool comp_target_swapchain::has_logged_info |
We print swapchain info as INFO the first time we create a VkSWapchain, this keeps track if we have done it.
| uint64_t comp_target_swapchain::last_vblank_ns |
Protected by event_thread lock.
| VkPresentModeKHR comp_target_swapchain::present_mode |
Present mode that the system must support.
| bool comp_target_swapchain::should_wait |
Protected by event_thread lock.
| bool comp_target_swapchain::thread_running |
Must only be accessed from main compositor thread.
Referenced by comp_target_swapchain_cleanup().
| enum comp_target_display_timing_usage comp_target_swapchain::timing_usage |
If we should use display timing.
Referenced by comp_target_swapchain_init_and_set_fnptrs().
| struct u_pacing_compositor* comp_target_swapchain::upc |
Compositor frame pacing helper.
Referenced by comp_target_swapchain_cleanup().