swrast: Remove redundant test of the visual's accumulation buffer size
authorIan Romanick <ian.d.romanick@intel.com>
Thu, 4 Mar 2010 01:17:56 +0000 (17:17 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Sat, 6 Mar 2010 00:04:59 +0000 (16:04 -0800)
If the visual doesn't have an accumulation buffer, the renderbuffer
passed into _swrast_clear_accum_buffer will be NULL anyway.  There is
no reason the check the visual.  Moreover, the test erroneously checks
the context's visual instead of the visual of the current DrawBuffer.
With FBOs these may be different.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/swrast/s_accum.c

index 2dd9ca6348b32cdec1d44b34f31bc3d300fc24d0..854e106b7f052bd0668a05e1a8bc11078b9b99f5 100644 (file)
@@ -130,11 +130,7 @@ _swrast_clear_accum_buffer( GLcontext *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;