gallium: replace prim pipeline begin/end() functions with flush()
This is basically half of Keith's draw/flush patch.
The stage->point/line/tri() functions are now self-validating, the validator
functions are installed by the flush() function.
There were excessive calls to validate_pipeline(), however. This was caused
by draw_prim_queue_flush() keeping a local 'first' variable that always pointed
to the validate functions. Replaced 'first' with 'draw->pipeline.first'.
Performance in gears is up just slightly with this patch.
diff --git a/src/mesa/pipe/draw/draw_private.h b/src/mesa/pipe/draw/draw_private.h
index 685ec4a..e393fa5 100644
--- a/src/mesa/pipe/draw/draw_private.h
+++ b/src/mesa/pipe/draw/draw_private.h
@@ -101,8 +101,6 @@
struct vertex_header **tmp; /**< temp vert storage, such as for clipping */
unsigned nr_tmps;
- void (*begin)( struct draw_stage * );
-
void (*point)( struct draw_stage *,
struct prim_header * );
@@ -112,7 +110,8 @@
void (*tri)( struct draw_stage *,
struct prim_header * );
- void (*end)( struct draw_stage * );
+ void (*flush)( struct draw_stage *,
+ unsigned flags );
void (*reset_stipple_counter)( struct draw_stage * );