From: Jonas Ã…dahl Date: Wed, 21 Mar 2018 06:08:13 +0000 (+0800) Subject: wayland/vulkancontext: Sync surface state before vkQueuePresentKHR X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~22^2~826^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7e102f887924a31eaf635823adf884236f434d19;p=gtk4.git wayland/vulkancontext: Sync surface state before vkQueuePresentKHR A side effect of vkQueuePresentKHR is the Vulkan implementation calling wl_surface_commit() on the corresponding Wayland surface. Thus, before this, we must synchronize the surface state (e.g. opaque region, window geometry, etc) that changed since last time. Prior to this commit this was done after calling vkQueuePresentKHR(), causing the surface state to always correspond to the previous buffer state. As of this commit this is now done before calling vkQueuePresentKHR(), thus before wl_surface_commit(). --- diff --git a/gdk/wayland/gdkvulkancontext-wayland.c b/gdk/wayland/gdkvulkancontext-wayland.c index 4e85469741..b5e82139f5 100644 --- a/gdk/wayland/gdkvulkancontext-wayland.c +++ b/gdk/wayland/gdkvulkancontext-wayland.c @@ -66,9 +66,9 @@ gdk_vulkan_context_wayland_end_frame (GdkDrawContext *context, { GdkSurface *surface = gdk_draw_context_get_surface (GDK_DRAW_CONTEXT (context)); - GDK_DRAW_CONTEXT_CLASS (gdk_wayland_vulkan_context_parent_class)->end_frame (context, painted, damage); - gdk_wayland_surface_sync (surface); + + GDK_DRAW_CONTEXT_CLASS (gdk_wayland_vulkan_context_parent_class)->end_frame (context, painted, damage); } static void