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 0e3ed155841ecb68e1091fb7b54e9d5504e51186..11bd173e35c2bb0a954d10b89d4944c3d05a01cb 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;