summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-07-15 03:14:25 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-07-15 03:14:25 +0000
commitd126c7f8d8ae16748a61ab4d05e3a59ee55c759f (patch)
tree4763bc06b29b6fa186f8704e760ffe0fc3b0a824 /src/mesa
parent6fae9eb4b46ec0569b0ccad7c529fbcfd8b5f1cb (diff)
another tweak to optimized GL_RETURN code
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/accum.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mesa/main/accum.c b/src/mesa/main/accum.c
index cb226022d9..79733d6aca 100644
--- a/src/mesa/main/accum.c
+++ b/src/mesa/main/accum.c
@@ -1,4 +1,4 @@
-/* $Id: accum.c,v 1.22 2000/07/14 04:15:37 brianp Exp $ */
+/* $Id: accum.c,v 1.23 2000/07/15 03:14:25 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -348,16 +348,14 @@ _mesa_Accum( GLenum op, GLfloat value )
if (ctx->IntegerAccumMode && value != 1.0)
rescale_accum(ctx);
- if (ctx->IntegerAccumMode && ctx->IntegerAccumScaler > 0
- && (GLint) (256 / ctx->IntegerAccumScaler) <= 32768) {
+ if (ctx->IntegerAccumMode && ctx->IntegerAccumScaler > 0) {
/* build lookup table to avoid many floating point multiplies */
const GLfloat mult = ctx->IntegerAccumScaler;
static GLchan multTable[32768];
static GLfloat prevMult = 0.0;
GLuint j;
- const GLint max = (GLint) (256 / mult);
+ const GLint max = MIN2((GLint) (256 / mult), 32767);
if (mult != prevMult) {
- assert(max <= 32768);
for (j = 0; j < max; j++)
multTable[j] = (GLint) ((GLfloat) j * mult + 0.5F);
prevMult = mult;