aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glx/glxext.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/glx/glxext.c')
-rw-r--r--xorg-server/glx/glxext.c48
1 files changed, 4 insertions, 44 deletions
diff --git a/xorg-server/glx/glxext.c b/xorg-server/glx/glxext.c
index 7d816b481..054ece76d 100644
--- a/xorg-server/glx/glxext.c
+++ b/xorg-server/glx/glxext.c
@@ -50,7 +50,6 @@
** from the server's perspective.
*/
__GLXcontext *__glXLastContext;
-__GLXcontext *__glXContextList;
/*
** X resources.
@@ -67,11 +66,6 @@ static DevPrivateKeyRec glxClientPrivateKeyRec;
#define glxClientPrivateKey (&glxClientPrivateKeyRec)
/*
-** Client that called into GLX dispatch.
-*/
-ClientPtr __pGlxClient;
-
-/*
** Forward declarations.
*/
static int __glXDispatch(ClientPtr);
@@ -138,34 +132,15 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
for (c = glxAllContexts; c; c = next) {
next = c->next;
if (c->isCurrent && (c->drawPriv == glxPriv || c->readPriv == glxPriv)) {
- int i;
-
(*c->loseCurrent)(c);
c->isCurrent = GL_FALSE;
if (c == __glXLastContext)
__glXFlushContextCache();
-
- for (i = 1; i < currentMaxClients; i++) {
- if (clients[i]) {
- __GLXclientState *cl = glxGetClient(clients[i]);
-
- if (cl->inUse) {
- int j;
-
- for (j = 0; j < cl->numCurrentContexts; j++) {
- if (cl->currentContexts[j] == c)
- cl->currentContexts[j] = NULL;
- }
- }
- }
- }
}
if (c->drawPriv == glxPriv)
c->drawPriv = NULL;
if (c->readPriv == glxPriv)
c->readPriv = NULL;
- if (!c->idExists && !c->isCurrent)
- __glXFreeContext(c);
}
glxPriv->destroy(glxPriv);
@@ -283,8 +258,6 @@ glxClientCallback (CallbackListPtr *list,
NewClientInfoRec *clientinfo = (NewClientInfoRec *) data;
ClientPtr pClient = clientinfo->client;
__GLXclientState *cl = glxGetClient(pClient);
- __GLXcontext *cx;
- int i;
switch (pClient->clientState) {
case ClientStateRunning:
@@ -298,18 +271,8 @@ glxClientCallback (CallbackListPtr *list,
break;
case ClientStateGone:
- for (i = 0; i < cl->numCurrentContexts; i++) {
- cx = cl->currentContexts[i];
- if (cx) {
- cx->isCurrent = GL_FALSE;
- if (!cx->idExists)
- __glXFreeContext(cx);
- }
- }
-
free(cl->returnBuf);
free(cl->largeCmdBuf);
- free(cl->currentContexts);
free(cl->GLClientextensions);
break;
@@ -422,7 +385,7 @@ __GLXcontext *__glXForceCurrent(__GLXclientState *cl, GLXContextTag tag,
** See if the context tag is legal; it is managed by the extension,
** so if it's invalid, we have an implementation error.
*/
- cx = (__GLXcontext *) __glXLookupContextByTag(cl, tag);
+ cx = __glXLookupContextByTag(cl, tag);
if (!cx) {
cl->client->errorValue = tag;
*error = __glXError(GLXBadContextTag);
@@ -451,7 +414,7 @@ __GLXcontext *__glXForceCurrent(__GLXclientState *cl, GLXContextTag tag,
/* Make this context the current one for the GL. */
if (!cx->isDirect) {
- if (!(*cx->forceCurrent)(cx)) {
+ if (!(*cx->makeCurrent)(cx)) {
/* Bind failed, and set the error code. Bummer */
cl->client->errorValue = cx->id;
*error = __glXError(GLXBadContextState);
@@ -571,15 +534,12 @@ static int __glXDispatch(ClientPtr client)
/*
** Use the opcode to index into the procedure table.
*/
- proc = (__GLXdispatchSingleProcPtr) __glXGetProtocolDecodeFunction(& Single_dispatch_info,
- opcode,
- client->swapped);
+ proc = __glXGetProtocolDecodeFunction(& Single_dispatch_info, opcode,
+ client->swapped);
if (proc != NULL) {
GLboolean rendering = opcode <= X_GLXRenderLarge;
__glXleaveServer(rendering);
- __pGlxClient = client;
-
retval = (*proc)(cl, (GLbyte *) stuff);
__glXenterServer(rendering);