diff options
author | Brian Paul <[email protected]> | 2015-07-21 18:44:07 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2015-07-21 18:44:07 -0600 |
commit | 300926def04afc76d67ce964f10247b2e787c5dc (patch) | |
tree | 4ed9d25c5eede182ec6cc0d80b290a7437e99917 /src/mesa | |
parent | d323f26830c1ce7e157cfeeb4f1e38b1a4d19d31 (diff) |
mesa: move check for no-op glShadeModel call earlier
Reviewed-by: Anuj Phogat <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/light.c | 6 |
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; |