summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast.c24
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast.h6
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast_priv.h2
3 files changed, 22 insertions, 10 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c
index 6ac44feb4c..9825099c94 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 )
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.h b/src/gallium/drivers/llvmpipe/lp_rast.h
index 26d057beb2..aa50fba5a6 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast.h
+++ b/src/gallium/drivers/llvmpipe/lp_rast.h
@@ -163,12 +163,6 @@ void lp_rast_shade_tile( struct lp_rasterizer *,
const union lp_rast_cmd_arg *,
const struct lp_rast_shader_inputs *);
-void lp_rast_store_color( struct lp_rasterizer *,
- const union lp_rast_cmd_arg *);
-
-void lp_rast_store_zstencil( struct lp_rasterizer *,
- const union lp_rast_cmd_arg *);
-
/* End of tile:
*/
diff --git a/src/gallium/drivers/llvmpipe/lp_rast_priv.h b/src/gallium/drivers/llvmpipe/lp_rast_priv.h
index d7a8b9c257..f5a6699ed4 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast_priv.h
+++ b/src/gallium/drivers/llvmpipe/lp_rast_priv.h
@@ -61,6 +61,8 @@ struct lp_rasterizer {
struct {
struct pipe_surface *cbuf;
struct pipe_surface *zsbuf;
+ boolean write_color;
+ boolean write_zstencil;
unsigned clear_color;
unsigned clear_depth;
char clear_stencil;