glx/dri: Fix DRI drawable release at MakeCurrent time
authorAdam Jackson <ajax@redhat.com>
Tue, 21 Jun 2022 20:07:19 +0000 (16:07 -0400)
committerMarge Bot <emma+marge@anholt.net>
Mon, 27 Jun 2022 20:03:26 +0000 (20:03 +0000)
commit31b04e420b0eb080084c6323066ea0b83929d59e
treeedba689e117ebf36674a48db9895cb46e87edbdd
parent59944831a794e3797839fd7066e34c802c69d43e
glx/dri: Fix DRI drawable release at MakeCurrent time

We want to release the drawables of the context we're coming from, but
we were releasing them from the context we're switching to. This is
probably not a big deal normally because both contexts are likely to be
on the same display, which is all that driReleaseDrawables is really
sensitive to. But if the contexts are on different Displays this would
go quite wrong.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17176>
src/glx/dri2_glx.c
src/glx/dri3_glx.c
src/glx/dri_common.c
src/glx/drisw_glx.c
src/glx/driwindows_glx.c