turnip: Set supported_sync_types before wsi_init

The WSI code is about to start querying for available semaphore handle
types via GetPhysicalDeviceExternalSemaphoreProperties in wsi_init().
For drivers that use vk_sync, supported_sync_types needs to be
initialized before GetPhysicalDeviceExternalSemaphoreProperties is
called.  Really, wsi_init() should be the very last step of physical
device setup.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4037>
This commit is contained in:
Jason Ekstrand 2022-06-08 18:50:01 -05:00 committed by Marge Bot
parent 4c95b574d1
commit 0c764afac1
2 changed files with 2 additions and 1 deletions

View File

@ -302,6 +302,8 @@ tu_physical_device_init(struct tu_physical_device *device,
if (result != VK_SUCCESS)
goto fail_free_name;
device->vk.supported_sync_types = device->sync_types;
#if TU_HAS_SURFACE
result = tu_wsi_init(device);
if (result != VK_SUCCESS) {

View File

@ -765,7 +765,6 @@ tu_drm_device_init(struct tu_physical_device *device,
device->heap.flags = VK_MEMORY_HEAP_DEVICE_LOCAL_BIT;
result = tu_physical_device_init(device, instance);
device->vk.supported_sync_types = device->sync_types;
if (result == VK_SUCCESS)
return result;