no-op clear if buffer width or height is zero (bug 7205)
authorBrian <brian@yutani.localnet.net>
Thu, 15 Mar 2007 17:16:41 +0000 (11:16 -0600)
committerBrian <brian@yutani.localnet.net>
Thu, 15 Mar 2007 17:16:41 +0000 (11:16 -0600)
src/mesa/main/buffers.c

index 0e3ed15..11bd173 100644 (file)
@@ -140,6 +140,9 @@ _mesa_Clear( GLbitfield mask )
       return;
    }
 
+   if (ctx->DrawBuffer->Width == 0 || ctx->DrawBuffer->Height == 0)
+      return;
+
    if (ctx->RenderMode == GL_RENDER) {
       GLbitfield bufferMask;