From 08589f71051e588b0bb7d0c8b529976c85398dd1 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Wed, 26 Sep 2007 11:56:17 +0100 Subject: Make flushing more lazy in the draw module. --- src/mesa/pipe/softpipe/sp_draw_arrays.c | 17 +++++++++++------ src/mesa/pipe/softpipe/sp_prim_setup.c | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) (limited to 'src/mesa/pipe/softpipe') diff --git a/src/mesa/pipe/softpipe/sp_draw_arrays.c b/src/mesa/pipe/softpipe/sp_draw_arrays.c index 7ea29a0a26..21c30b53f3 100644 --- a/src/mesa/pipe/softpipe/sp_draw_arrays.c +++ b/src/mesa/pipe/softpipe/sp_draw_arrays.c @@ -95,14 +95,16 @@ softpipe_draw_elements(struct pipe_context *pipe, { struct softpipe_context *sp = softpipe_context(pipe); struct draw_context *draw = sp->draw; - unsigned length, first, incr, i; + unsigned i; - /* first, check that the primitive is not malformed */ - draw_prim_info( mode, &first, &incr ); - length = draw_trim( count, first, incr ); - if (!length) - return TRUE; + /* first, check that the primitive is not malformed. It is the + * state tracker's responsibility to do send only correctly formed + * primitives down. + */ +// count = draw_trim_prim( mode, count ); + if (!draw_validate_prim( mode, count )) + assert(0); if (sp->dirty) softpipe_update_derived( sp ); @@ -151,6 +153,9 @@ softpipe_draw_elements(struct pipe_context *pipe, /* draw! */ draw_arrays(draw, mode, start, count); + /* always flush for now */ + draw_flush(draw); + /* * unmap vertex/index buffers */ diff --git a/src/mesa/pipe/softpipe/sp_prim_setup.c b/src/mesa/pipe/softpipe/sp_prim_setup.c index 2e27d00acf..621a44512c 100644 --- a/src/mesa/pipe/softpipe/sp_prim_setup.c +++ b/src/mesa/pipe/softpipe/sp_prim_setup.c @@ -41,7 +41,7 @@ #include "pipe/draw/draw_vertex.h" #include "pipe/p_util.h" -#define DEBUG_VERTS 0 +#define DEBUG_VERTS 1 /** * Triangle edge info -- cgit v1.2.3