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