summaryrefslogtreecommitdiffstats
path: root/src/glx/drisw_glx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx/drisw_glx.c')
-rw-r--r--src/glx/drisw_glx.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
index 0ad73914575..c971de2f76f 100644
--- a/src/glx/drisw_glx.c
+++ b/src/glx/drisw_glx.c
@@ -240,11 +240,18 @@ static const __DRIextension *loader_extensions[] = {
*/
static void
-driDestroyContext(__GLXcontext *context)
+drisw_destroy_context(__GLXcontext *context)
{
struct drisw_context *pcp = (struct drisw_context *) context;
struct drisw_screen *psc = (struct drisw_screen *) context->psc;
+ glx_send_destroy_context(psc->base.dpy, context->xid);
+
+ if (context->extensions)
+ XFree((char *) context->extensions);
+
+ GarbageCollectDRIDrawables(context->psc);
+
(*psc->core->destroyContext) (pcp->driContext);
Xfree(pcp);
@@ -273,6 +280,7 @@ driUnbindContext(__GLXcontext * context)
}
static const struct glx_context_vtable drisw_context_vtable = {
+ drisw_destroy_context,
NULL,
NULL,
DRI_glXUseXFont,
@@ -318,7 +326,6 @@ driCreateContext(__GLXscreenConfigs *base,
pcp->base.vtable = &drisw_context_vtable;
pcp->base.driContext = &pcp->dri_vtable;
- pcp->dri_vtable.destroyContext = driDestroyContext;
pcp->dri_vtable.bindContext = driBindContext;
pcp->dri_vtable.unbindContext = driUnbindContext;