main: Add extension enable bits for KHR_robust_buffer_access_behavior
[mesa.git] / src / mesa / main / depth.c
index 68ad56184616fc09bf29c7f73951bcc8ffc7faff..c3534407599e8b718363a7e1b70d50dcfa4315da 100644 (file)
@@ -1,6 +1,5 @@
 /*
  * Mesa 3-D graphics library
- * Version:  7.1
  *
  * Copyright (C) 1999-2007  Brian Paul   All Rights Reserved.
  *
@@ -64,7 +63,10 @@ _mesa_DepthFunc( GLenum func )
    GET_CURRENT_CONTEXT(ctx);
 
    if (MESA_VERBOSE & VERBOSE_API)
-      _mesa_debug(ctx, "glDepthFunc %s\n", _mesa_lookup_enum_by_nr(func));
+      _mesa_debug(ctx, "glDepthFunc %s\n", _mesa_enum_to_string(func));
+
+   if (ctx->Depth.Func == func)
+      return;
 
    switch (func) {
    case GL_LESS:    /* (default) pass if incoming z < stored z */
@@ -81,9 +83,6 @@ _mesa_DepthFunc( GLenum func )
       return;
    }
 
-   if (ctx->Depth.Func == func)
-      return;
-
    FLUSH_VERTICES(ctx, _NEW_DEPTH);
    ctx->Depth.Func = func;