summaryrefslogtreecommitdiff
path: root/src/mesa/main/accum.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-06-19 00:42:24 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-06-19 00:42:24 +0000
commite4b65b6e59d3103c2e63c0b1ae6f04520dc780e5 (patch)
treef284bee45cec187451451543c28c574be2520e16 /src/mesa/main/accum.c
parentb92471b74c3902765225d2d71f4f243f052ab947 (diff)
check for special cases of value = 0 or 1 in glAccum
Diffstat (limited to 'src/mesa/main/accum.c')
-rw-r--r--src/mesa/main/accum.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/main/accum.c b/src/mesa/main/accum.c
index 6654a6314b..37967f2133 100644
--- a/src/mesa/main/accum.c
+++ b/src/mesa/main/accum.c
@@ -1,4 +1,4 @@
-/* $Id: accum.c,v 1.20 2000/04/05 14:40:04 brianp Exp $ */
+/* $Id: accum.c,v 1.21 2000/06/19 00:42:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -188,7 +188,7 @@ _mesa_Accum( GLenum op, GLfloat value )
switch (op) {
case GL_ADD:
- {
+ if (value != 0.0F) {
const GLaccum intVal = (GLaccum) (value * acc_scale);
GLuint j;
/* Leave optimized accum buffer mode */
@@ -206,7 +206,7 @@ _mesa_Accum( GLenum op, GLfloat value )
break;
case GL_MULT:
- {
+ if (value != 1.0F) {
GLuint j;
/* Leave optimized accum buffer mode */
if (ctx->IntegerAccumMode)
@@ -223,6 +223,9 @@ _mesa_Accum( GLenum op, GLfloat value )
break;
case GL_ACCUM:
+ if (value == 0.0F)
+ return;
+
(*ctx->Driver.SetReadBuffer)( ctx, ctx->ReadBuffer,
ctx->Pixel.DriverReadBuffer );