fix silly mistakes
authorZack Rusin <zack@tungstengraphics.com>
Wed, 7 May 2008 23:34:12 +0000 (19:34 -0400)
committerZack Rusin <zack@tungstengraphics.com>
Thu, 8 May 2008 19:26:30 +0000 (15:26 -0400)
src/gallium/auxiliary/draw/draw_pt_varray_tmp.h
src/gallium/auxiliary/draw/draw_pt_varray_tmp_linear.h

index 335c4c8..fb49452 100644 (file)
@@ -28,7 +28,7 @@ static void FUNC(struct draw_pt_front_end *frontend,
       for (j = 0; j + first <= count; j += i) {
          unsigned end = MIN2(FETCH_MAX, count - j);
          end -= (end % incr);
-         for (i = 0; i < count; i++) {
+         for (i = 0; i < end; i++) {
             POINT(varray, i + 0);
          }
          i = end;
index dfa4338..ab28859 100644 (file)
@@ -85,7 +85,7 @@ static void FUNC(struct draw_pt_front_end *frontend,
       else {
          for (j = 0; j + first <= count;) {
             unsigned end = MIN2(FETCH_MAX, count - j);
-            //end -= (end % incr);
+            end -= (end % incr);
             for (i = 0; i+2 < end; i++) {
                TRIANGLE(varray, DRAW_PIPE_RESET_STIPPLE | DRAW_PIPE_EDGE_FLAG_ALL,
                         i + 0 + (i&1), i + 1 - (i&1), i + 2);
@@ -93,8 +93,6 @@ static void FUNC(struct draw_pt_front_end *frontend,
             fetch_init(varray, end);
             varray_flush(varray);
             j += end;
-            if (j <= count)
-               j -= incr;
          }
       }
       break;