Monado OpenXR Runtime
comp_sync.h
Go to the documentation of this file.
1// Copyright 2019-2021, Collabora, Ltd.
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief Independent @ref xrt_compositor_fence implementation.
6 * @author Jakob Bornecrantz <jakob@collabora.com>
7 * @ingroup comp_util
8 */
9
10#pragma once
11
12#include "xrt/xrt_handles.h"
13#include "xrt/xrt_compositor.h"
14#include "vk/vk_helpers.h"
15
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21
22/*!
23 * For importing @ref xrt_graphics_sync_handle_t and turn them into a @ref xrt_compositor_fence.
24 *
25 * The vk_bundle is owned by the compositor, its the state trackers job to make
26 * sure that compositor lives for as long as the fence does and that all fences
27 * are destroyed before the compositor is destroyed.
28 *
29 * @ingroup comp_util
30 */
33
34
35#ifdef __cplusplus
36}
37#endif
xrt_result_t comp_fence_import(struct vk_bundle *vk, xrt_graphics_sync_handle_t handle, struct xrt_compositor_fence **out_xcf)
For importing xrt_graphics_sync_handle_t and turn them into a xrt_compositor_fence.
Definition: comp_sync.c:100
enum xrt_result xrt_result_t
Result type used across Monado.
A bundle of Vulkan functions and objects, used by both Compositor and Compositor client code.
Definition: vk_helpers.h:49
Compositor fence used for syncornization.
Definition: xrt_compositor.h:731
Common Vulkan code header.
Header declaring XRT graphics interfaces.
Native handle types.
int xrt_graphics_sync_handle_t
The type underlying synchronization primitives (semaphores, etc) shared between compositor clients an...
Definition: xrt_handles.h:348