egl/wayland: Flush after blitting to linear copy

We need to flush after blitting to the linear copy, or the Wayland
compositor may not see the correct linear buffer contents.

v2:
* Keep blitImage call in the same place (Daniel Stone)
* Add second flush for the blit to linear copy

Fixes: 58f90fd03f ("egl/wayland: fix glthread crashes")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9816
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27718>
This commit is contained in:
Michel Dänzer 2024-02-21 10:40:33 +01:00 committed by Marge Bot
parent f890b515ef
commit 7a6836611e

View file

@ -1643,6 +1643,12 @@ dri2_wl_swap_buffers_with_damage(_EGLDisplay *disp, _EGLSurface *draw,
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->flush) {
__DRIdrawable *dri_drawable = dri2_dpy->vtbl->get_dri_drawable(draw);
dri2_dpy->flush->flush(dri_drawable);
}
}
wl_surface_commit(dri2_surf->wl_surface_wrapper);