Don't call the driver clear hook when the effective scissor rectangle is empty.
authorMichel Dänzer <michel@tungstengraphics.com>
Wed, 17 Oct 2007 16:28:03 +0000 (18:28 +0200)
committerMichel Dänzer <michel@tungstengraphics.com>
Wed, 17 Oct 2007 16:37:19 +0000 (18:37 +0200)
src/mesa/main/buffers.c

index cbbe3e8698be7ce7d577f5434551efaf39589d5c..d9c18bfaafc84212911b020e46a605e29d48ec17 100644 (file)
@@ -140,7 +140,9 @@ _mesa_Clear( GLbitfield mask )
       return;
    }
 
-   if (ctx->DrawBuffer->Width == 0 || ctx->DrawBuffer->Height == 0)
+   if (ctx->DrawBuffer->Width == 0 || ctx->DrawBuffer->Height == 0 ||
+       ctx->DrawBuffer->_Xmin >= ctx->DrawBuffer->_Xmax ||
+       ctx->DrawBuffer->_Ymin >= ctx->DrawBuffer->_Ymax)
       return;
 
    if (ctx->RenderMode == GL_RENDER) {