summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2016-05-06 16:25:45 +0200
committerSamuel Pitoiset <[email protected]>2016-05-06 15:15:32 +0200
commit44de03b0f8e14285d3a870934f805846b1d90f19 (patch)
treecd3f9189753da9fef826ea6d6404162115868b9b /src
parent8ae78f7d2828778a386ed1737f17add69eb035a9 (diff)
nvc0: unreference images when the context is destroyed
Like other resources, we need to unreference all images. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/nouveau/nvc0/nvc0_context.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_context.c b/src/gallium/drivers/nouveau/nvc0/nvc0_context.c
index f6c58f2b88f..428b33d3318 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_context.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_context.c
@@ -161,6 +161,10 @@ nvc0_context_unreference_resources(struct nvc0_context *nvc0)
for (i = 0; i < NVC0_MAX_BUFFERS; ++i)
pipe_resource_reference(&nvc0->buffers[s][i].buffer, NULL);
+ for (s = 0; s < 6; ++s)
+ for (i = 0; i < NVC0_MAX_IMAGES; ++i)
+ pipe_resource_reference(&nvc0->images[s][i].resource, NULL);
+
for (i = 0; i < nvc0->num_tfbbufs; ++i)
pipe_so_target_reference(&nvc0->tfbbuf[i], NULL);