summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_lines.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2001-06-11 19:44:01 +0000
committerBrian Paul <[email protected]>2001-06-11 19:44:01 +0000
commit57b46ee6ea62f233b20d20aabedbacd814a15697 (patch)
tree3b374dcec3257e1a062ca9d4c50dde4cf3fc6e00 /src/mesa/swrast/s_lines.c
parente67d632d999fa962377060faacf25e24b17dc341 (diff)
check for PB overflow in general_flat_rgba_line()
Diffstat (limited to 'src/mesa/swrast/s_lines.c')
-rw-r--r--src/mesa/swrast/s_lines.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/mesa/swrast/s_lines.c b/src/mesa/swrast/s_lines.c
index c5523a432cc..c17d6fbef30 100644
--- a/src/mesa/swrast/s_lines.c
+++ b/src/mesa/swrast/s_lines.c
@@ -1,4 +1,4 @@
-/* $Id: s_lines.c,v 1.18 2001/05/21 18:13:43 brianp Exp $ */
+/* $Id: s_lines.c,v 1.19 2001/06/11 19:44:01 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -548,6 +548,7 @@ static void general_flat_rgba_line( GLcontext *ctx,
{
struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
const GLchan *color = vert1->color;
+ GLuint count;
PB_SET_COLOR( PB, color[0], color[1], color[2], color[3] );
if (ctx->Line.StippleFlag) {
@@ -557,7 +558,10 @@ static void general_flat_rgba_line( GLcontext *ctx,
#define INTERP_FOG 1
#define WIDE 1
#define STIPPLE 1
-#define PLOT(X,Y) PB_WRITE_PIXEL(PB, X, Y, Z, fog0);
+#define PLOT(X,Y) \
+ PB_WRITE_PIXEL(PB, X, Y, Z, fog0); \
+ count = PB->count; \
+ CHECK_FULL(count);
#include "s_linetemp.h"
}
else {
@@ -579,7 +583,10 @@ static void general_flat_rgba_line( GLcontext *ctx,
#define INTERP_Z 1
#define INTERP_FOG 1
#define WIDE 1
-#define PLOT(X,Y) PB_WRITE_PIXEL(PB, X, Y, Z, fog0);
+#define PLOT(X,Y) \
+ PB_WRITE_PIXEL(PB, X, Y, Z, fog0); \
+ count = PB->count; \
+ CHECK_FULL(count);
#include "s_linetemp.h"
}
}