From 41966fdb3b71c0b70aeb095e0eb3c5626c144a3a Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Thu, 13 Jun 2013 17:57:47 -0400 Subject: draw: clear the draw buffers in draw Moves clearing of the draw so target buffers to the draw module. They had to be cleared in the drivers before which was quite messy. Signed-off-by: Zack Rusin Reviewed-by: Jose Fonseca Reviewed-by: Brian Paul --- src/gallium/drivers/softpipe/sp_context.h | 1 + src/gallium/drivers/softpipe/sp_draw_arrays.c | 4 ++-- src/gallium/drivers/softpipe/sp_state_so.c | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/gallium/drivers/softpipe') diff --git a/src/gallium/drivers/softpipe/sp_context.h b/src/gallium/drivers/softpipe/sp_context.h index 431864ae087..ea6c0f929c5 100644 --- a/src/gallium/drivers/softpipe/sp_context.h +++ b/src/gallium/drivers/softpipe/sp_context.h @@ -88,6 +88,7 @@ struct softpipe_context { struct draw_so_target *so_targets[PIPE_MAX_SO_BUFFERS]; unsigned num_so_targets; + unsigned so_append_bitmask; struct pipe_query_data_so_statistics so_stats; unsigned num_primitives_generated; diff --git a/src/gallium/drivers/softpipe/sp_draw_arrays.c b/src/gallium/drivers/softpipe/sp_draw_arrays.c index 45b1390de4d..cde4d51c734 100644 --- a/src/gallium/drivers/softpipe/sp_draw_arrays.c +++ b/src/gallium/drivers/softpipe/sp_draw_arrays.c @@ -112,7 +112,7 @@ softpipe_draw_vbo(struct pipe_context *pipe, } draw_set_mapped_so_targets(draw, sp->num_so_targets, - sp->so_targets); + sp->so_targets, sp->so_append_bitmask); if (sp->gs && !sp->gs->shader.tokens) { /* we have an empty geometry shader with stream output, so @@ -135,7 +135,7 @@ softpipe_draw_vbo(struct pipe_context *pipe, draw_set_indexes(draw, NULL, 0, 0); } - draw_set_mapped_so_targets(draw, 0, NULL); + draw_set_mapped_so_targets(draw, 0, NULL, 0); /* * TODO: Flush only when a user vertex/index buffer is present diff --git a/src/gallium/drivers/softpipe/sp_state_so.c b/src/gallium/drivers/softpipe/sp_state_so.c index 3682c6c6742..96bb6b17ae8 100644 --- a/src/gallium/drivers/softpipe/sp_state_so.c +++ b/src/gallium/drivers/softpipe/sp_state_so.c @@ -77,6 +77,7 @@ softpipe_set_so_targets(struct pipe_context *pipe, } softpipe->num_so_targets = num_targets; + softpipe->so_append_bitmask = append_bitmask; } void -- cgit v1.2.3