freedreno/a3xx: don't leak so much
authorRob Clark <robclark@freedesktop.org>
Tue, 18 Jun 2013 00:11:54 +0000 (20:11 -0400)
committerRob Clark <robclark@freedesktop.org>
Sat, 24 Aug 2013 17:58:01 +0000 (13:58 -0400)
Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/a3xx/fd3_context.c

index 3ae9b2953e4b167c0ab0fc416d216a7229f3958d..589aeed45788cfff410df533e33a519292dfdd76 100644 (file)
 static void
 fd3_context_destroy(struct pipe_context *pctx)
 {
+       struct fd3_context *fd3_ctx = fd3_context(fd_context(pctx));
+
        fd3_prog_fini(pctx);
+
+       fd_bo_del(fd3_ctx->vs_pvt_mem);
+       fd_bo_del(fd3_ctx->fs_pvt_mem);
+       fd_bo_del(fd3_ctx->vsc_size_mem);
+       fd_bo_del(fd3_ctx->vsc_pipe_mem);
+
+       pipe_resource_reference(&fd3_ctx->solid_vbuf, NULL);
+       pipe_resource_reference(&fd3_ctx->blit_texcoord_vbuf, NULL);
+
        fd_context_destroy(pctx);
 }