OSDN Git Service

mesa: don't flush vertices and don't flag _NEW_DEPTH in ClearDepth
authorMarek Olšák <maraeo@gmail.com>
Mon, 15 Apr 2013 01:40:06 +0000 (03:40 +0200)
committerMarek Olšák <maraeo@gmail.com>
Wed, 24 Apr 2013 01:23:23 +0000 (03:23 +0200)
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/main/depth.c

index 8aec94a..ad19834 100644 (file)
@@ -46,13 +46,7 @@ _mesa_ClearDepth( GLclampd depth )
    if (MESA_VERBOSE & VERBOSE_API)
       _mesa_debug(ctx, "glClearDepth(%f)\n", depth);
 
-   depth = CLAMP( depth, 0.0, 1.0 );
-
-   if (ctx->Depth.Clear == depth)
-      return;
-
-   FLUSH_VERTICES(ctx, _NEW_DEPTH);
-   ctx->Depth.Clear = depth;
+   ctx->Depth.Clear = CLAMP( depth, 0.0, 1.0 );
 }