diff options
author | Brian <[email protected]> | 2008-01-25 15:59:27 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2008-01-25 17:22:56 -0700 |
commit | 0bfd085e2866fbbd40209dcee23f0e6240583fe8 (patch) | |
tree | 5cefec02084d42517848529161b734d73557059a /src/mesa/pipe/draw/draw_clip.c | |
parent | bd8bf60b6f2402895e7159a4df644f8a4a307cf5 (diff) |
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.
Diffstat (limited to 'src/mesa/pipe/draw/draw_clip.c')
-rw-r--r-- | src/mesa/pipe/draw/draw_clip.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/mesa/pipe/draw/draw_clip.c b/src/mesa/pipe/draw/draw_clip.c index e0eb656364d..2d410e32447 100644 --- a/src/mesa/pipe/draw/draw_clip.c +++ b/src/mesa/pipe/draw/draw_clip.c @@ -346,15 +346,6 @@ do_clip_line( struct draw_stage *stage, } -static void clip_begin( struct draw_stage *stage ) -{ - /* should always have position, at least */ - assert(stage->draw->num_vs_outputs > 0); - - stage->next->begin( stage->next ); -} - - static void clip_point( struct draw_stage *stage, struct prim_header *header ) @@ -402,10 +393,9 @@ clip_tri( struct draw_stage *stage, } } - -static void clip_end( struct draw_stage *stage ) +static void clip_flush( struct draw_stage *stage, unsigned flags ) { - stage->next->end( stage->next ); + stage->next->flush( stage->next, flags ); } @@ -433,11 +423,10 @@ struct draw_stage *draw_clip_stage( struct draw_context *draw ) draw_alloc_tmps( &clipper->stage, MAX_CLIPPED_VERTICES ); clipper->stage.draw = draw; - clipper->stage.begin = clip_begin; clipper->stage.point = clip_point; clipper->stage.line = clip_line; clipper->stage.tri = clip_tri; - clipper->stage.end = clip_end; + clipper->stage.flush = clip_flush; clipper->stage.reset_stipple_counter = clip_reset_stipple_counter; clipper->stage.destroy = clip_destroy; |