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/swrast_setup/ss_triangle.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mesa/swrast_setup') diff --git a/src/mesa/swrast_setup/ss_triangle.c b/src/mesa/swrast_setup/ss_triangle.c index b92c20be2b7..8f034d8aaf0 100644 --- a/src/mesa/swrast_setup/ss_triangle.c +++ b/src/mesa/swrast_setup/ss_triangle.c @@ -29,6 +29,7 @@ #include "main/glheader.h" #include "main/macros.h" #include "main/mtypes.h" +#include "main/stencil.h" #include "tnl/t_context.h" @@ -255,7 +256,7 @@ void _swsetup_choose_trifuncs( struct gl_context *ctx ) */ if (ctx->Polygon.FrontMode != GL_FILL || ctx->Polygon.BackMode != GL_FILL || - (ctx->Stencil.Enabled && ctx->Stencil._TestTwoSide)) + (ctx->Stencil.Enabled && _mesa_stencil_is_two_sided(ctx))) ind |= SS_UNFILLED_BIT; tnl->Driver.Render.Triangle = tri_tab[ind]; -- cgit v1.2.3