diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2011-12-07 13:31:27 -0800 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2011-12-19 14:55:31 -0800 |
commit | 4dbd13cb3f5aeff6ddc85fd091b4677369c19778 (patch) | |
tree | 6386f735fdd356d300ae5bde2a6971e587e32a82 /src/glx/drisw_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 <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'src/glx/drisw_glx.c')
-rw-r--r-- | src/glx/drisw_glx.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c index 801ac7d470..204879efec 100644 --- a/src/glx/drisw_glx.c +++ b/src/glx/drisw_glx.c @@ -253,9 +253,6 @@ drisw_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); |