diff options
-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;
}
|