summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/polygon.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/main/polygon.c b/src/mesa/main/polygon.c
index c1c31660e12..60af88f9857 100644
--- a/src/mesa/main/polygon.c
+++ b/src/mesa/main/polygon.c
@@ -93,14 +93,14 @@ _mesa_FrontFace( GLenum mode )
if (MESA_VERBOSE&VERBOSE_API)
_mesa_debug(ctx, "glFrontFace %s\n", _mesa_enum_to_string(mode));
+ if (ctx->Polygon.FrontFace == mode)
+ return;
+
if (mode!=GL_CW && mode!=GL_CCW) {
_mesa_error( ctx, GL_INVALID_ENUM, "glFrontFace" );
return;
}
- if (ctx->Polygon.FrontFace == mode)
- return;
-
FLUSH_VERTICES(ctx, _NEW_POLYGON);
ctx->Polygon.FrontFace = mode;