Commit e11a6a0e authored by Benjamin Otte's avatar Benjamin Otte

x11: Call gdk_display_sync() when creating Vulkan surfaces

The Vulkan driver wants to operate on an X Window that it is sure does
parent e22cb94e
......@@ -39,6 +39,13 @@ gdk_x11_vulkan_context_create_surface (GdkVulkanContext *context,
GdkWindow *window = gdk_draw_context_get_window (GDK_DRAW_CONTEXT (context));
GdkDisplay *display = gdk_draw_context_get_display (GDK_DRAW_CONTEXT (context));
/* This is necessary so that Vulkan sees the Window.
* Usually, vkCreateXlibSurfaceKHR() will not cause a problem to happen as
* it just creates resources, but futher calls with the resulting surface
* do cause issues.
gdk_display_sync (display);
return GDK_VK_CHECK (vkCreateXlibSurfaceKHR, gdk_vulkan_context_get_instance (context),
&(VkXlibSurfaceCreateInfoKHR) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment