summaryrefslogtreecommitdiffstats
path: root/0014-freedreno-a3xx-don-t-leak-so-much.patch
blob: 0ac91102b0e71219c791cc415a96dbfca53bbe1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From 0b2c5119cb772751edb3c42c9c0545443e26fd7f Mon Sep 17 00:00:00 2001
From: Rob Clark <robclark@freedesktop.org>
Date: Mon, 17 Jun 2013 20:11:54 -0400
Subject: [PATCH 14/17] freedreno/a3xx: don't leak so much

Signed-off-by: Rob Clark <robclark@freedesktop.org>
---
 src/gallium/drivers/freedreno/a3xx/fd3_context.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_context.c b/src/gallium/drivers/freedreno/a3xx/fd3_context.c
index 3ae9b29..589aeed 100644
--- a/src/gallium/drivers/freedreno/a3xx/fd3_context.c
+++ b/src/gallium/drivers/freedreno/a3xx/fd3_context.c
@@ -40,7 +40,18 @@
 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);
 }
 
-- 
1.8.4.2