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:
parent
4c95b574d1
commit
0c764afac1
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue