egl/wayland: manually swap backbuffer when using zink

this would usually occur through dri2_wl_swrast_commit_backbuffer(),
but zink triggers this functionality using vulkan wsi, which fails to
perform these updates as expected

cc: mesa-stable

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16814>
This commit is contained in:
Mike Blumenkrantz 2022-06-01 10:47:27 -04:00 committed by Marge Bot
parent 5d0f922834
commit f67bd8adfa
1 changed files with 4 additions and 0 deletions

View File

@ -2579,6 +2579,10 @@ dri2_wl_swrast_swap_buffers(_EGLDisplay *disp, _EGLSurface *draw)
return _eglError(EGL_BAD_NATIVE_WINDOW, "dri2_swap_buffers");
dri2_dpy->core->swapBuffers(dri2_surf->dri_drawable);
if (disp->Options.Zink) {
dri2_surf->current = dri2_surf->back;
dri2_surf->back = NULL;
}
return EGL_TRUE;
}