anv: setup syncobj fd via wsi_device_setup_syncobj_fd

Patch moves initialization of variable so that we have fd when calling
wsi initialization.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12305>
This commit is contained in:
Tapani Pälli 2021-10-14 14:45:19 +03:00 committed by Marge Bot
parent 01fb24d50e
commit 9f6764953b
2 changed files with 5 additions and 2 deletions

View File

@ -1000,6 +1000,8 @@ anv_physical_device_try_create(struct anv_instance *instance,
device->engine_info = anv_gem_get_engine_info(fd);
anv_physical_device_init_queue_families(device);
device->local_fd = fd;
result = anv_init_wsi(device);
if (result != VK_SUCCESS)
goto fail_engine_info;
@ -1010,8 +1012,6 @@ anv_physical_device_try_create(struct anv_instance *instance,
get_device_extensions(device, &device->vk.supported_extensions);
device->local_fd = fd;
anv_genX(&device->info, init_physical_device_state)(device);
*device_out = device;

View File

@ -98,6 +98,9 @@ anv_init_wsi(struct anv_physical_device *physical_device)
physical_device->vk.wsi_device = &physical_device->wsi_device;
wsi_device_setup_syncobj_fd(&physical_device->wsi_device,
physical_device->local_fd);
return VK_SUCCESS;
}