llvmpipe: Follow write_color/write_zstencil.
This commit is contained in:
@@ -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 )
|
||||
|
||||
@@ -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:
|
||||
*/
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user