diff options
author | Keith Whitwell <[email protected]> | 2008-04-19 16:43:15 +0100 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2008-04-19 16:43:15 +0100 |
commit | e7bac4276634ea1ee81ac71f6f6869f87e689872 (patch) | |
tree | 6a8d64272b6edd58a5fdc258dac3bd163f376adf | |
parent | bee1d31641674c67676de86fbb4b35ca5bf7f33f (diff) |
draw: put pipeline flushing behind a new interface
-rw-r--r-- | src/gallium/auxiliary/draw/draw_context.c | 8 | ||||
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pipe.c | 8 | ||||
-rw-r--r-- | src/gallium/auxiliary/draw/draw_private.h | 5 |
3 files changed, 15 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c index fa6791fa0b2..3e69867d113 100644 --- a/src/gallium/auxiliary/draw/draw_context.c +++ b/src/gallium/auxiliary/draw/draw_context.c @@ -379,11 +379,9 @@ void draw_do_flush( struct draw_context *draw, unsigned flags ) { draw->flushing = TRUE; - if (flags >= DRAW_FLUSH_STATE_CHANGE) { - draw->pipeline.first->flush( draw->pipeline.first, flags ); - draw->pipeline.first = draw->pipeline.validate; - draw->reduced_prim = ~0; /* is reduced_prim needed any more? */ - } + draw_pipeline_flush( draw, flags ); + + draw->reduced_prim = ~0; /* is reduced_prim needed any more? */ draw->flushing = FALSE; } diff --git a/src/gallium/auxiliary/draw/draw_pipe.c b/src/gallium/auxiliary/draw/draw_pipe.c index b18b747d9ce..3fae9085146 100644 --- a/src/gallium/auxiliary/draw/draw_pipe.c +++ b/src/gallium/auxiliary/draw/draw_pipe.c @@ -274,3 +274,11 @@ void draw_pipeline_run( struct draw_context *draw, draw->pipeline.vertex_count = 0; } + + +void draw_pipeline_flush( struct draw_context *draw, + unsigned flags ) +{ + draw->pipeline.first->flush( draw->pipeline.first, flags ); + draw->pipeline.first = draw->pipeline.validate; +} diff --git a/src/gallium/auxiliary/draw/draw_private.h b/src/gallium/auxiliary/draw/draw_private.h index 4d123cf8d9c..59635d643ba 100644 --- a/src/gallium/auxiliary/draw/draw_private.h +++ b/src/gallium/auxiliary/draw/draw_private.h @@ -227,7 +227,7 @@ void draw_pt_reset_vertex_ids( struct draw_context *draw ); /******************************************************************************* - * Primitive processing (pipelnie) code: + * Primitive processing (pipeline) code: */ boolean draw_pipeline_init( struct draw_context *draw ); @@ -241,6 +241,9 @@ void draw_pipeline_run( struct draw_context *draw, const ushort *elts, unsigned count ); +void draw_pipeline_flush( struct draw_context *draw, + unsigned flags ); + boolean draw_need_pipeline(const struct draw_context *draw, unsigned prim ); |