From e209b02b970deb4afb88bd671b9b0ee4bbb2709a Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Mon, 16 Oct 2023 01:36:51 -0700 Subject: [PATCH] wsi: Track if timeline semaphores are supported This will be needed before we expose and use explicit sync. Even if the host Wayland compositor supports timeline semaphores, in the case of Venus, etc the underlying driver may not. Signed-off-by: Joshua Ashton --- src/vulkan/wsi/wsi_common.c | 2 ++ src/vulkan/wsi/wsi_common.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/vulkan/wsi/wsi_common.c b/src/vulkan/wsi/wsi_common.c index bb71afa23c7..a93dbb3a802 100644 --- a/src/vulkan/wsi/wsi_common.c +++ b/src/vulkan/wsi/wsi_common.c @@ -144,6 +144,8 @@ wsi_device_init(struct wsi_device *wsi, wsi->khr_present_wait = supported_extensions->KHR_present_id && supported_extensions->KHR_present_wait; + wsi->has_timeline_semaphore = + supported_extensions->KHR_timeline_semaphore; /* We cannot expose KHR_present_wait without timeline semaphores. */ assert(!wsi->khr_present_wait || supported_extensions->KHR_timeline_semaphore); diff --git a/src/vulkan/wsi/wsi_common.h b/src/vulkan/wsi/wsi_common.h index 8d136869040..0306ea17cfd 100644 --- a/src/vulkan/wsi/wsi_common.h +++ b/src/vulkan/wsi/wsi_common.h @@ -114,6 +114,7 @@ struct wsi_device { VkExternalSemaphoreHandleTypeFlags semaphore_export_handle_types; bool has_import_memory_host; + bool has_timeline_semaphore; /** Indicates if wsi_image_create_info::scanout is supported *