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>
This commit is contained in:
Joshua Ashton 2023-10-16 01:36:51 -07:00
parent 8a098f591b
commit e209b02b97
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
*