egl/dri2: remove superfluous flush when changing the context
authorLucas Stach <l.stach@pengutronix.de>
Thu, 6 Jan 2022 16:44:04 +0000 (17:44 +0100)
committerMarge Bot <emma+marge@anholt.net>
Mon, 17 Jan 2022 10:32:01 +0000 (10:32 +0000)
commitb33ed5406a9379dba98e2ae1b8ff47fa22e8cb6a
treed7077c77d18196ffe9ebcb09388e0e4a49a6be2d
parent88f191891990b8554aa2cd7528b723d36bb745d2
egl/dri2: remove superfluous flush when changing the context

The flush of the outgoing GL context, as required by the EGL spec for
eglMakeCurrent and extended by KHR_context_flush_control, is already
performed in the unbindContext call. There is no need to pierce through
the layers and unconditionally call glFlush() here.

Getting the out-fence FD for explicit fencing needs to move behind the
unbindContext, to make sure we are getting the fence for the most
recently flushed commands.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14379>
src/egl/drivers/dri2/egl_dri2.c