96 VkFormat color_format,
97 VkColorSpaceKHR color_space,
98 VkPresentModeKHR present_mode);
107 VkSemaphore semaphore,
119 VkSemaphore semaphore);
VkColorSpaceKHR color_space
Definition: comp_vk_swapchain.h:62
A pair of VkImage and VkImageView.
Definition: comp_vk_swapchain.h:38
vk_swapchain_cb dimension_cb
Definition: comp_vk_swapchain.h:66
void vk_swapchain_init(struct vk_swapchain *sc, struct vk_bundle *vk, vk_swapchain_cb dimension_cb, void *priv)
Wraps and manage VkSwapchainKHR and VkSurfaceKHR, used by Compositor code.
Definition: comp_vk_swapchain.c:79
Wraps and manage VkSwapchainKHR and VkSurfaceKHR, used by Compositor code.
Definition: comp_vk_swapchain.h:49
uint64_t VkImage
Definition: xrt_compositor.h:452
VkFormat color_format
Definition: comp_vk_swapchain.h:61
VkImageView view
Definition: comp_vk_swapchain.h:41
void vk_swapchain_cleanup(struct vk_swapchain *sc)
Free all managed resources on the given vk_swapchain, does not free the struct itself.
Definition: comp_vk_swapchain.c:461
VkImage image
Definition: comp_vk_swapchain.h:40
struct vk_bundle * vk
Definition: comp_vk_swapchain.h:51
void * cb_priv
Definition: comp_vk_swapchain.h:65
VkResult vk_swapchain_present(struct vk_swapchain *sc, VkQueue queue, uint32_t index, VkSemaphore semaphore)
Make the given vk_swapchain present the next acquired image.
Definition: comp_vk_swapchain.c:242
uint32_t image_count
Definition: comp_vk_swapchain.h:59
VkResult vk_swapchain_acquire_next_image(struct vk_swapchain *sc, VkSemaphore semaphore, uint32_t *index)
Acquire a image index from the given vk_swapchain for rendering.
Definition: comp_vk_swapchain.c:232
Common Vulkan code header.
VkSwapchainKHR swap_chain
Definition: comp_vk_swapchain.h:53
void(* vk_swapchain_cb)(uint32_t width, uint32_t height, void *priv)
Callback when a vk_swapchain changes size.
Definition: comp_vk_swapchain.h:31
void vk_swapchain_create(struct vk_swapchain *sc, uint32_t width, uint32_t height, VkFormat color_format, VkColorSpaceKHR color_space, VkPresentModeKHR present_mode)
Initialize the given vk_swapchain, does not allocate.
Definition: comp_vk_swapchain.c:90
VkSurfaceKHR surface
Definition: comp_vk_swapchain.h:55
VkSurfaceFormatKHR surface_format
Definition: comp_vk_swapchain.h:56
A bundle of Vulkan functions and objects, used by both Compositor and Compositor client code...
Definition: vk_helpers.h:34
struct vk_swapchain_buffer * buffers
Definition: comp_vk_swapchain.h:58
VkPresentModeKHR present_mode
Definition: comp_vk_swapchain.h:63