Killed mmath.[ch]. Moved low-level functions/assembly code into imports.[ch]
[mesa.git] / src / mesa / swrast / s_accum.c
index 09c4d8647b0fb27bc4b3cbc035feac1575674007..2af2714bd67e103571f740a8309a9dae96bdd1e3 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: s_accum.c,v 1.17 2002/06/15 02:38:17 brianp Exp $ */
+/* $Id: s_accum.c,v 1.21 2003/03/01 01:50:25 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -28,8 +28,7 @@
 #include "glheader.h"
 #include "context.h"
 #include "macros.h"
-#include "mmath.h"
-#include "mem.h"
+#include "imports.h"
 
 #include "s_accum.h"
 #include "s_alphabuf.h"
@@ -195,7 +194,8 @@ _mesa_clear_accum_buffer( GLcontext *ctx )
             ctx->Accum.ClearColor[2]==0.0 &&
             ctx->Accum.ClearColor[3]==0.0) {
            /* Black */
-           BZERO( ctx->DrawBuffer->Accum, buffersize * 4 * sizeof(GLaccum) );
+           _mesa_bzero( ctx->DrawBuffer->Accum,
+                         buffersize * 4 * sizeof(GLaccum) );
         }
         else {
            /* Not black */
@@ -306,8 +306,7 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value,
          if (value == 0.0F)
             return;
 
-         (*swrast->Driver.SetReadBuffer)( ctx, ctx->ReadBuffer,
-                                         ctx->Pixel.DriverReadBuffer );
+         _swrast_use_read_buffer(ctx);
 
          /* May have to leave optimized accum buffer mode */
          if (swrast->_IntegerAccumScaler == 0.0 && value > 0.0 && value <= 1.0)
@@ -359,14 +358,13 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value,
             }
          }
          /* restore read buffer = draw buffer (the default) */
-         (*swrast->Driver.SetReadBuffer)( ctx, ctx->DrawBuffer,
-                                         ctx->Color.DriverDrawBuffer );
+         _swrast_use_draw_buffer(ctx);
+
          RENDER_FINISH(swrast,ctx);
         break;
 
       case GL_LOAD:
-         (*swrast->Driver.SetReadBuffer)( ctx, ctx->ReadBuffer,
-                                         ctx->Pixel.DriverReadBuffer );
+         _swrast_use_read_buffer(ctx);
 
          /* This is a change to go into optimized accum buffer mode */
          if (value > 0.0 && value <= 1.0) {
@@ -433,8 +431,8 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value,
          }
 
          /* restore read buffer = draw buffer (the default) */
-         (*swrast->Driver.SetReadBuffer)( ctx, ctx->DrawBuffer,
-                                       ctx->Color.DriverDrawBuffer );
+         _swrast_use_draw_buffer(ctx);
+
          RENDER_FINISH(swrast,ctx);
         break;