summaryrefslogtreecommitdiff
path: root/glx/glxext.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2014-04-17 18:23:51 -0700
committerEric Anholt <eric@anholt.net>2014-04-23 10:32:07 -0700
commit789509ef5324ce9141222fa92dea51b5cc777209 (patch)
tree3446dd13750c648d0d60b2c0c53b2c24ee4bee28 /glx/glxext.c
parentabf12027063dbe22bec1d055ad8db365cf07395a (diff)
glx: Move GLX MakeCurrent lastGLContext updates next to makeCurrent().
We want to make sure that lastGLContext is set correctly during makeCurrent, because we may have recursive GL context changes in the DRI2 interfaces due to glamor. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'glx/glxext.c')
-rw-r--r--glx/glxext.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/glx/glxext.c b/glx/glxext.c
index 85fd219df..98557670a 100644
--- a/glx/glxext.c
+++ b/glx/glxext.c
@@ -444,14 +444,15 @@ __glXForceCurrent(__GLXclientState * cl, GLXContextTag tag, int *error)
/* Make this context the current one for the GL. */
if (!cx->isDirect) {
+ lastGLContext = cx;
if (!(*cx->makeCurrent) (cx)) {
/* Bind failed, and set the error code. Bummer */
+ lastGLContext = NULL;
cl->client->errorValue = cx->id;
*error = __glXError(GLXBadContextState);
return 0;
}
}
- lastGLContext = cx;
return cx;
}