From 02337d2b65a7566c195781f0e2706de8bf54496a Mon Sep 17 00:00:00 2001 From: Hans-Kristian Arntzen Date: Thu, 19 Feb 2026 15:29:36 +0100 Subject: [PATCH] wsi/common: Pass along requested timing feedback as well. Signed-off-by: Hans-Kristian Arntzen Reviewed-by: Mario Kleiner Part-of: --- src/vulkan/wsi/wsi_common.c | 9 ++++++++- src/vulkan/wsi/wsi_common_private.h | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/vulkan/wsi/wsi_common.c b/src/vulkan/wsi/wsi_common.c index 13708e6aa1d..94a3a0d7888 100644 --- a/src/vulkan/wsi/wsi_common.c +++ b/src/vulkan/wsi/wsi_common.c @@ -2410,7 +2410,13 @@ wsi_common_queue_present(const struct wsi_device *wsi, /* All other fields in google_timing_info beyond the following must be zero. */ google_timing_info.targetTime = present_time->desiredPresentTime; - google_timing_info.presentStageQueries = VK_PRESENT_STAGE_QUEUE_OPERATIONS_END_BIT_EXT; + + /* We don't support PIXEL_VISIBLE_BIT on any backend, so flag the output stage that is relevant. + * Xwl would report in DEQUEUED stage currently, but the backend doesn't change its behavior + * based on what feedback we're requesting, and GOOGLE_display_timing cannot be exposed by + * default on any backend that's not KHR_display anyway. */ + google_timing_info.presentStageQueries = VK_PRESENT_STAGE_QUEUE_OPERATIONS_END_BIT_EXT | + VK_PRESENT_STAGE_IMAGE_FIRST_PIXEL_OUT_BIT_EXT; } } else { /* VK_EXT_present_timing mode, and present_timings_info->pTimingInfos is valid. */ @@ -2452,6 +2458,7 @@ wsi_common_queue_present(const struct wsi_device *wsi, .serial = swapchain->present_timing.serial, .time = target_time, .flags = info->flags, + .feedback = info->presentStageQueries, }); if (info->presentStageQueries & swapchain->present_timing.supported_query_stages & diff --git a/src/vulkan/wsi/wsi_common_private.h b/src/vulkan/wsi/wsi_common_private.h index c6eef48a872..4bad8fcfd74 100644 --- a/src/vulkan/wsi/wsi_common_private.h +++ b/src/vulkan/wsi/wsi_common_private.h @@ -214,6 +214,7 @@ struct wsi_image_timing_request { uint64_t serial; uint64_t time; VkPresentTimingInfoFlagsEXT flags; + VkPresentStageFlagsEXT feedback; }; struct wsi_swapchain {