Mesa (master): r300g: fix surface leaks

Marek Olšák mareko at kemper.freedesktop.org
Wed Jun 16 20:12:11 PDT 2010


Module: Mesa
Branch: master
Commit: 6771622e22399e8ed2346b830aefadf885fcec10
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6771622e22399e8ed2346b830aefadf885fcec10

Author: Marek Olšák <maraeo at gmail.com>
Date:   Thu Jun 17 05:11:07 2010 +0200

r300g: fix surface leaks

---

 src/gallium/drivers/r300/r300_render.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c
index 9b08187..6558190 100644
--- a/src/gallium/drivers/r300/r300_render.c
+++ b/src/gallium/drivers/r300/r300_render.c
@@ -1048,6 +1048,9 @@ static void r300_resource_resolve(struct pipe_context* pipe,
         srcsurf, color, 0, 0, src->width0, src->height0);
 
     OUT_CS_REG(R300_RB3D_AARESOLVE_CTL, 0x0);
+
+    pipe_surface_reference((struct pipe_surface**)&srcsurf, NULL);
+    pipe_surface_reference((struct pipe_surface**)&destsurf, NULL);
 }
 
 void r300_init_render_functions(struct r300_context *r300)



More information about the mesa-commit mailing list