mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-03-03 05:06:31 +00:00
st/oxr: Add debug flag to force timeline semaphores on
This commit is contained in:
parent
cfb8d36b46
commit
e77094892f
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2018-2020, Collabora, Ltd.
|
||||
// Copyright 2018-2022, Collabora, Ltd.
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
/*!
|
||||
* @file
|
||||
|
@ -10,16 +10,20 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "util/u_misc.h"
|
||||
|
||||
#include "xrt/xrt_instance.h"
|
||||
#include "xrt/xrt_gfx_vk.h"
|
||||
|
||||
#include "util/u_misc.h"
|
||||
#include "util/u_debug.h"
|
||||
|
||||
#include "oxr_objects.h"
|
||||
#include "oxr_logger.h"
|
||||
#include "oxr_two_call.h"
|
||||
#include "oxr_handle.h"
|
||||
|
||||
DEBUG_GET_ONCE_BOOL_OPTION(force_timeline_semaphores, "OXR_DEBUG_FORCE_TIMELINE_SEMAPHORES", false)
|
||||
|
||||
|
||||
XrResult
|
||||
oxr_session_populate_vk(struct oxr_logger *log,
|
||||
|
@ -27,6 +31,13 @@ oxr_session_populate_vk(struct oxr_logger *log,
|
|||
XrGraphicsBindingVulkanKHR const *next,
|
||||
struct oxr_session *sess)
|
||||
{
|
||||
bool timeline_semaphore_enabled = sess->sys->vk.timeline_semaphore_enabled;
|
||||
|
||||
if (!timeline_semaphore_enabled && debug_get_bool_option_force_timeline_semaphores()) {
|
||||
oxr_log(log, "Forcing timeline semaphores on, your app better have enabled them!");
|
||||
timeline_semaphore_enabled = true;
|
||||
}
|
||||
|
||||
struct xrt_compositor_native *xcn = sess->xcn;
|
||||
struct xrt_compositor_vk *xcvk = xrt_gfx_vk_provider_create( //
|
||||
xcn, //
|
||||
|
@ -34,7 +45,7 @@ oxr_session_populate_vk(struct oxr_logger *log,
|
|||
vkGetInstanceProcAddr, //
|
||||
next->physicalDevice, //
|
||||
next->device, //
|
||||
sess->sys->vk.timeline_semaphore_enabled, //
|
||||
timeline_semaphore_enabled, //
|
||||
next->queueFamilyIndex, //
|
||||
next->queueIndex); //
|
||||
|
||||
|
|
Loading…
Reference in a new issue