aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/stencil.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-06-09 20:37:34 +0200
committerMarek Olšák <[email protected]>2017-06-22 01:48:30 +0200
commitc2408838c83719cb133332c7adac71ef50503259 (patch)
treee09e430dd0678f4398b500824966ce16114bde51 /src/mesa/main/stencil.c
parentd28cc798bdf10c7e85189dc2dc3461d63e2fbfc7 (diff)
mesa: replace _mesa_update_stencil() with helper functions
The idea is to remove the dependency on _mesa_update_state_locked, so that st/mesa can skip it for stencil state updates, and then stop setting _NEW_STENCIL in mesa/main if the driver is st/mesa. The main motivation is to stop invoking _mesa_update_state_locked for certain state groups. Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/main/stencil.c')
-rw-r--r--src/mesa/main/stencil.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/mesa/main/stencil.c b/src/mesa/main/stencil.c
index 4bd7b8803ef..612ad38dcc1 100644
--- a/src/mesa/main/stencil.c
+++ b/src/mesa/main/stencil.c
@@ -607,34 +607,6 @@ _mesa_StencilMaskSeparate(GLenum face, GLuint mask)
/**
- * Update derived stencil state.
- */
-void
-_mesa_update_stencil(struct gl_context *ctx)
-{
- const GLint face = ctx->Stencil._BackFace;
-
- ctx->Stencil._Enabled = (ctx->Stencil.Enabled &&
- ctx->DrawBuffer->Visual.stencilBits > 0);
-
- ctx->Stencil._TestTwoSide =
- ctx->Stencil._Enabled &&
- (ctx->Stencil.Function[0] != ctx->Stencil.Function[face] ||
- ctx->Stencil.FailFunc[0] != ctx->Stencil.FailFunc[face] ||
- ctx->Stencil.ZPassFunc[0] != ctx->Stencil.ZPassFunc[face] ||
- ctx->Stencil.ZFailFunc[0] != ctx->Stencil.ZFailFunc[face] ||
- ctx->Stencil.Ref[0] != ctx->Stencil.Ref[face] ||
- ctx->Stencil.ValueMask[0] != ctx->Stencil.ValueMask[face] ||
- ctx->Stencil.WriteMask[0] != ctx->Stencil.WriteMask[face]);
-
- ctx->Stencil._WriteEnabled =
- ctx->Stencil._Enabled &&
- (ctx->Stencil.WriteMask[0] != 0 ||
- (ctx->Stencil._TestTwoSide && ctx->Stencil.WriteMask[face] != 0));
-}
-
-
-/**
* Initialize the context stipple state.
*
* \param ctx GL context.