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: fd17c018e9 ("egl/wayland: replace a couple DRI2_FLUSH checks with non-kms_swrast checks")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30964>
This commit is contained in:
David Rosca
2024-09-01 15:29:45 +02:00
committed by Marge Bot
parent 8f3bb1fb2e
commit c447c6fe17

View File

@@ -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);