summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-08-11 15:46:46 -0600
committerBrian Paul <brianp@vmware.com>2009-08-13 12:25:53 -0600
commitb9f67df6e72e3a33b91c7d942aaa99622efd688c (patch)
tree49e7773c71cb223be6183aee87160a45996e1604 /src/mesa
parentace98f09e6e77bba33dd1789506676059bba8e9b (diff)
mesa: short-circuit no-change in _mesa_DepthRange()
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/viewport.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/main/viewport.c b/src/mesa/main/viewport.c
index 50e0402d27..309308c983 100644
--- a/src/mesa/main/viewport.c
+++ b/src/mesa/main/viewport.c
@@ -120,6 +120,10 @@ _mesa_DepthRange(GLclampd nearval, GLclampd farval)
if (MESA_VERBOSE&VERBOSE_API)
_mesa_debug(ctx, "glDepthRange %f %f\n", nearval, farval);
+ if (ctx->Viewport.Near == nearval &&
+ ctx->Viewport.Far == farval)
+ return;
+
ctx->Viewport.Near = (GLfloat) CLAMP(nearval, 0.0, 1.0);
ctx->Viewport.Far = (GLfloat) CLAMP(farval, 0.0, 1.0);
ctx->NewState |= _NEW_VIEWPORT;