egl/kopper: Add assert for no kopper in dri2_copy_region.

This shouldn't be doing a swapBuffers, that's not what this function is
supposed to do.  But also, we shouldn't be doing this from zink, which the
swap was introduced for, because we don't implement the extension.  Cleans
up some strangeness from 3c4be122cc ("egl: implement more hooks for
swrast")

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21317>
This commit is contained in:
Emma Anholt 2023-02-14 10:24:25 -08:00 committed by Marge Bot
parent 24a32b2cab
commit a6b850e335

View file

@ -878,10 +878,8 @@ dri2_copy_region(_EGLDisplay *disp,
if (draw->Type == EGL_PIXMAP_BIT || draw->Type == EGL_PBUFFER_BIT)
return EGL_TRUE;
if (dri2_dpy->flush)
dri2_dpy->flush->flush(dri2_surf->dri_drawable);
else
dri2_dpy->core->swapBuffers(dri2_surf->dri_drawable);
assert(!dri2_dpy->kopper);
dri2_dpy->flush->flush(dri2_surf->dri_drawable);
if (dri2_surf->have_fake_front)
render_attachment = XCB_DRI2_ATTACHMENT_BUFFER_FAKE_FRONT_LEFT;