draw: put pipeline flushing behind a new interface
authorKeith Whitwell <keith@tungstengraphics.com>
Sat, 19 Apr 2008 15:43:15 +0000 (16:43 +0100)
committerKeith Whitwell <keith@tungstengraphics.com>
Sat, 19 Apr 2008 15:43:15 +0000 (16:43 +0100)
src/gallium/auxiliary/draw/draw_context.c
src/gallium/auxiliary/draw/draw_pipe.c
src/gallium/auxiliary/draw/draw_private.h

index fa6791fa0b215beefc5a6b4f878a222133442827..3e69867d113aad171bb8ba23d325da5f99025132 100644 (file)
@@ -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;
    }
index b18b747d9cea89de3be5fcea2595bd09b31618f8..3fae908514637d662916968d126c4c6de1e2b09f 100644 (file)
@@ -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;
+}
index 4d123cf8d9ca6612c69f23b18b90a3bd37b7708c..59635d643bad564a829bc313c9d5f11f8662c550 100644 (file)
@@ -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 );