summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_setup_context.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-12-04 10:41:38 -0700
committerBrian Paul <[email protected]>2009-12-04 10:41:42 -0700
commit9dca0100489c7a7c02af77da42a39dbe1560d7e2 (patch)
tree01305cc4c1257a13a9f31ccbacd9f5392f35a029 /src/gallium/drivers/llvmpipe/lp_setup_context.h
parent1796ffd3bcf74a94c800717e77abaf9902c50b4d (diff)
llvmpipe: struct cmd_bin
Just introducing a new structure to represent a per-tile bin.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_setup_context.h')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup_context.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_context.h b/src/gallium/drivers/llvmpipe/lp_setup_context.h
index b502f00eea4..1715048f760 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_context.h
+++ b/src/gallium/drivers/llvmpipe/lp_setup_context.h
@@ -71,11 +71,20 @@ struct cmd_block_list {
struct cmd_block *tail;
};
+/**
+ * For each screen tile we have one of these bins.
+ */
+struct cmd_bin {
+ struct cmd_block_list commands;
+ struct lp_rast_state *curr_state;
+};
+
+
struct data_block_list {
struct data_block *head;
struct data_block *tail;
};
-
+
/**
* Point/line/triangle setup context.
@@ -87,12 +96,12 @@ struct setup_context {
struct lp_rasterizer *rast;
/**
- * Per-bin data goes into the 'tile' cmd_block_lists.
+ * Per-bin data goes into the 'tile' bins.
* Shared bin data goes into the 'data' buffer.
* When there are multiple threads, will want to double-buffer the
* bin arrays:
*/
- struct cmd_block_list tile[TILES_X][TILES_Y];
+ struct cmd_bin tile[TILES_X][TILES_Y];
struct data_block_list data;
/* size of framebuffer, in tiles */
@@ -212,10 +221,12 @@ static INLINE void *get_data_aligned( struct data_block_list *list,
/* Add a command to a given bin.
*/
-static INLINE void bin_command( struct cmd_block_list *list,
+static INLINE void bin_command( struct cmd_bin *bin,
lp_rast_cmd cmd,
union lp_rast_cmd_arg arg )
{
+ struct cmd_block_list *list = &bin->commands;
+
if (list->tail->count == CMD_BLOCK_MAX) {
lp_setup_new_cmd_block( list );
}