summaryrefslogtreecommitdiff
path: root/src/mesa/main/depth.c
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2003-10-09 11:33:38 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2003-10-09 11:33:38 +0000
commitbcb3957b6c22caf35d9b300440648c3e656e8b4c (patch)
tree5339a20c4bf2bfcb3a9a96ce3c82852c48f32f2f /src/mesa/main/depth.c
parent2cdd699a77f7801b1e37b72108a33fa95354e67a (diff)
Eric's mesa-depth32.diff
Diffstat (limited to 'src/mesa/main/depth.c')
-rw-r--r--src/mesa/main/depth.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/main/depth.c b/src/mesa/main/depth.c
index 1e07607c46..8d61ff4126 100644
--- a/src/mesa/main/depth.c
+++ b/src/mesa/main/depth.c
@@ -43,14 +43,15 @@ void
_mesa_ClearDepth( GLclampd depth )
{
GET_CURRENT_CONTEXT(ctx);
- GLfloat tmp = (GLfloat) CLAMP( depth, 0.0, 1.0 );
ASSERT_OUTSIDE_BEGIN_END(ctx);
- if (ctx->Depth.Clear == tmp)
+ depth = CLAMP( depth, 0.0, 1.0 );
+
+ if (ctx->Depth.Clear == depth)
return;
FLUSH_VERTICES(ctx, _NEW_DEPTH);
- ctx->Depth.Clear = tmp;
+ ctx->Depth.Clear = depth;
if (ctx->Driver.ClearDepth)
(*ctx->Driver.ClearDepth)( ctx, ctx->Depth.Clear );
}