Merge remote-tracking branch 'jturney/indirect-glx-fixes'
This commit is contained in:
commit
3e7218a6c2
|
@ -413,7 +413,9 @@ __glXDisp_DestroyContext(__GLXclientState * cl, GLbyte * pc)
|
|||
&glxc, &err))
|
||||
return err;
|
||||
|
||||
FreeResourceByType(req->context, __glXContextRes, FALSE);
|
||||
glxc->idExists = GL_FALSE;
|
||||
if (!glxc->currentClient)
|
||||
FreeResourceByType(req->context, __glXContextRes, FALSE);
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
|
|
@ -66,6 +66,7 @@ static DevPrivateKeyRec glxClientPrivateKeyRec;
|
|||
** Forward declarations.
|
||||
*/
|
||||
static int __glXDispatch(ClientPtr);
|
||||
static GLboolean __glXFreeContext(__GLXcontext * cx);
|
||||
|
||||
/*
|
||||
** Called when the extension is reset.
|
||||
|
@ -133,6 +134,9 @@ DrawableGone(__GLXdrawable * glxPriv, XID xid)
|
|||
next = c->next;
|
||||
if (c->currentClient &&
|
||||
(c->drawPriv == glxPriv || c->readPriv == glxPriv)) {
|
||||
/* flush the context */
|
||||
glFlush();
|
||||
c->hasUnflushedCommands = GL_FALSE;
|
||||
/* just force a re-bind the next time through */
|
||||
(*c->loseCurrent) (c);
|
||||
lastGLContext = NULL;
|
||||
|
@ -186,7 +190,7 @@ __glXRemoveFromContextList(__GLXcontext * cx)
|
|||
/*
|
||||
** Free a context.
|
||||
*/
|
||||
GLboolean
|
||||
static GLboolean
|
||||
__glXFreeContext(__GLXcontext * cx)
|
||||
{
|
||||
if (cx->idExists || cx->currentClient)
|
||||
|
@ -291,7 +295,7 @@ glxClientCallback(CallbackListPtr *list, void *closure, void *data)
|
|||
c->loseCurrent(c);
|
||||
lastGLContext = NULL;
|
||||
c->currentClient = NULL;
|
||||
__glXFreeContext(c);
|
||||
FreeResourceByType(c->id, __glXContextRes, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,6 @@
|
|||
#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1
|
||||
#endif
|
||||
|
||||
extern GLboolean __glXFreeContext(__GLXcontext * glxc);
|
||||
extern void __glXFlushContextCache(void);
|
||||
|
||||
extern Bool __glXAddContext(__GLXcontext * cx);
|
||||
|
|
Loading…
Reference in New Issue
Block a user