r300g: fix surface leaks
authorMarek Olšák <maraeo@gmail.com>
Thu, 17 Jun 2010 03:11:07 +0000 (05:11 +0200)
committerMarek Olšák <maraeo@gmail.com>
Thu, 17 Jun 2010 03:11:07 +0000 (05:11 +0200)
src/gallium/drivers/r300/r300_render.c

index 9b081870ff8a63de018ffacd6a39d6a4435550b9..655819001c96b7aeffc62affd45eab5f3d6313f2 100644 (file)
@@ -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)