anv: init major/minor before WSI

So that we can provide that information to WSI if it asks for it
immediately.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19224>
This commit is contained in:
Lionel Landwerlin 2022-10-21 12:25:18 +03:00 committed by Marge Bot
parent 324d945589
commit 93dbd14ed7

View file

@ -985,16 +985,7 @@ anv_physical_device_try_create(struct vk_instance *vk_instance,
get_device_extensions(device, &device->vk.supported_extensions);
result = anv_init_wsi(device);
if (result != VK_SUCCESS)
goto fail_perf;
anv_measure_device_init(device);
anv_genX(&device->info, init_physical_device_state)(device);
*out = &device->vk;
/* Gather major/minor before WSI. */
struct stat st;
if (stat(primary_path, &st) == 0) {
@ -1017,6 +1008,16 @@ anv_physical_device_try_create(struct vk_instance *vk_instance,
device->local_minor = 0;
}
result = anv_init_wsi(device);
if (result != VK_SUCCESS)
goto fail_perf;
anv_measure_device_init(device);
anv_genX(&device->info, init_physical_device_state)(device);
*out = &device->vk;
return VK_SUCCESS;
fail_perf: