From 074ab1db296c3b4cefb1cfcb3d1b3ea540f8630a Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Wed, 19 Jun 2024 09:06:45 -0500 Subject: [PATCH] wsi/x11: add support for PresentWait2 It's the same as PresentWait here, and always available. Signed-off-by: Derek Foreman Part-of: --- src/vulkan/wsi/wsi_common_x11.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c index fb1809e4d57..898cbc12af7 100644 --- a/src/vulkan/wsi/wsi_common_x11.c +++ b/src/vulkan/wsi/wsi_common_x11.c @@ -828,6 +828,20 @@ x11_surface_get_capabilities2(VkIcdSurfaceBase *icd_surface, break; } + case VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_PRESENT_ID_2_KHR: { + VkSurfaceCapabilitiesPresentId2KHR *pid2 = (void *)ext; + + pid2->presentId2Supported = VK_TRUE; + break; + } + + case VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_PRESENT_WAIT_2_KHR: { + VkSurfaceCapabilitiesPresentWait2KHR *pwait2 = (void *)ext; + + pwait2->presentWait2Supported = VK_TRUE; + break; + } + default: /* Ignored */ break; @@ -2686,6 +2700,7 @@ x11_surface_create_swapchain(VkIcdSurfaceBase *icd_surface, chain->base.acquire_next_image = x11_acquire_next_image; chain->base.queue_present = x11_queue_present; chain->base.wait_for_present = x11_wait_for_present; + chain->base.wait_for_present2 = x11_wait_for_present; chain->base.release_images = x11_release_images; chain->base.set_present_mode = x11_set_present_mode; chain->base.present_mode = present_mode;