diff options
author | Ian Romanick <[email protected]> | 2011-12-07 13:31:27 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2011-12-19 14:55:31 -0800 |
commit | 4dbd13cb3f5aeff6ddc85fd091b4677369c19778 (patch) | |
tree | 6386f735fdd356d300ae5bde2a6971e587e32a82 /src/glx/dri_glx.c | |
parent | 3b9b42250ca9f0da6e979afc047d1c8524466076 (diff) |
glx: Send DestroyContext protocol at the correct times
Send the DestroyContext protocol immediately when glXDestroyContext is
called, and never call it when glXFreeContextEXT is called. In both
cases, either destroy the client-side structures or, if the context is
current, set xid to None so that the client-side structures will be
destroyed later.
I believe this restores the behavior of the original SGI code. See
src/glx/x11 around commit 5df82c8. The spec doesn't say anything
about glXDestroyContext not really destroying imported contexts (it
acts like glXFreeContextEXT instead), but that's what the original
code did. Note that glXFreeContextEXT on a non-imported context does
not destroy it either.
Fixes the piglit test glx-free-context.
NOTE: This is a candidate for the 7.11 branch.
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Adam Jackson <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/glx/dri_glx.c')
-rw-r--r-- | src/glx/dri_glx.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/glx/dri_glx.c b/src/glx/dri_glx.c index 9365224a696..3c14ef05fff 100644 --- a/src/glx/dri_glx.c +++ b/src/glx/dri_glx.c @@ -516,9 +516,6 @@ dri_destroy_context(struct glx_context * context) driReleaseDrawables(&pcp->base); - if (context->xid) - glx_send_destroy_context(psc->base.dpy, context->xid); - if (context->extensions) XFree((char *) context->extensions); |