From 86b81ef5aa14a2fa7be6e5c319c00324028a1761 Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Wed, 17 Oct 2007 18:28:03 +0200 Subject: Don't call the driver clear hook when the effective scissor rectangle is empty. --- src/mesa/main/buffers.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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) { -- cgit v1.2.3