From 66c0abba6ba89d326555389d9539894402303286 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 3 Mar 2010 17:17:56 -0800 Subject: [PATCH] swrast: Remove redundant test of the visual's accumulation buffer size 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 --- src/mesa/swrast/s_accum.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/mesa/swrast/s_accum.c b/src/mesa/swrast/s_accum.c index 2dd9ca6348b..854e106b7f0 100644 --- a/src/mesa/swrast/s_accum.c +++ b/src/mesa/swrast/s_accum.c @@ -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; -- 2.30.2