r600g: Cleanup block bo references in r600_context_fini().
authorHenri Verbeet <hverbeet@gmail.com>
Sun, 5 Dec 2010 17:42:43 +0000 (18:42 +0100)
committerHenri Verbeet <hverbeet@gmail.com>
Sun, 5 Dec 2010 17:44:44 +0000 (18:44 +0100)
src/gallium/winsys/r600/drm/r600_hw_context.c

index de228918953590f91722ee2358ee027252b0dc29..50b7e6d8b2c40e0836367539753d9f8fc711b3c2 100644 (file)
@@ -618,6 +618,9 @@ void r600_context_fini(struct r600_context *ctx)
                                        range = &ctx->range[CTX_RANGE_ID(ctx, offset)];
                                        range->blocks[CTX_BLOCK_ID(ctx, offset)] = NULL;
                                }
+                               for (int k = 1; k <= block->nbo; k++) {
+                                       r600_bo_reference(ctx->radeon, &block->reloc[k].bo, NULL);
+                               }
                                free(block);
                        }
                }