From d7dbc666367438ee9efe748505907b36bba6b66a Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 9 Dec 2009 14:53:33 -0700 Subject: llvmpipe: checkpoint: begin plugging in bin queue code --- src/gallium/drivers/llvmpipe/lp_rast.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/gallium/drivers/llvmpipe/lp_rast.c') diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c index 7cd046cc39..0471ad7e2f 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast.c +++ b/src/gallium/drivers/llvmpipe/lp_rast.c @@ -29,6 +29,7 @@ #include "util/u_math.h" #include "util/u_cpu_detect.h" +#include "lp_bin_queue.h" #include "lp_debug.h" #include "lp_state.h" #include "lp_rast.h" @@ -655,7 +656,13 @@ create_rast_threads(struct lp_rasterizer *rast) -struct lp_rasterizer *lp_rast_create( struct pipe_screen *screen ) +/** + * Create new lp_rasterizer. + * \param empty the queue to put empty bins on after we've finished + * processing them. + */ +struct lp_rasterizer * +lp_rast_create( struct pipe_screen *screen, struct lp_bins_queue *empty ) { struct lp_rasterizer *rast; unsigned i; @@ -666,6 +673,9 @@ struct lp_rasterizer *lp_rast_create( struct pipe_screen *screen ) rast->screen = screen; + rast->empty_bins = empty; + rast->full_bins = lp_bins_queue_create(); + for (i = 0; i < Elements(rast->tasks); i++) { rast->tasks[i].tile.color = align_malloc( TILE_SIZE*TILE_SIZE*4, 16 ); rast->tasks[i].tile.depth = align_malloc( TILE_SIZE*TILE_SIZE*4, 16 ); -- cgit v1.2.3