summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2007-10-17 18:28:03 +0200
committerMichel Dänzer <[email protected]>2007-10-17 18:37:19 +0200
commit86b81ef5aa14a2fa7be6e5c319c00324028a1761 (patch)
treed6563f8bf4b8f1c71e525e7b114d4aa53b4b9824 /src/mesa
parentb4531121330fa85a072f129d11e8432b5294c789 (diff)
Don't call the driver clear hook when the effective scissor rectangle is empty.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/buffers.c4
1 files changed, 3 insertions, 1 deletions
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) {