From 9cf6f14b880eb7a8c65fc5cc225322ff617b1ae1 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Thu, 14 Aug 2025 17:23:56 -0400 Subject: [PATCH] vulkan/wsi: Drop signal_fence/semaphore_with_memory Intel was the only drivers setting this and how they don't so we can get rid of the flag and the associated code. Reviewed-by: Yiwei Zhang Acked-by: Daniel Stone Reviewed-by: Lionel Landwerlin Part-of: --- src/vulkan/wsi/wsi_common.c | 24 ++++++------------------ src/vulkan/wsi/wsi_common.h | 15 --------------- 2 files changed, 6 insertions(+), 33 deletions(-) diff --git a/src/vulkan/wsi/wsi_common.c b/src/vulkan/wsi/wsi_common.c index 4b1a5f6505f..e3a57ba4b59 100644 --- a/src/vulkan/wsi/wsi_common.c +++ b/src/vulkan/wsi/wsi_common.c @@ -1205,15 +1205,9 @@ wsi_signal_semaphore_for_image(struct vk_device *device, return result; #endif - if (chain->wsi->signal_semaphore_with_memory) { - return device->create_sync_for_memory(device, image->memory, - false /* signal_memory */, - &semaphore->temporary); - } else { - return vk_sync_create(device, &vk_sync_dummy_type, - 0 /* flags */, 0 /* initial_value */, - &semaphore->temporary); - } + return vk_sync_create(device, &vk_sync_dummy_type, + 0 /* flags */, 0 /* initial_value */, + &semaphore->temporary); } static VkResult @@ -1241,15 +1235,9 @@ wsi_signal_fence_for_image(struct vk_device *device, return result; #endif - if (chain->wsi->signal_fence_with_memory) { - return device->create_sync_for_memory(device, image->memory, - false /* signal_memory */, - &fence->temporary); - } else { - return vk_sync_create(device, &vk_sync_dummy_type, - 0 /* flags */, 0 /* initial_value */, - &fence->temporary); - } + return vk_sync_create(device, &vk_sync_dummy_type, + 0 /* flags */, 0 /* initial_value */, + &fence->temporary); } VkResult diff --git a/src/vulkan/wsi/wsi_common.h b/src/vulkan/wsi/wsi_common.h index 44c81ccddf0..c77813179d3 100644 --- a/src/vulkan/wsi/wsi_common.h +++ b/src/vulkan/wsi/wsi_common.h @@ -185,21 +185,6 @@ struct wsi_device { /* Set to true if the implementation is ok with linear WSI images. */ bool wants_linear; - /* Signals the semaphore such that any wait on the semaphore will wait on - * any reads or writes on the give memory object. This is used to - * implement the semaphore signal operation in vkAcquireNextImage. This - * requires the driver to implement vk_device::create_sync_for_memory. - */ - bool signal_semaphore_with_memory; - - /* Signals the fence such that any wait on the fence will wait on any reads - * or writes on the give memory object. This is used to implement the - * semaphore signal operation in vkAcquireNextImage. This requires the - * driver to implement vk_device::create_sync_for_memory. The resulting - * vk_sync must support CPU waits. - */ - bool signal_fence_with_memory; - /* Whether present_wait functionality is enabled on the device. * In this case, we have to create an extra timeline semaphore * to be able to synchronize with the WSI present semaphore being unsignalled.