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>
(cherry picked from commit f67bd8adfa)
This commit is contained in:
Mike Blumenkrantz 2022-06-01 10:47:27 -04:00 committed by Dylan Baker
parent e58cd4a6f9
commit 575da2866f
2 changed files with 5 additions and 1 deletions

View file

@ -1579,7 +1579,7 @@
"description": "egl/wayland: manually swap backbuffer when using zink",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View file

@ -2546,6 +2546,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;
}