From 36ff43b596f3bc122f2379b2c161ff9d4e05eeec Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Wed, 4 Feb 2004 16:59:30 +0000 Subject: Fix off-by-one in calculations for wrapped trifan, polygon primitives --- src/mesa/tnl_dd/t_dd_dmatmp.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mesa/tnl_dd') diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h index a9bee5017b..e8681dcd03 100644 --- a/src/mesa/tnl_dd/t_dd_dmatmp.h +++ b/src/mesa/tnl_dd/t_dd_dmatmp.h @@ -353,7 +353,7 @@ static void TAG(render_tri_fan_verts)( GLcontext *ctx, currentsz = dmasz; } - for (j = start + 1 ; j + 1 < count; j += nr - 1 ) { + for (j = start + 1 ; j + 1 < count; j += nr - 2 ) { void *tmp; nr = MIN2( currentsz, count - j + 1 ); tmp = ALLOC_VERTS( nr ); @@ -392,7 +392,7 @@ static void TAG(render_poly_verts)( GLcontext *ctx, currentsz = dmasz; } - for (j = start + 1 ; j + 1 < count ; j += nr - 1 ) { + for (j = start + 1 ; j + 1 < count ; j += nr - 2 ) { void *tmp; nr = MIN2( currentsz, count - j + 1 ); tmp = ALLOC_VERTS( nr ); @@ -919,7 +919,7 @@ static void TAG(render_tri_fan_elts)( GLcontext *ctx, currentsz = dmasz; } - for (j = start + 1 ; j + 1 < count; j += nr - 1 ) { + for (j = start + 1 ; j + 1 < count; j += nr - 2 ) { void *tmp; nr = MIN2( currentsz, count - j + 1 ); tmp = ALLOC_ELTS( nr ); @@ -956,7 +956,7 @@ static void TAG(render_poly_elts)( GLcontext *ctx, currentsz = dmasz; } - for (j = start + 1 ; j + 1 < count; j += nr - 1 ) { + for (j = start + 1 ; j + 1 < count; j += nr - 2 ) { void *tmp; nr = MIN2( currentsz, count - j + 1 ); tmp = ALLOC_ELTS( nr ); -- cgit v1.2.3