diff options
author | José Fonseca <[email protected]> | 2009-10-09 10:37:24 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2009-10-09 10:37:24 +0100 |
commit | 47510040a68f5f672aee22eac6c01fb4dd60ec67 (patch) | |
tree | 2996e2d6beca668db5a89c17616e59820d80071f /src/gallium/drivers/llvmpipe/lp_rast.c | |
parent | 84ab7dcf48e87350c0622c533e51aa495f7256c2 (diff) |
llvmpipe: Follow write_color/write_zstencil.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_rast.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_rast.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c index 6ac44feb4c7..9825099c945 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast.c +++ b/src/gallium/drivers/llvmpipe/lp_rast.c @@ -64,6 +64,7 @@ void lp_rast_bind_color( struct lp_rasterizer *rast, boolean write_color ) { pipe_surface_reference(&rast->state.cbuf, cbuf); + rast->state.write_color = write_color; } void lp_rast_bind_zstencil( struct lp_rasterizer *rast, @@ -71,6 +72,7 @@ void lp_rast_bind_zstencil( struct lp_rasterizer *rast, boolean write_zstencil ) { pipe_surface_reference(&rast->state.zsbuf, zsbuf); + rast->state.write_zstencil = write_zstencil; } @@ -206,7 +208,7 @@ void lp_rast_shade_quads( struct lp_rasterizer *rast, */ -void lp_rast_end_tile( struct lp_rasterizer *rast ) +static void lp_rast_store_color( struct lp_rasterizer *rast ) { struct pipe_surface *surface; struct pipe_screen *screen; @@ -250,11 +252,25 @@ void lp_rast_end_tile( struct lp_rasterizer *rast ) screen->tex_transfer_destroy(transfer); - if (0) { - /* FIXME: call u_tile func to store depth/stencil to surface */ - } } + +static void lp_rast_store_zstencil( struct lp_rasterizer *rast ) +{ + /* FIXME: call u_tile func to store depth/stencil to surface */ +} + + +void lp_rast_end_tile( struct lp_rasterizer *rast ) +{ + if (rast->state.write_color) + lp_rast_store_color(rast); + + if (rast->state.write_zstencil) + lp_rast_store_zstencil(rast); +} + + /* Shutdown: */ void lp_rast_destroy( struct lp_rasterizer *rast ) |