mesa: don't flush and don't flag _NEW_STENCIL in ClearStencil, ActiveStencilFace
authorMarek Olšák <maraeo@gmail.com>
Mon, 15 Apr 2013 00:54:58 +0000 (02:54 +0200)
committerMarek Olšák <maraeo@gmail.com>
Wed, 24 Apr 2013 01:23:23 +0000 (03:23 +0200)
The functions don't affect driver state. There is no code that would rely
on vertices being flushed prior to changing the states, and no code that
would check for _NEW_STENCIL before using the states.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/main/stencil.c

index 330841731384be23d8d149b79017c0630b8874e7..d76842fb27880b32fead0685081ddd0bdb9a5c0d 100644 (file)
@@ -109,10 +109,6 @@ _mesa_ClearStencil( GLint s )
 {
    GET_CURRENT_CONTEXT(ctx);
 
-   if (ctx->Stencil.Clear == (GLuint) s)
-      return;
-
-   FLUSH_VERTICES(ctx, _NEW_STENCIL);
    ctx->Stencil.Clear = (GLuint) s;
 }
 
@@ -390,7 +386,6 @@ _mesa_ActiveStencilFaceEXT(GLenum face)
    }
 
    if (face == GL_FRONT || face == GL_BACK) {
-      FLUSH_VERTICES(ctx, _NEW_STENCIL);
       ctx->Stencil.ActiveFace = (face == GL_FRONT) ? 0 : 2;
    }
    else {