glx: Make sure that DRI2/swrast calls haven't changed the GL context.
authorEric Anholt <eric@anholt.net>
Wed, 9 Apr 2014 17:23:01 +0000 (10:23 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 23 Apr 2014 17:32:15 +0000 (10:32 -0700)
commitab6e958a2e611b03e475c16d10beb9961d8dffc8
treef3d9479e5c7a89116c6cc516cf2ce22aa63333f6
parentf3f2fb6baac3d2b248eb4b0da13fe95e9dc3de7d
glx: Make sure that DRI2/swrast calls haven't changed the GL context.

These functions are called from the GL driver, in some series of GL
calls by GLX.  If some server component (like glamor CreatePixmap for
GetBuffers()) changes the GL context on us, we need to set it back or
the later GL calls will land in the glamor context instead of the GLX
context.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
glx/glxdri2.c
glx/glxdriswrast.c