summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/postprocess
diff options
context:
space:
mode:
authorThomas Hellstrom <[email protected]>2016-05-26 11:16:28 +0200
committerThomas Hellstrom <[email protected]>2016-09-01 07:59:49 +0200
commitfc6be400115c0caa4e5cbb810917d6b8a11596a4 (patch)
treede21f639cef958e90509642ff7e61ef0b1784065 /src/gallium/auxiliary/postprocess
parente3db41545676d0b7961ac4caa5ef645cdbf12691 (diff)
gallium/postprocess: Fix resource freeing
The code was triggering asserts in DEBUG builds of the SVGA driver since the reference count of the resource was never decremented before destroy. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/postprocess')
-rw-r--r--src/gallium/auxiliary/postprocess/pp_mlaa.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/postprocess/pp_mlaa.c b/src/gallium/auxiliary/postprocess/pp_mlaa.c
index 502fcf169a6..0edd01f3f5d 100644
--- a/src/gallium/auxiliary/postprocess/pp_mlaa.c
+++ b/src/gallium/auxiliary/postprocess/pp_mlaa.c
@@ -353,13 +353,11 @@ void
pp_jimenezmlaa_free(struct pp_queue_t *ppq, unsigned int n)
{
if (ppq->areamaptex) {
- ppq->p->screen->resource_destroy(ppq->p->screen, ppq->areamaptex);
- ppq->areamaptex = NULL;
+ pipe_resource_reference(&ppq->areamaptex, NULL);
}
if (ppq->constbuf) {
- ppq->p->screen->resource_destroy(ppq->p->screen, ppq->constbuf);
- ppq->constbuf = NULL;
+ pipe_resource_reference(&ppq->constbuf, NULL);
}
}