diff options
author | Marek Olšák <[email protected]> | 2017-06-09 20:37:34 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-06-22 01:48:30 +0200 |
commit | c2408838c83719cb133332c7adac71ef50503259 (patch) | |
tree | e09e430dd0678f4398b500824966ce16114bde51 /src/mesa/swrast/s_context.c | |
parent | d28cc798bdf10c7e85189dc2dc3461d63e2fbfc7 (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/swrast/s_context.c')
-rw-r--r-- | src/mesa/swrast/s_context.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index 9cb03b38c01..71389c698f2 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -29,6 +29,7 @@ #include "main/bufferobj.h" #include "main/mtypes.h" #include "main/samplerobj.h" +#include "main/stencil.h" #include "main/teximage.h" #include "program/prog_parameter.h" #include "program/prog_statevars.h" @@ -61,7 +62,7 @@ _swrast_update_rasterflags( struct gl_context *ctx ) if (ctx->Depth.Test) rasterMask |= DEPTH_BIT; if (swrast->_FogEnabled) rasterMask |= FOG_BIT; if (ctx->Scissor.EnableFlags) rasterMask |= CLIP_BIT; - if (ctx->Stencil._Enabled) rasterMask |= STENCIL_BIT; + if (_mesa_stencil_is_enabled(ctx)) rasterMask |= STENCIL_BIT; for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) { if (!ctx->Color.ColorMask[i][0] || !ctx->Color.ColorMask[i][1] || |