From 0bfd085e2866fbbd40209dcee23f0e6240583fe8 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 25 Jan 2008 15:59:27 -0700 Subject: 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. --- src/mesa/state_tracker/st_cb_rasterpos.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/mesa/state_tracker/st_cb_rasterpos.c') diff --git a/src/mesa/state_tracker/st_cb_rasterpos.c b/src/mesa/state_tracker/st_cb_rasterpos.c index 9e20e94dc7..7e347c4893 100644 --- a/src/mesa/state_tracker/st_cb_rasterpos.c +++ b/src/mesa/state_tracker/st_cb_rasterpos.c @@ -73,13 +73,7 @@ rastpos_stage( struct draw_stage *stage ) } static void -rastpos_begin( struct draw_stage *stage ) -{ - /* no-op */ -} - -static void -rastpos_end( struct draw_stage *stage ) +rastpos_flush( struct draw_stage *stage, unsigned flags ) { /* no-op */ } @@ -183,11 +177,10 @@ new_draw_rastpos_stage(GLcontext *ctx, struct draw_context *draw) rs->stage.draw = draw; rs->stage.next = NULL; - rs->stage.begin = rastpos_begin; rs->stage.point = rastpos_point; rs->stage.line = rastpos_line; rs->stage.tri = rastpos_tri; - rs->stage.end = rastpos_end; + rs->stage.flush = rastpos_flush; rs->stage.destroy = rastpos_destroy; rs->stage.reset_stipple_counter = rastpos_reset_stipple_counter; rs->stage.destroy = rastpos_destroy; -- cgit v1.2.3