summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Ashton <joshua@froggi.es>2023-10-16 01:36:51 -0700
committerJoshua Ashton <joshua@froggi.es>2024-03-22 00:24:26 +0000
commite209b02b970deb4afb88bd671b9b0ee4bbb2709a (patch)
treeda057e1159376b765a1cecf24c4239751849a791
parent8a098f591b6e36ed76244d27ddf8aef7344c86d9 (diff)
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 <joshua@froggi.es>
-rw-r--r--src/vulkan/wsi/wsi_common.c2
-rw-r--r--src/vulkan/wsi/wsi_common.h1
2 files changed, 3 insertions, 0 deletions
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
*