From c447c6fe17e85bf56992bb099cfb92f358459e33 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Sun, 1 Sep 2024 15:29:45 +0200 Subject: [PATCH] egl/wayland: Fix flush after blit in swap buffers multi-GPU case dri2_wl_swap_buffers_with_damage is not used by swrast, so the swrast condition there is wrong and instead it should always flush. Fixes: fd17c018e9a ("egl/wayland: replace a couple DRI2_FLUSH checks with non-kms_swrast checks") Reviewed-By: Mike Blumenkrantz Part-of: --- src/egl/drivers/dri2/platform_wayland.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index 6f5698e189d..6c41a3862ad 100644 --- a/src/egl/drivers/dri2/platform_wayland.c +++ b/src/egl/drivers/dri2/platform_wayland.c @@ -1703,17 +1703,13 @@ dri2_wl_swap_buffers_with_damage(_EGLDisplay *disp, _EGLSurface *draw, if (dri2_dpy->fd_render_gpu != dri2_dpy->fd_display_gpu) { _EGLContext *ctx = _eglGetCurrentContext(); struct dri2_egl_context *dri2_ctx = dri2_egl_context(ctx); + __DRIdrawable *dri_drawable = dri2_dpy->vtbl->get_dri_drawable(draw); dri2_blit_image( dri2_ctx->dri_context, dri2_surf->current->linear_copy, dri2_surf->current->dri_image, 0, 0, dri2_surf->base.Width, dri2_surf->base.Height, 0, 0, dri2_surf->base.Width, dri2_surf->base.Height, 0); - - if (dri2_dpy->swrast_not_kms) { - __DRIdrawable *dri_drawable = dri2_dpy->vtbl->get_dri_drawable(draw); - - dri_flush_drawable(dri_drawable); - } + dri_flush_drawable(dri_drawable); } wl_surface_commit(dri2_surf->wl_surface_wrapper);