Module: Mesa
Branch: mesa_7_5_branch
Commit: 9dfce365c7f35ddea6d81b7f595ddcd6d35382a5
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9dfce365c7f35ddea6d81b7f595ddcd6d35382a5

Author: Michel Dänzer <[email protected]>
Date:   Fri Jun 19 11:19:07 2009 +0200

Also release direct rendering resources in glXDestroyGLXPixmap.

Fixes leak running compiz with direct rendering.

---

 src/glx/x11/glxcmds.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c
index ec3e69e..77471b8 100644
--- a/src/glx/x11/glxcmds.c
+++ b/src/glx/x11/glxcmds.c
@@ -869,6 +869,20 @@ PUBLIC void glXDestroyGLXPixmap(Display *dpy, GLXPixmap 
glxpixmap)
     req->glxpixmap = glxpixmap;
     UnlockDisplay(dpy);
     SyncHandle();
+
+#ifdef GLX_DIRECT_RENDERING
+    {
+       int screen;
+       __GLXdisplayPrivate *const priv = __glXInitialize(dpy);
+       __GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, glxpixmap, &screen);
+       __GLXscreenConfigs *psc = &priv->screenConfigs[screen];
+
+       if (pdraw != NULL) {
+           (*pdraw->destroyDrawable) (pdraw);
+           __glxHashDelete(psc->drawHash, glxpixmap);
+       }
+    }
+#endif
 }
 
 PUBLIC void glXSwapBuffers(Display *dpy, GLXDrawable drawable)

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to