summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-10-09 19:17:30 +0100
committerJosé Fonseca <jfonseca@vmware.com>2009-10-09 19:17:30 +0100
commit7908c239e0fdc11d878b8c68d126c3364af0ee24 (patch)
tree69f718aee0ab03f65771c8a65555f253946349a0 /src
parent61f3eeb6403e404d297bdcd924c215ed36060945 (diff)
llvmpipe: Additional checks for binner block lists.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c
index 428d2d0085..a74756de7c 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup.c
@@ -101,7 +101,7 @@ static void reset_context( struct setup_context *setup )
SETUP_DEBUG("%s\n", __FUNCTION__);
- /* Free binner command lists:
+ /* Free all but last binner command lists:
*/
for (i = 0; i < setup->tiles_x; i++) {
for (j = 0; j < setup->tiles_y; j++) {
@@ -114,12 +114,13 @@ static void reset_context( struct setup_context *setup )
FREE(block);
}
+ assert(list->tail->next == NULL);
list->head = list->tail;
list->head->count = 0;
}
}
- /* Free binned data:
+ /* Free all but last binned data block:
*/
{
struct data_block_list *list = &setup->data;
@@ -130,6 +131,7 @@ static void reset_context( struct setup_context *setup )
FREE(block);
}
+ assert(list->tail->next == NULL);
list->head = list->tail;
list->head->used = 0;
}
@@ -588,6 +590,8 @@ lp_setup_destroy( struct setup_context *setup )
for (j = 0; j < TILES_Y; j++)
FREE(setup->tile[i][j].head);
+ FREE(setup->data.head);
+
lp_rast_destroy( setup->rast );
FREE( setup );
}