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 <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29798>
This commit is contained in:
Iago Toral Quiroga 2024-06-20 08:22:19 +02:00 committed by Marge Bot
parent 50519598ff
commit e59f8faf8a

View file

@ -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);