r300g: unreference a zbuffer surface after decompression
authorMarek Olšák <maraeo@gmail.com>
Sat, 7 May 2011 21:31:37 +0000 (23:31 +0200)
committerMarek Olšák <maraeo@gmail.com>
Mon, 9 May 2011 18:01:58 +0000 (20:01 +0200)
src/gallium/drivers/r300/r300_blit.c

index 04ed86c4ef612e486256ce77eb801505893b078b..95a43fe675245c6ac8b02525e8eb1fb30ac2b05e 100644 (file)
@@ -377,6 +377,8 @@ void r300_decompress_zmask_locked(struct r300_context *r300)
     r300_decompress_zmask_locked_unsafe(r300);
     r300->context.set_framebuffer_state(&r300->context, &saved_fb);
     util_unreference_framebuffer_state(&saved_fb);
+
+    pipe_surface_reference(&r300->locked_zbuffer, NULL);
 }
 
 /* Copy a block of pixels from one surface to another using HW. */