diff options
author | Keith Whitwell <[email protected]> | 2010-07-10 16:40:34 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2010-07-13 17:28:54 +0100 |
commit | e21e7ab4da859198dfa9845b4a7207c49db54771 (patch) | |
tree | 8945e35c358bd5d0e5f00328a93fc4168c8c160c /src/gallium/drivers/llvmpipe/lp_rast.c | |
parent | d4b64167b56f780d0dea73193c345622888fbc16 (diff) |
llvmpipe: eliminate the set_state rasterizer command
Just put a pointer to the state in the tri->inputs struct. Remove
some complex logic for eliminating unused statechanges in bins at the
expense of a slightly larger triangle struct.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_rast.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_rast.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c index 0130e39fd8c..a023d2b668e 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast.c +++ b/src/gallium/drivers/llvmpipe/lp_rast.c @@ -383,21 +383,6 @@ lp_rast_store_linear_color( struct lp_rasterizer_task *task, } -/** - * This is a bin command called during bin processing. - */ -void -lp_rast_set_state(struct lp_rasterizer_task *task, - const union lp_rast_cmd_arg arg) -{ - const struct lp_rast_state *state = arg.set_state; - - LP_DBG(DEBUG_RAST, "%s %p\n", __FUNCTION__, (void *) state); - - /* just set the current state pointer for this rasterizer */ - task->current_state = state; -} - /** * Run the shader on all blocks in a tile. This is used when a tile is @@ -409,8 +394,8 @@ lp_rast_shade_tile(struct lp_rasterizer_task *task, const union lp_rast_cmd_arg arg) { struct lp_rasterizer *rast = task->rast; - const struct lp_rast_state *state = task->current_state; const struct lp_rast_shader_inputs *inputs = arg.shade_tile; + const struct lp_rast_state *state = inputs->state; struct lp_fragment_shader_variant *variant = state->variant; const unsigned tile_x = task->x, tile_y = task->y; unsigned x, y; @@ -483,7 +468,7 @@ lp_rast_shade_quads_mask(struct lp_rasterizer_task *task, unsigned x, unsigned y, unsigned mask) { - const struct lp_rast_state *state = task->current_state; + const struct lp_rast_state *state = inputs->state; struct lp_fragment_shader_variant *variant = state->variant; struct lp_rasterizer *rast = task->rast; uint8_t *color[PIPE_MAX_COLOR_BUFS]; @@ -730,7 +715,6 @@ static struct { RAST(triangle_7), RAST(shade_tile), RAST(shade_tile_opaque), - RAST(set_state), RAST(store_linear_color), RAST(fence), RAST(begin_query), @@ -786,8 +770,7 @@ is_empty_bin( const struct cmd_bin *bin ) } for (i = 0; i < head->count; i++) - if (head->cmd[i] != lp_rast_set_state && - head->cmd[i] != lp_rast_store_linear_color) { + if (head->cmd[i] != lp_rast_store_linear_color) { return FALSE; } |