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>

Reviewed-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Erik Kurzinger <ekurzinger@nvidia.com>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25709>
This commit is contained in:
Joshua Ashton 2023-10-16 01:36:51 -07:00 committed by Marge Bot
parent efa6fac0d7
commit a50ce3df71
2 changed files with 3 additions and 0 deletions

View File

@ -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);

View File

@ -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
*