diff options
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_scene.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_scene.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_scene.c b/src/gallium/drivers/llvmpipe/lp_scene.c index 887f2dbad9..59e4c18ad0 100644 --- a/src/gallium/drivers/llvmpipe/lp_scene.c +++ b/src/gallium/drivers/llvmpipe/lp_scene.c @@ -30,7 +30,6 @@ #include "util/u_memory.h" #include "util/u_inlines.h" #include "util/u_simple_list.h" -#include "util/u_surface.h" #include "lp_scene.h" #include "lp_scene_queue.h" @@ -210,25 +209,31 @@ lp_scene_reset(struct lp_scene *scene ) -void +struct cmd_block * lp_bin_new_cmd_block( struct cmd_block_list *list ) { struct cmd_block *block = MALLOC_STRUCT(cmd_block); - list->tail->next = block; - list->tail = block; - block->next = NULL; - block->count = 0; + if (block) { + list->tail->next = block; + list->tail = block; + block->next = NULL; + block->count = 0; + } + return block; } -void +struct data_block * lp_bin_new_data_block( struct data_block_list *list ) { struct data_block *block = MALLOC_STRUCT(data_block); - list->tail->next = block; - list->tail = block; - block->next = NULL; - block->used = 0; + if (block) { + list->tail->next = block; + list->tail = block; + block->next = NULL; + block->used = 0; + } + return block; } |