diff options
Diffstat (limited to 'xorg-server')
-rw-r--r-- | xorg-server/glx/glxcmds.c | 6 | ||||
-rw-r--r-- | xorg-server/glx/glxext.c | 10 |
2 files changed, 13 insertions, 3 deletions
diff --git a/xorg-server/glx/glxcmds.c b/xorg-server/glx/glxcmds.c index 4a9f61d35..a685c8c7a 100644 --- a/xorg-server/glx/glxcmds.c +++ b/xorg-server/glx/glxcmds.c @@ -217,6 +217,12 @@ static struct glx_context *__glXdirectContextCreate(__GLXscreen *screen, return context;
}
+void FlushContext(struct glx_context *cx)
+{
+ CALL_Flush( GET_DISPATCH(), () );
+ __GLX_NOTE_FLUSHED_CMDS(cx);
+}
+
/**
* Create a GL context with the given properties. This routine is used
* to implement \c glXCreateContext, \c glXCreateNewContext, and
diff --git a/xorg-server/glx/glxext.c b/xorg-server/glx/glxext.c index 958c5b544..89c1030f7 100644 --- a/xorg-server/glx/glxext.c +++ b/xorg-server/glx/glxext.c @@ -49,6 +49,8 @@ #include "indirect_table.h"
#include "indirect_util.h"
+extern void FlushContext(struct glx_context *cx);
+
/*
** The last context used by the server. It is the context that is current
** from the server's perspective.
@@ -144,12 +146,14 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid) if (c->isCurrent && (c->drawPriv == glxPriv || c->readPriv == glxPriv)) {
int i;
+ FlushContext(c);
+
(*c->loseCurrent)(c);
c->isCurrent = GL_FALSE;
if (c == __glXLastContext)
__glXFlushContextCache();
-/*
- for (i = 1; i < currentMaxClients; i++) {
+ if (!c->idExists) {
+ for (i = 1; i < currentMaxClients; i++) {
if (clients[i]) {
__GLXclientState *cl = glxGetClient(clients[i]);
@@ -162,8 +166,8 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid) }
}
}
+ }
}
-*/
}
if (c->drawPriv == glxPriv)
c->drawPriv = NULL;
|