summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/light.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/light.c')
-rw-r--r--src/mesa/main/light.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c
index dab21d1a634..89b1c4b142f 100644
--- a/src/mesa/main/light.c
+++ b/src/mesa/main/light.c
@@ -44,14 +44,14 @@ _mesa_ShadeModel( GLenum mode )
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glShadeModel %s\n", _mesa_enum_to_string(mode));
+ if (ctx->Light.ShadeModel == mode)
+ return;
+
if (mode != GL_FLAT && mode != GL_SMOOTH) {
_mesa_error(ctx, GL_INVALID_ENUM, "glShadeModel");
return;
}
- if (ctx->Light.ShadeModel == mode)
- return;
-
FLUSH_VERTICES(ctx, _NEW_LIGHT);
ctx->Light.ShadeModel = mode;