mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 10:18:05 +02:00
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@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
24799c4223
commit
61ed88b1dd
1 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue