Mesa (main): turnip: Set supported_sync_types before wsi_init
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jun 10 02:14:01 UTC 2022
Module: Mesa
Branch: main
Commit: 0c764afac10596a4e6c158e5b6703fafc4893f1b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0c764afac10596a4e6c158e5b6703fafc4893f1b
Author: Jason Ekstrand <jason.ekstrand at collabora.com>
Date: Wed Jun 8 18:50:01 2022 -0500
turnip: Set supported_sync_types before wsi_init
The WSI code is about to start querying for available semaphore handle
types via GetPhysicalDeviceExternalSemaphoreProperties in wsi_init().
For drivers that use vk_sync, supported_sync_types needs to be
initialized before GetPhysicalDeviceExternalSemaphoreProperties is
called. Really, wsi_init() should be the very last step of physical
device setup.
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Reviewed-by: Emma Anholt <emma at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4037>
---
src/freedreno/vulkan/tu_device.c | 2 ++
src/freedreno/vulkan/tu_drm.c | 1 -
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/freedreno/vulkan/tu_device.c b/src/freedreno/vulkan/tu_device.c
index b9623229d7a..a16f072474b 100644
--- a/src/freedreno/vulkan/tu_device.c
+++ b/src/freedreno/vulkan/tu_device.c
@@ -302,6 +302,8 @@ tu_physical_device_init(struct tu_physical_device *device,
if (result != VK_SUCCESS)
goto fail_free_name;
+ device->vk.supported_sync_types = device->sync_types;
+
#if TU_HAS_SURFACE
result = tu_wsi_init(device);
if (result != VK_SUCCESS) {
diff --git a/src/freedreno/vulkan/tu_drm.c b/src/freedreno/vulkan/tu_drm.c
index 4e70c684deb..e1f55b99112 100644
--- a/src/freedreno/vulkan/tu_drm.c
+++ b/src/freedreno/vulkan/tu_drm.c
@@ -765,7 +765,6 @@ tu_drm_device_init(struct tu_physical_device *device,
device->heap.flags = VK_MEMORY_HEAP_DEVICE_LOCAL_BIT;
result = tu_physical_device_init(device, instance);
- device->vk.supported_sync_types = device->sync_types;
if (result == VK_SUCCESS)
return result;
More information about the mesa-commit
mailing list