summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorJoakim Sindholt <[email protected]>2013-05-12 16:17:00 +0200
committerChristoph Bumiller <[email protected]>2013-09-01 20:56:23 +0200
commit2a7762bdb62faa1d54c445fcec7733cf6f690ac5 (patch)
tree283f7cba48d5cbfce629cb2432d9fb5f9e277769 /src/gallium/drivers
parent1048d89907b3a11e695b2c44d1966fb4e61b1b77 (diff)
nvc0: fix blitctx memory leak
Cc: "9.2 and 9.1" <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_context.c1
-rw-r--r--src/gallium/drivers/nvc0/nvc0_context.h1
-rw-r--r--src/gallium/drivers/nvc0/nvc0_surface.c7
3 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_context.c b/src/gallium/drivers/nvc0/nvc0_context.c
index bf0c204e197..f7cfe59dc6b 100644
--- a/src/gallium/drivers/nvc0/nvc0_context.c
+++ b/src/gallium/drivers/nvc0/nvc0_context.c
@@ -111,6 +111,7 @@ nvc0_destroy(struct pipe_context *pipe)
nouveau_pushbuf_kick(nvc0->base.pushbuf, nvc0->base.pushbuf->channel);
nvc0_context_unreference_resources(nvc0);
+ nvc0_blitctx_destroy(nvc0);
#ifdef NVC0_WITH_DRAW_MODULE
draw_destroy(nvc0->draw);
diff --git a/src/gallium/drivers/nvc0/nvc0_context.h b/src/gallium/drivers/nvc0/nvc0_context.h
index 2c84cdf44c6..a175f0acc9a 100644
--- a/src/gallium/drivers/nvc0/nvc0_context.h
+++ b/src/gallium/drivers/nvc0/nvc0_context.h
@@ -96,6 +96,7 @@
struct nvc0_blitctx;
boolean nvc0_blitctx_create(struct nvc0_context *);
+void nvc0_blitctx_destroy(struct nvc0_context *);
struct nvc0_context {
struct nouveau_context base;
diff --git a/src/gallium/drivers/nvc0/nvc0_surface.c b/src/gallium/drivers/nvc0/nvc0_surface.c
index c8d26f5a124..606a2b577ff 100644
--- a/src/gallium/drivers/nvc0/nvc0_surface.c
+++ b/src/gallium/drivers/nvc0/nvc0_surface.c
@@ -1247,6 +1247,13 @@ nvc0_blitctx_create(struct nvc0_context *nvc0)
}
void
+nvc0_blitctx_destroy(struct nvc0_context *nvc0)
+{
+ if (nvc0->blit)
+ FREE(nvc0->blit);
+}
+
+void
nvc0_init_surface_functions(struct nvc0_context *nvc0)
{
struct pipe_context *pipe = &nvc0->base.pipe;