From: Michel Dänzer Date: Wed, 17 Oct 2007 16:28:03 +0000 (+0200) Subject: Don't call the driver clear hook when the effective scissor rectangle is empty. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=86b81ef5aa14a2fa7be6e5c319c00324028a1761;p=mesa.git Don't call the driver clear hook when the effective scissor rectangle is empty. --- diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index cbbe3e8698b..d9c18bfaafc 100644 --- a/src/mesa/main/buffers.c +++ b/src/mesa/main/buffers.c @@ -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) {