st/egl: Flush resources before presentation
[mesa.git] / src / gallium / state_trackers / egl / wayland / native_wayland.c
index cfdf4f870441ff61de94148e38779f908da45fad..cb0ce0d18164f417f79756c915bce35bd16c1b5e 100644 (file)
@@ -259,6 +259,10 @@ wayland_surface_swap_buffers(struct native_surface *nsurf)
    if (ret == -1)
       return EGL_FALSE;
 
+   (void) resource_surface_flush_resource(surface->rsurf, &display->base,
+                                          NATIVE_ATTACHMENT_BACK_LEFT);
+   (void) resource_surface_flush(surface->rsurf, &display->base);
+
    surface->frame_callback = wl_surface_frame(surface->win->surface);
    wl_callback_add_listener(surface->frame_callback, &frame_listener, surface);
    wl_proxy_set_queue((struct wl_proxy *) surface->frame_callback,