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_priv.h | |
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_priv.h')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_rast_priv.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast_priv.h b/src/gallium/drivers/llvmpipe/lp_rast_priv.h index 024a28be599..8a884177c12 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast_priv.h +++ b/src/gallium/drivers/llvmpipe/lp_rast_priv.h @@ -53,8 +53,6 @@ struct lp_rasterizer_task uint8_t *color_tiles[PIPE_MAX_COLOR_BUFS]; uint8_t *depth_tile; - const struct lp_rast_state *current_state; - /** "back" pointer */ struct lp_rasterizer *rast; @@ -144,10 +142,13 @@ lp_rast_get_depth_block_pointer(struct lp_rasterizer_task *task, assert((x % TILE_VECTOR_WIDTH) == 0); assert((y % TILE_VECTOR_HEIGHT) == 0); - if (!rast->zsbuf.map && (task->current_state->variant->key.depth.enabled || - task->current_state->variant->key.stencil[0].enabled)) { - /* out of memory - use dummy tile memory */ - return lp_get_dummy_tile(); + if (!rast->zsbuf.map) { + /* Either out of memory or no zsbuf. Can't tell without access + * to the state. Just use dummy tile memory, but don't print + * the oom warning as this most likely because there is no + * zsbuf. + */ + return lp_get_dummy_tile_silent(); } depth = (rast->zsbuf.map + @@ -240,7 +241,7 @@ lp_rast_shade_quads_all( struct lp_rasterizer_task *task, unsigned x, unsigned y ) { const struct lp_rasterizer *rast = task->rast; - 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; uint8_t *color[PIPE_MAX_COLOR_BUFS]; void *depth; |