From f4f2196e342732d4056ec993116904dfc4d9340f Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Thu, 10 Mar 2022 13:12:26 +0000 Subject: [PATCH] xrt: Add a way to say that timeline semaphores have been enabled --- src/xrt/compositor/client/comp_vk_client.c | 4 +--- src/xrt/compositor/client/comp_vk_client.h | 1 + src/xrt/compositor/client/comp_vk_glue.c | 12 ++++++++++-- src/xrt/include/xrt/xrt_gfx_vk.h | 1 + src/xrt/state_trackers/oxr/oxr_session_gfx_vk.c | 1 + 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/xrt/compositor/client/comp_vk_client.c b/src/xrt/compositor/client/comp_vk_client.c index d434bd486..1bfae065b 100644 --- a/src/xrt/compositor/client/comp_vk_client.c +++ b/src/xrt/compositor/client/comp_vk_client.c @@ -626,6 +626,7 @@ client_vk_compositor_create(struct xrt_compositor_native *xcn, PFN_vkGetInstanceProcAddr getProc, VkPhysicalDevice physicalDevice, VkDevice device, + bool timeline_semaphore_enabled, uint32_t queueFamilyIndex, uint32_t queueIndex) { @@ -663,9 +664,6 @@ client_vk_compositor_create(struct xrt_compositor_native *xcn, // Default to info. enum u_logging_level log_level = U_LOGGING_INFO; - // For now always disabled. - bool timeline_semaphore_enabled = false; - ret = vk_init_from_given( // &c->vk, // vk_bundle getProc, // vkGetInstanceProcAddr diff --git a/src/xrt/compositor/client/comp_vk_client.h b/src/xrt/compositor/client/comp_vk_client.h index 33e8e6350..823a097df 100644 --- a/src/xrt/compositor/client/comp_vk_client.h +++ b/src/xrt/compositor/client/comp_vk_client.h @@ -93,6 +93,7 @@ client_vk_compositor_create(struct xrt_compositor_native *xcn, PFN_vkGetInstanceProcAddr getProc, VkPhysicalDevice physicalDevice, VkDevice device, + bool timeline_semaphore_enabled, uint32_t queueFamilyIndex, uint32_t queueIndex); diff --git a/src/xrt/compositor/client/comp_vk_glue.c b/src/xrt/compositor/client/comp_vk_glue.c index 9dac59eaa..b1f0494a4 100644 --- a/src/xrt/compositor/client/comp_vk_glue.c +++ b/src/xrt/compositor/client/comp_vk_glue.c @@ -69,11 +69,19 @@ xrt_gfx_vk_provider_create(struct xrt_compositor_native *xcn, PFN_vkGetInstanceProcAddr get_instance_proc_addr, VkPhysicalDevice physical_device, VkDevice device, + bool timeline_semaphore_enabled, uint32_t queue_family_index, uint32_t queue_index) { - struct client_vk_compositor *vcc = client_vk_compositor_create( - xcn, instance, get_instance_proc_addr, physical_device, device, queue_family_index, queue_index); + struct client_vk_compositor *vcc = client_vk_compositor_create( // + xcn, // + instance, // + get_instance_proc_addr, // + physical_device, // + device, // + timeline_semaphore_enabled, // + queue_family_index, // + queue_index); // return &vcc->base; } diff --git a/src/xrt/include/xrt/xrt_gfx_vk.h b/src/xrt/include/xrt/xrt_gfx_vk.h index 237efa37d..c45e86338 100644 --- a/src/xrt/include/xrt/xrt_gfx_vk.h +++ b/src/xrt/include/xrt/xrt_gfx_vk.h @@ -61,6 +61,7 @@ xrt_gfx_vk_provider_create(struct xrt_compositor_native *xcn, PFN_vkGetInstanceProcAddr get_instance_proc_addr, VkPhysicalDevice physical_device, VkDevice device, + bool timeline_semaphore_enabled, uint32_t queue_family_index, uint32_t queue_index); diff --git a/src/xrt/state_trackers/oxr/oxr_session_gfx_vk.c b/src/xrt/state_trackers/oxr/oxr_session_gfx_vk.c index a9a3c422e..2d26019cd 100644 --- a/src/xrt/state_trackers/oxr/oxr_session_gfx_vk.c +++ b/src/xrt/state_trackers/oxr/oxr_session_gfx_vk.c @@ -34,6 +34,7 @@ oxr_session_populate_vk(struct oxr_logger *log, vkGetInstanceProcAddr, // next->physicalDevice, // next->device, // + false, // next->queueFamilyIndex, // next->queueIndex); //