X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmesa%2Fmain%2Fdepth.c;h=c3534407599e8b718363a7e1b70d50dcfa4315da;hb=1a092fcf3bd673074d5b0b6794858c3f050aa969;hp=68ad56184616fc09bf29c7f73951bcc8ffc7faff;hpb=3d8d5b298a268b119d840bc9bae0ee9e0c9244a9;p=mesa.git diff --git a/src/mesa/main/depth.c b/src/mesa/main/depth.c index 68ad5618461..c3534407599 100644 --- a/src/mesa/main/depth.c +++ b/src/mesa/main/depth.c @@ -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;