From 941fbd9047ec81e57ec147c8a8feaaeaeb53710b Mon Sep 17 00:00:00 2001 From: Hans-Kristian Arntzen Date: Thu, 19 Feb 2026 12:56:55 +0100 Subject: [PATCH] wsi/x11: Set up screen resources on swapchain creation. Signed-off-by: Hans-Kristian Arntzen Reviewed-and-tested-by: Mario Kleiner Part-of: --- src/vulkan/wsi/wsi_common_x11.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c index 86b7720a2dc..7353541e9a5 100644 --- a/src/vulkan/wsi/wsi_common_x11.c +++ b/src/vulkan/wsi/wsi_common_x11.c @@ -1210,6 +1210,8 @@ struct x11_swapchain { mtx_t thread_state_lock; struct u_cnd_monotonic thread_state_cond; + struct wsi_x11_screen_resources * screen_resources; + /* Lock and condition variable for present wait. * Signalled by event thread and waited on by callers to PresentWaitKHR. */ mtx_t present_progress_mutex; @@ -2914,6 +2916,8 @@ x11_surface_create_swapchain(VkIcdSurfaceBase *icd_surface, goto fail_init_event_queue; } + chain->screen_resources = wsi_x11_connection_find_screen_resources(wsi_device, conn, window); + /* It is safe to set it here as only one swapchain can be associated with * the window, and swapchain creation does the association. At this point * we know the creation is going to succeed. */