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/pipe/softpipe/sp_prim_vbuf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/mesa/pipe/softpipe/sp_prim_vbuf.c') diff --git a/src/mesa/pipe/softpipe/sp_prim_vbuf.c b/src/mesa/pipe/softpipe/sp_prim_vbuf.c index dfabae8302..c9089e7eb2 100644 --- a/src/mesa/pipe/softpipe/sp_prim_vbuf.c +++ b/src/mesa/pipe/softpipe/sp_prim_vbuf.c @@ -149,8 +149,6 @@ sp_vbuf_draw(struct vbuf_render *vbr, const ushort *indices, uint nr_indices) prim.edgeflags = 0; prim.pad = 0; - setup->begin( setup ); - switch (cvbr->prim) { case PIPE_PRIM_TRIANGLES: for (i = 0; i < nr_indices; i += 3) { @@ -182,7 +180,7 @@ sp_vbuf_draw(struct vbuf_render *vbr, const ushort *indices, uint nr_indices) break; } - setup->end( setup ); + setup->flush( setup, 0 ); } -- cgit v1.2.3