diff options
author | José Fonseca <[email protected]> | 2010-01-13 21:51:47 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2010-01-13 21:51:47 +0000 |
commit | a1acbff299c444913418e65da473745cd901a2db (patch) | |
tree | 703a522d50872a584529032a8a6b0b9f6a86fb6b /src/gallium/drivers/llvmpipe/lp_scene.c | |
parent | 4231006e29cbf9fb54c72acf35009f3b18fe62ab (diff) |
llvmpipe: Reset the bin when shading a whole tile with an opaque shader.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_scene.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_scene.c | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_scene.c b/src/gallium/drivers/llvmpipe/lp_scene.c index 45d54462678..967d666bb46 100644 --- a/src/gallium/drivers/llvmpipe/lp_scene.c +++ b/src/gallium/drivers/llvmpipe/lp_scene.c @@ -88,6 +88,25 @@ lp_scene_is_empty(struct lp_scene *scene ) } +void +lp_scene_bin_reset(struct lp_scene *scene, unsigned x, unsigned y) +{ + struct cmd_bin *bin = lp_scene_get_bin(scene, x, y); + struct cmd_block_list *list = &bin->commands; + struct cmd_block *block; + struct cmd_block *tmp; + + for (block = list->head; block != list->tail; block = tmp) { + tmp = block->next; + FREE(block); + } + + assert(list->tail->next == NULL); + list->head = list->tail; + list->head->count = 0; +} + + /** * Set scene to empty state. */ @@ -100,19 +119,7 @@ lp_scene_reset(struct lp_scene *scene ) */ for (i = 0; i < scene->tiles_x; i++) { for (j = 0; j < scene->tiles_y; j++) { - struct cmd_bin *bin = lp_scene_get_bin(scene, i, j); - struct cmd_block_list *list = &bin->commands; - struct cmd_block *block; - struct cmd_block *tmp; - - for (block = list->head; block != list->tail; block = tmp) { - tmp = block->next; - FREE(block); - } - - assert(list->tail->next == NULL); - list->head = list->tail; - list->head->count = 0; + lp_scene_bin_reset(scene, i, j); } } |