diff options
author | marha <marha@users.sourceforge.net> | 2012-01-30 11:17:14 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-01-30 11:17:14 +0100 |
commit | c69f5d9bd34d3fd3738c000f5d91ceb26770f7e5 (patch) | |
tree | 3cee6b4fc9ac4c54ac0068c187edf0dcdabfb515 /xorg-server/hw | |
parent | 9126bebe40113c6bbe0af98d4dd5fc607b85894e (diff) | |
download | vcxsrv-c69f5d9bd34d3fd3738c000f5d91ceb26770f7e5.tar.gz vcxsrv-c69f5d9bd34d3fd3738c000f5d91ceb26770f7e5.tar.bz2 vcxsrv-c69f5d9bd34d3fd3738c000f5d91ceb26770f7e5.zip |
call glapi_set_dispatch to NULL when context is not current anymore
Diffstat (limited to 'xorg-server/hw')
-rw-r--r-- | xorg-server/hw/xwin/glx/indirect.c | 5 | ||||
-rw-r--r-- | xorg-server/hw/xwin/swrastwgl_dri/swrastwgl_dri.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/xorg-server/hw/xwin/glx/indirect.c b/xorg-server/hw/xwin/glx/indirect.c index f9d623cb2..6b1265d70 100644 --- a/xorg-server/hw/xwin/glx/indirect.c +++ b/xorg-server/hw/xwin/glx/indirect.c @@ -1609,6 +1609,7 @@ glxWinContextMakeCurrent(__GLXcontext *base) { glxWinDeferredCreateContext(gc, drawPriv); } + _glapi_set_dispatch(gc->Dispatch); if (gc->ctx == NULL) { @@ -1696,6 +1697,7 @@ glxWinContextLoseCurrent(__GLXcontext *base) } base->isCurrent=FALSE; /* It looks like glx is not doing this */ + _glapi_set_dispatch(NULL); return ret; } @@ -1753,6 +1755,7 @@ glxWinContextDestroy(__GLXcontext *base) free(gc->Dispatch); free(gc); + _glapi_set_dispatch(NULL); } } @@ -1787,7 +1790,7 @@ glxWinCreateContext(__GLXscreen *screen, // actual native GL context creation is deferred until attach() //context->ctx = NULL; already done with memset context->shareContext = shareContext; - + context->Dispatch=calloc(sizeof(void*), (sizeof(struct _glapi_table) / sizeof(void *) + MAX_EXTENSION_FUNCS)); _glapi_set_dispatch(context->Dispatch); diff --git a/xorg-server/hw/xwin/swrastwgl_dri/swrastwgl_dri.c b/xorg-server/hw/xwin/swrastwgl_dri/swrastwgl_dri.c index 1be5e2caf..4c20c09ab 100644 --- a/xorg-server/hw/xwin/swrastwgl_dri/swrastwgl_dri.c +++ b/xorg-server/hw/xwin/swrastwgl_dri/swrastwgl_dri.c @@ -1053,6 +1053,7 @@ static int driBindContext(__DRIcontext *pcp, __DRIdrawable *pdp, __DRIdrawable * wglResolveExtensionProcs();
}
current_pcp=pcp;
+ _glapi_set_dispatch(pcp->Dispatch);
}
return GL_TRUE;
@@ -1110,6 +1111,7 @@ static int driUnbindContext(__DRIcontext *pcp) pcp->driDrawablePriv = NULL;
pcp->driReadablePriv = NULL;
+ _glapi_set_dispatch(NULL);
return GL_TRUE;
}
|