From e59f8faf8a67bed7dde606bb1d16f2ed8483541f Mon Sep 17 00:00:00 2001 From: Iago Toral Quiroga Date: Thu, 20 Jun 2024 08:22:19 +0200 Subject: [PATCH] v3dv: don't call wsi_device_init too early Since a5d59a50a9 this relies on the device capabilities to be already cached in the device. Fixes some crashes with WSI stuff, like vkcube-wayland or dEQP-VK.wsi.wayland.swapchain.modify.resize. Fixes: a5d59a50a9 ('v3dv: Use common runtime vk_properties') Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11363 Reviewed-by: Jose Maria Casanova Crespo Part-of: --- src/broadcom/vulkan/v3dv_device.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c index d31062d94b4..5981a1e1123 100644 --- a/src/broadcom/vulkan/v3dv_device.c +++ b/src/broadcom/vulkan/v3dv_device.c @@ -1443,16 +1443,16 @@ create_physical_device(struct v3dv_instance *instance, device->sync_types[2] = NULL; device->vk.supported_sync_types = device->sync_types; + get_device_extensions(device, &device->vk.supported_extensions); + get_features(device, &device->vk.supported_features); + get_device_properties(device, &device->vk.properties); + result = v3dv_wsi_init(device); if (result != VK_SUCCESS) { vk_error(instance, result); goto fail; } - get_device_extensions(device, &device->vk.supported_extensions); - get_features(device, &device->vk.supported_features); - get_device_properties(device, &device->vk.properties); - mtx_init(&device->mutex, mtx_plain); list_addtail(&device->vk.link, &instance->vk.physical_devices.list);