summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/draw/draw_vbuf.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-01-25 15:59:27 -0700
committerBrian <brian.paul@tungstengraphics.com>2008-01-25 17:22:56 -0700
commit0bfd085e2866fbbd40209dcee23f0e6240583fe8 (patch)
tree5cefec02084d42517848529161b734d73557059a /src/mesa/pipe/draw/draw_vbuf.c
parentbd8bf60b6f2402895e7159a4df644f8a4a307cf5 (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_vbuf.c')
-rw-r--r--src/mesa/pipe/draw/draw_vbuf.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mesa/pipe/draw/draw_vbuf.c b/src/mesa/pipe/draw/draw_vbuf.c
index 82051d2e65..d827f51d56 100644
--- a/src/mesa/pipe/draw/draw_vbuf.c
+++ b/src/mesa/pipe/draw/draw_vbuf.c
@@ -395,7 +395,7 @@ vbuf_begin( struct draw_stage *stage )
static void
-vbuf_end( struct draw_stage *stage )
+vbuf_flush( struct draw_stage *stage, unsigned flags )
{
// vbuf_flush_indices( stage );
/* XXX: Overkill */
@@ -432,11 +432,10 @@ struct draw_stage *draw_vbuf_stage( struct draw_context *draw,
struct vbuf_stage *vbuf = CALLOC_STRUCT(vbuf_stage);
vbuf->stage.draw = draw;
- vbuf->stage.begin = vbuf_begin;
vbuf->stage.point = vbuf_first_point;
vbuf->stage.line = vbuf_first_line;
vbuf->stage.tri = vbuf_first_tri;
- vbuf->stage.end = vbuf_end;
+ vbuf->stage.flush = vbuf_flush;
vbuf->stage.reset_stipple_counter = vbuf_reset_stipple_counter;
vbuf->stage.destroy = vbuf_destroy;