From 86b81ef5aa14a2fa7be6e5c319c00324028a1761 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michel=20D=C3=A4nzer?= Date: Wed, 17 Oct 2007 18:28:03 +0200 Subject: [PATCH] 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(-) 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) { -- 2.30.2