From c2408838c83719cb133332c7adac71ef50503259 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Fri, 9 Jun 2017 20:37:34 +0200 Subject: mesa: replace _mesa_update_stencil() with helper functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Brian Paul Reviewed-by: Timothy Arceri --- src/mesa/main/stencil.c | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'src/mesa/main/stencil.c') 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 @@ -606,34 +606,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. * -- cgit v1.2.3