Mesa (7.9): glx: Hold on to drawables if we' re just switching to another context
Kristian Høgsberg
krh at kemper.freedesktop.org
Thu Sep 23 11:42:39 UTC 2010
Module: Mesa
Branch: 7.9
Commit: cdb3f23d8a259fa0b042656e3c96ebb4d0936d2f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cdb3f23d8a259fa0b042656e3c96ebb4d0936d2f
Author: Kristian Høgsberg <krh at bitplanet.net>
Date: Tue Sep 21 09:56:05 2010 -0400
glx: Hold on to drawables if we're just switching to another context
https://bugs.freedesktop.org/show_bug.cgi?id=30234
---
src/glx/dri2_glx.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 8247588..911298b 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -118,6 +118,8 @@ dri2_destroy_context(struct glx_context *context)
struct dri2_context *pcp = (struct dri2_context *) context;
struct dri2_screen *psc = (struct dri2_screen *) context->psc;
+ driReleaseDrawables(&pcp->base);
+
if (context->xid)
glx_send_destroy_context(psc->base.dpy, context->xid);
@@ -158,7 +160,8 @@ dri2_unbind_context(struct glx_context *context, struct glx_context *new)
(*psc->core->unbindContext) (pcp->driContext);
- driReleaseDrawables(&pcp->base);
+ if (context == new)
+ driReleaseDrawables(&pcp->base);
}
static struct glx_context *
More information about the mesa-commit
mailing list