nouveau: unreference fences on resource destruction
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Mon, 28 May 2012 16:01:15 +0000 (18:01 +0200)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Tue, 29 May 2012 15:00:20 +0000 (17:00 +0200)
src/gallium/drivers/nouveau/nouveau_buffer.c
src/gallium/drivers/nv50/nv50_miptree.c

index d04ac2f9f1c8329abeb247b893533b628b4891cf..e83aae0bba545381ed331a0c71266c7843b820a4 100644 (file)
@@ -94,6 +94,9 @@ nouveau_buffer_destroy(struct pipe_screen *pscreen,
    if (res->data && !(res->status & NOUVEAU_BUFFER_STATUS_USER_MEMORY))
       FREE(res->data);
 
+   nouveau_fence_ref(NULL, &res->fence);
+   nouveau_fence_ref(NULL, &res->fence_wr);
+
    FREE(res);
 }
 
index bfadbc5ab2879545e48bfa8ffaef0c815f1a80d4..5ba8cf803315d22ad26e29a8d4fa1a36db958a45 100644 (file)
@@ -116,6 +116,9 @@ nv50_miptree_destroy(struct pipe_screen *pscreen, struct pipe_resource *pt)
 
    nouveau_bo_ref(NULL, &mt->base.bo);
 
+   nouveau_fence_ref(NULL, &mt->base.fence);
+   nouveau_fence_ref(NULL, &mt->base.fence_wr);
+
    FREE(mt);
 }