From a4b29aaa724d85b053e148037c9658d36e691281 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Mon, 30 Jan 2023 20:11:51 -0600 Subject: [PATCH] nvk: Init WSI after setting up supported_sync_types Part-of: --- src/nouveau/vulkan/nvk_physical_device.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/nouveau/vulkan/nvk_physical_device.c b/src/nouveau/vulkan/nvk_physical_device.c index d8f8baa96cb..0e699688a45 100644 --- a/src/nouveau/vulkan/nvk_physical_device.c +++ b/src/nouveau/vulkan/nvk_physical_device.c @@ -249,12 +249,6 @@ nvk_physical_device_try_create(struct nvk_instance *instance, device->instance = instance; device->dev = ndev; - result = nvk_init_wsi(device); - if (result != VK_SUCCESS) { - vk_error(instance, result); - goto fail_alloc; - } - device->mem_heaps[0].flags = VK_MEMORY_HEAP_DEVICE_LOCAL_BIT; device->mem_types[0].propertyFlags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT; device->mem_types[0].heapIndex = 0; @@ -284,6 +278,12 @@ nvk_physical_device_try_create(struct nvk_instance *instance, assert(st_idx <= ARRAY_SIZE(device->sync_types)); device->vk.supported_sync_types = device->sync_types; + result = nvk_init_wsi(device); + if (result != VK_SUCCESS) { + vk_error(instance, result); + goto fail_alloc; + } + *device_out = device; close(fd);