The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

st/oxr: Add debug flag to force timeline semaphores on

authored by

Jakob Bornecrantz and committed by
Jakob Bornecrantz
e7709489 cfb8d36b

+14 -3
+14 -3
src/xrt/state_trackers/oxr/oxr_session_gfx_vk.c
··· 1 - // Copyright 2018-2020, Collabora, Ltd. 1 + // Copyright 2018-2022, Collabora, Ltd. 2 2 // SPDX-License-Identifier: BSL-1.0 3 3 /*! 4 4 * @file ··· 10 10 11 11 #include <stdlib.h> 12 12 13 - #include "util/u_misc.h" 14 13 15 14 #include "xrt/xrt_instance.h" 16 15 #include "xrt/xrt_gfx_vk.h" 17 16 17 + #include "util/u_misc.h" 18 + #include "util/u_debug.h" 19 + 18 20 #include "oxr_objects.h" 19 21 #include "oxr_logger.h" 20 22 #include "oxr_two_call.h" 21 23 #include "oxr_handle.h" 24 + 25 + DEBUG_GET_ONCE_BOOL_OPTION(force_timeline_semaphores, "OXR_DEBUG_FORCE_TIMELINE_SEMAPHORES", false) 22 26 23 27 24 28 XrResult ··· 27 31 XrGraphicsBindingVulkanKHR const *next, 28 32 struct oxr_session *sess) 29 33 { 34 + bool timeline_semaphore_enabled = sess->sys->vk.timeline_semaphore_enabled; 35 + 36 + if (!timeline_semaphore_enabled && debug_get_bool_option_force_timeline_semaphores()) { 37 + oxr_log(log, "Forcing timeline semaphores on, your app better have enabled them!"); 38 + timeline_semaphore_enabled = true; 39 + } 40 + 30 41 struct xrt_compositor_native *xcn = sess->xcn; 31 42 struct xrt_compositor_vk *xcvk = xrt_gfx_vk_provider_create( // 32 43 xcn, // ··· 34 45 vkGetInstanceProcAddr, // 35 46 next->physicalDevice, // 36 47 next->device, // 37 - sess->sys->vk.timeline_semaphore_enabled, // 48 + timeline_semaphore_enabled, // 38 49 next->queueFamilyIndex, // 39 50 next->queueIndex); // 40 51