egl/wayland/kopper: actually call kopper swapbuffer functions

this allows passing through the zsbuf discard flag

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
This commit is contained in:
Mike Blumenkrantz 2024-02-13 16:25:49 -05:00 committed by Marge Bot
parent 2a8c6cf7ac
commit 1959691033

View file

@ -2521,10 +2521,17 @@ dri2_wl_kopper_swap_buffers_with_damage(_EGLDisplay *disp, _EGLSurface *draw,
if (!dri2_surf->wl_win)
return _eglError(EGL_BAD_NATIVE_WINDOW, "dri2_swap_buffers");
if (n_rects)
dri2_dpy->core->swapBuffersWithDamage(dri2_surf->dri_drawable, n_rects, rects);
else
dri2_dpy->core->swapBuffers(dri2_surf->dri_drawable);
if (n_rects) {
if (dri2_dpy->kopper)
dri2_dpy->kopper->swapBuffersWithDamage(dri2_surf->dri_drawable, __DRI2_FLUSH_INVALIDATE_ANCILLARY, n_rects, rects);
else
dri2_dpy->core->swapBuffersWithDamage(dri2_surf->dri_drawable, n_rects, rects);
} else {
if (dri2_dpy->kopper)
dri2_dpy->kopper->swapBuffers(dri2_surf->dri_drawable, __DRI2_FLUSH_INVALIDATE_ANCILLARY);
else
dri2_dpy->core->swapBuffers(dri2_surf->dri_drawable);
}
dri2_surf->current = dri2_surf->back;
dri2_surf->back = NULL;