diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2002-10-11 08:23:53 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2002-10-11 08:23:53 +0000 |
commit | 50f184e75925b0783c423b06d6edae7e2d177f3e (patch) | |
tree | 0b69d7e1749917d236b64fa6ab99d415766aef6c | |
parent | be94544afb92fe29578e6e11b43afe58cb6e67a9 (diff) |
lineloop fix
-rw-r--r-- | src/mesa/drivers/common/t_dd_dmatmp.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/mesa/drivers/common/t_dd_dmatmp.h b/src/mesa/drivers/common/t_dd_dmatmp.h index f39838ff2e..554413d9d4 100644 --- a/src/mesa/drivers/common/t_dd_dmatmp.h +++ b/src/mesa/drivers/common/t_dd_dmatmp.h @@ -1,4 +1,4 @@ -/* $Id: t_dd_dmatmp.h,v 1.10.2.3 2002/02/12 17:37:27 keithw Exp $ */ +/* $Id: t_dd_dmatmp.h,v 1.10.2.4 2002/10/11 08:23:53 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -240,17 +240,25 @@ static void TAG(render_line_loop_verts)( GLcontext *ctx, currentsz--; dmasz--; - if (currentsz < 8) - currentsz = dmasz; - - for ( ; j + 1 < count; j += nr - 1 ) { - nr = MIN2( currentsz, count - j ); - EMIT_VERTS( ctx, j, nr ); + if (currentsz < 8) { + NEW_BUFFER(); currentsz = dmasz; } - if (start < count - 1 && (flags & PRIM_END)) + if (j + 1 < count) { + for ( ; j + 1 < count; j += nr - 1 ) { + nr = MIN2( currentsz, count - j ); + EMIT_VERTS( ctx, j, nr ); + currentsz = dmasz; + } + + if (start < count - 1 && (flags & PRIM_END)) + EMIT_VERTS( ctx, start, 1 ); + } + else if (start + 1 < count && (flags & PRIM_END)) { + EMIT_VERTS( ctx, start+1, 1 ); EMIT_VERTS( ctx, start, 1 ); + } FINISH; |