The open source OpenXR runtime
at main 37 lines 881 B view raw
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 */ 31xrt_result_t 32comp_fence_import(struct vk_bundle *vk, xrt_graphics_sync_handle_t handle, struct xrt_compositor_fence **out_xcf); 33 34 35#ifdef __cplusplus 36} 37#endif