summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2004-02-04 17:00:28 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2004-02-04 17:00:28 +0000
commitdc02a9658c56e6fa72d5372244921e4c4d6490d2 (patch)
tree9161bc234a57ef1a4a3627a80fe12fcedcab7180
parentb42f4ceea655ac86b90dc0915b1fa3f8b43e0da4 (diff)
Fix off-by-one in calculations for wrapped trifan, polygon primitives
-rw-r--r--src/mesa/tnl_dd/t_dd_dmatmp.h8
1 files changed, 4 insertions, 4 deletions
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 );