x11: Remove gdk_display_sync() call
This is unnecessary.
Worse, it is reentrant and can cause all sorts of avoc when processing
events halfway through initializing the Vulkan context.
It was introduced in commit e11a6a0e68 but back then GTK was barely
branched for GTK4 and Vulkan drivers were very new, and it looks like an
unnecessary workaround.
Testing did not seem to indicate any issues with just removing it, so
here it goes.
Related: #7022
This commit is contained in:
@@ -38,13 +38,6 @@ gdk_x11_vulkan_context_create_surface (GdkVulkanContext *context,
|
||||
GdkSurface *window = gdk_draw_context_get_surface (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 further calls with the resulting surface
|
||||
* do cause issues.
|
||||
*/
|
||||
gdk_display_sync (display);
|
||||
|
||||
return GDK_VK_CHECK (vkCreateXlibSurfaceKHR, gdk_vulkan_context_get_instance (context),
|
||||
&(VkXlibSurfaceCreateInfoKHR) {
|
||||
VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR,
|
||||
|
||||
Reference in New Issue
Block a user