*** empty log message ***
authorKarl Schultz <kschultz@freedesktop.org>
Wed, 6 Oct 2004 21:45:48 +0000 (21:45 +0000)
committerKarl Schultz <kschultz@freedesktop.org>
Wed, 6 Oct 2004 21:45:48 +0000 (21:45 +0000)
src/mesa/swrast/s_pointtemp.h

index de940b355c9f6d91429b9cae4d9a35ed56c81b2c..3735e89f10533cb8bcffb2b5ad8a89a6903063c3 100644 (file)
@@ -220,6 +220,21 @@ NAME ( GLcontext *ctx, const SWvertex *vert )
       count = span->end;
       (void) radius;
       for (y = ymin; y <= ymax; y++) {
+         /* check if we need to flush */
+         if (count + (xmax-xmin+1) >= MAX_WIDTH) {
+            span->end = count;
+#if FLAGS & (TEXTURE | SPRITE)
+            if (ctx->Texture._EnabledUnits)
+               _swrast_write_texture_span(ctx, span);
+            else
+               _swrast_write_rgba_span(ctx, span);
+#elif FLAGS & RGBA
+            _swrast_write_rgba_span(ctx, span);
+#else
+            _swrast_write_index_span(ctx, span);
+#endif
+            count = span->end = 0;
+         }
          for (x = xmin; x <= xmax; x++) {
 #if FLAGS & (SPRITE | TEXTURE)
             GLuint u;