Mesa (main): anv: setup syncobj fd via wsi_device_setup_syncobj_fd
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Nov 4 17:35:03 UTC 2021
Module: Mesa
Branch: main
Commit: 9f6764953b02edc81a19bb7d169e64ed77ab1980
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9f6764953b02edc81a19bb7d169e64ed77ab1980
Author: Tapani Pälli <tapani.palli at intel.com>
Date: Thu Oct 14 14:45:19 2021 +0300
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 at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12305>
---
src/intel/vulkan/anv_device.c | 4 ++--
src/intel/vulkan/anv_wsi.c | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index f5df8836439..392cb3007ea 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -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;
diff --git a/src/intel/vulkan/anv_wsi.c b/src/intel/vulkan/anv_wsi.c
index 73fae70b67d..9e462d0b227 100644
--- a/src/intel/vulkan/anv_wsi.c
+++ b/src/intel/vulkan/anv_wsi.c
@@ -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;
}
More information about the mesa-commit
mailing list