vc4: Fix a leak of the last color read/write surface on context destroy.
authorEric Anholt <eric@anholt.net>
Tue, 6 Oct 2015 23:32:03 +0000 (16:32 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 6 Oct 2015 23:32:03 +0000 (16:32 -0700)
src/gallium/drivers/vc4/vc4_context.c

index 87d781d088d8eecd91146dc9607309b158667895..d490fad5167042c3724c10145edd82f705e4bf2d 100644 (file)
@@ -188,6 +188,9 @@ vc4_context_destroy(struct pipe_context *pctx)
         pipe_surface_reference(&vc4->framebuffer.cbufs[0], NULL);
         pipe_surface_reference(&vc4->framebuffer.zsbuf, NULL);
 
+        pipe_surface_reference(&vc4->color_write, NULL);
+        pipe_surface_reference(&vc4->color_read, NULL);
+
         vc4_program_fini(pctx);
 
         ralloc_free(vc4);