mesa: return early if mask is cleared to zero in BlitFramebuffer
authorMarek Olšák <maraeo@gmail.com>
Sun, 10 Jul 2011 18:01:33 +0000 (20:01 +0200)
committerMarek Olšák <maraeo@gmail.com>
Sun, 10 Jul 2011 19:47:20 +0000 (21:47 +0200)
From ARB_framebuffer_object:
    If a buffer is specified in <mask> and does not exist in both the
    read and draw framebuffers, the corresponding bit is silently
    ignored.

src/mesa/main/fbobject.c

index d094dd35a69a41f2d28b5d7656456c449a85f488..84969360d92caa061e23b72ec4fee76ad1c5231b 100644 (file)
@@ -2603,6 +2603,10 @@ _mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
       }
    }
 
+   if (!mask) {
+      return;
+   }
+
    ASSERT(ctx->Driver.BlitFramebuffer);
    ctx->Driver.BlitFramebuffer(ctx,
                                srcX0, srcY0, srcX1, srcY1,