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 <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Thomas Hellstrom 2016-05-26 11:16:28 +02:00
parent e3db415456
commit fc6be40011
1 changed files with 2 additions and 4 deletions

View File

@ -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);
}
}