diff options
author | Keith Whitwell <[email protected]> | 2002-10-11 08:24:13 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2002-10-11 08:24:13 +0000 |
commit | b110ca34f0d3926bed1bd4afe77baba93eba7f1e (patch) | |
tree | 5a34fbc76bb5bd0ef7b84420541a131e0cb5dc73 /src/mesa | |
parent | d54d4633fdfafef71d61486b5d740a237f380055 (diff) |
lineloop fix
Diffstat (limited to 'src/mesa')
-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 b8cf91daf10..e1779cee38d 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.13 2002/06/15 02:38:18 brianp Exp $ */ +/* $Id: t_dd_dmatmp.h,v 1.14 2002/10/11 08:24:13 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; |