Mesa (master): mesa: move check for no-op glFrontFace call earlier
Brian Paul
brianp at kemper.freedesktop.org
Wed Jul 22 00:46:22 UTC 2015
Module: Mesa
Branch: master
Commit: 61ed88b1ddf8aea6f74518bcae5c13d9bf4ae822
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=61ed88b1ddf8aea6f74518bcae5c13d9bf4ae822
Author: Brian Paul <brianp at vmware.com>
Date: Tue Jul 21 18:44:07 2015 -0600
mesa: move check for no-op glFrontFace call earlier
If the new mode matches the current mode, there can be no error.
Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/mesa/main/polygon.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/mesa/main/polygon.c b/src/mesa/main/polygon.c
index c1c3166..60af88f 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;
More information about the mesa-commit
mailing list