From c4c639c9a46967678725370cb9824031a068633c Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 7 Sep 2000 15:45:26 +0000 Subject: Removed ctx->Driver.LogicOp(). ctx->Driver.Index/ColorMask() now return void. Removed SWmasking and SWLogicOpEnabled variables. LogicOps and color/index masking are no longer special-case device driver functions. The Xlib driver was the only driver that used them. Things are more uniform now. --- src/mesa/main/accum.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/mesa/main/accum.c') diff --git a/src/mesa/main/accum.c b/src/mesa/main/accum.c index 79733d6aca..7b2f1ca57e 100644 --- a/src/mesa/main/accum.c +++ b/src/mesa/main/accum.c @@ -1,4 +1,4 @@ -/* $Id: accum.c,v 1.23 2000/07/15 03:14:25 brianp Exp $ */ +/* $Id: accum.c,v 1.24 2000/09/07 15:45:26 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -140,6 +140,7 @@ _mesa_Accum( GLenum op, GLfloat value ) GLuint xpos, ypos, width, height, width4; GLfloat acc_scale; GLubyte rgba[MAX_WIDTH][4]; + const GLuint colorMask = *((GLuint *) &ctx->Color.ColorMask); const GLint iChanMax = (1 << (sizeof(GLchan) * 8)) - 1; const GLfloat fChanMax = (1 << (sizeof(GLchan) * 8)) - 1; @@ -350,11 +351,11 @@ _mesa_Accum( GLenum op, GLfloat value ) 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 GLfloat mult = ctx->IntegerAccumScaler; const GLint max = MIN2((GLint) (256 / mult), 32767); + GLuint j; if (mult != prevMult) { for (j = 0; j < max; j++) multTable[j] = (GLint) ((GLfloat) j * mult + 0.5F); @@ -376,7 +377,7 @@ _mesa_Accum( GLenum op, GLfloat value ) rgba[i][BCOMP] = multTable[acc[i4+2]]; rgba[i][ACOMP] = multTable[acc[i4+3]]; } - if (ctx->Color.SWmasking) { + if (colorMask != 0xffffffff) { _mesa_mask_rgba_span( ctx, width, xpos, ypos, rgba ); } (*ctx->Driver.WriteRGBASpan)( ctx, width, xpos, ypos, @@ -403,7 +404,7 @@ _mesa_Accum( GLenum op, GLfloat value ) rgba[i][BCOMP] = CLAMP( b, 0, iChanMax ); rgba[i][ACOMP] = CLAMP( a, 0, iChanMax ); } - if (ctx->Color.SWmasking) { + if (colorMask != 0xffffffff) { _mesa_mask_rgba_span( ctx, width, xpos, ypos, rgba ); } (*ctx->Driver.WriteRGBASpan)( ctx, width, xpos, ypos, -- cgit v1.2.3