diff options
Diffstat (limited to 'src/glx/x11')
-rw-r--r-- | src/glx/x11/glxclient.h | 5 | ||||
-rw-r--r-- | src/glx/x11/glxcmds.c | 2 | ||||
-rw-r--r-- | src/glx/x11/glxext.c | 4 |
3 files changed, 9 insertions, 2 deletions
diff --git a/src/glx/x11/glxclient.h b/src/glx/x11/glxclient.h index 730caf7302..ea90282b08 100644 --- a/src/glx/x11/glxclient.h +++ b/src/glx/x11/glxclient.h @@ -310,6 +310,11 @@ struct __GLXcontextRec { GLenum error; /** + * Whether this context does direct rendering. + */ + Bool isDirect; + + /** * \c dpy of current display for this context. Will be \c NULL if not * current to any display, or if this is the "dummy context". */ diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c index adf5311674..8d0f07fd0a 100644 --- a/src/glx/x11/glxcmds.c +++ b/src/glx/x11/glxcmds.c @@ -313,6 +313,7 @@ GLXContext AllocateGLXContext( Display *dpy ) gc->fillImage = __glFillImage; gc->pc = gc->buf; gc->bufEnd = gc->buf + bufSize; + gc->isDirect = GL_FALSE; if (__glXDebug) { /* ** Set limit register so that there will be one command per packet @@ -404,6 +405,7 @@ CreateContext(Display *dpy, XVisualInfo *vis, gc->screen = mode->screen; gc->psc = psc; gc->mode = mode; + gc->isDirect = GL_TRUE; } } #endif diff --git a/src/glx/x11/glxext.c b/src/glx/x11/glxext.c index 1d9be29741..525faab10e 100644 --- a/src/glx/x11/glxext.c +++ b/src/glx/x11/glxext.c @@ -1256,7 +1256,7 @@ static Bool MakeContextCurrent(Display *dpy, GLXDrawable draw, /* Send a glXMakeCurrent request to bind the new context. */ bindReturnValue = SendMakeCurrentRequest(dpy, opcode, gc ? gc->xid : None, - ((dpy != oldGC->currentDpy) || oldGC->driContext) + ((dpy != oldGC->currentDpy) || oldGC->isDirect) ? None : oldGC->currentContextTag, draw, read, &reply); } @@ -1267,7 +1267,7 @@ static Bool MakeContextCurrent(Display *dpy, GLXDrawable draw, } if ((dpy != oldGC->currentDpy || (gc && gc->driContext)) && - !oldGC->driContext && oldGC != &dummyContext) { + !oldGC->isDirect && oldGC != &dummyContext) { xGLXMakeCurrentReply dummy_reply; /* We are either switching from one dpy to another and have to |