r300/compiler: Fix register allocator's handling of loops
[mesa.git] / src / mesa / swrast / s_accum.c
index 2dd9ca6348b32cdec1d44b34f31bc3d300fc24d0..88d107a17dad3e8bb1ff70a41a9e4b62721b9810 100644 (file)
@@ -78,7 +78,7 @@
  * representing the range[-1, 1].
  */
 static void
-rescale_accum( GLcontext *ctx )
+rescale_accum( struct gl_context *ctx )
 {
    SWcontext *swrast = SWRAST_CONTEXT(ctx);
    struct gl_renderbuffer *rb
@@ -125,16 +125,12 @@ rescale_accum( GLcontext *ctx )
  * Clear the accumulation Buffer.
  */
 void
-_swrast_clear_accum_buffer( GLcontext *ctx, struct gl_renderbuffer *rb )
+_swrast_clear_accum_buffer( struct gl_context *ctx, struct gl_renderbuffer *rb )
 {
    SWcontext *swrast = SWRAST_CONTEXT(ctx);
    GLuint x, y, width, height;
 
-   if (ctx->Visual.accumRedBits == 0) {
-      /* No accumulation buffer! Not an error. */
-      return;
-   }
-
+   /* No accumulation buffer! Not an error. */
    if (!rb || !rb->Data)
       return;
 
@@ -183,7 +179,7 @@ _swrast_clear_accum_buffer( GLcontext *ctx, struct gl_renderbuffer *rb )
 
 
 static void
-accum_add(GLcontext *ctx, GLfloat value,
+accum_add(struct gl_context *ctx, GLfloat value,
           GLint xpos, GLint ypos, GLint width, GLint height )
 {
    SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -226,7 +222,7 @@ accum_add(GLcontext *ctx, GLfloat value,
 
 
 static void
-accum_mult(GLcontext *ctx, GLfloat mult,
+accum_mult(struct gl_context *ctx, GLfloat mult,
            GLint xpos, GLint ypos, GLint width, GLint height )
 {
    SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -269,7 +265,7 @@ accum_mult(GLcontext *ctx, GLfloat mult,
 
 
 static void
-accum_accum(GLcontext *ctx, GLfloat value,
+accum_accum(struct gl_context *ctx, GLfloat value,
             GLint xpos, GLint ypos, GLint width, GLint height )
 {
    SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -345,7 +341,7 @@ accum_accum(GLcontext *ctx, GLfloat value,
 
 
 static void
-accum_load(GLcontext *ctx, GLfloat value,
+accum_load(struct gl_context *ctx, GLfloat value,
            GLint xpos, GLint ypos, GLint width, GLint height )
 {
    SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -427,7 +423,7 @@ accum_load(GLcontext *ctx, GLfloat value,
 
 
 static void
-accum_return(GLcontext *ctx, GLfloat value,
+accum_return(struct gl_context *ctx, GLfloat value,
              GLint xpos, GLint ypos, GLint width, GLint height )
 {
    SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -544,7 +540,7 @@ accum_return(GLcontext *ctx, GLfloat value,
  * Software fallback for glAccum.
  */
 void
-_swrast_Accum(GLcontext *ctx, GLenum op, GLfloat value)
+_swrast_Accum(struct gl_context *ctx, GLenum op, GLfloat value)
 {
    SWcontext *swrast = SWRAST_CONTEXT(ctx);
    GLint xpos, ypos, width, height;