summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_span.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/swrast/s_span.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/swrast/s_span.c')
-rw-r--r--src/mesa/swrast/s_span.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
index 49fc580fb1d..81835636a57 100644
--- a/src/mesa/swrast/s_span.c
+++ b/src/mesa/swrast/s_span.c
@@ -39,6 +39,7 @@
#include "main/imports.h"
#include "main/image.h"
#include "main/samplerobj.h"
+#include "main/stencil.h"
#include "main/teximage.h"
#include "s_atifragshader.h"
@@ -1213,14 +1214,14 @@ _swrast_write_rgba_span( struct gl_context *ctx, SWspan *span)
}
/* Stencil and Z testing */
- if (ctx->Stencil._Enabled || ctx->Depth.Test) {
+ if (_mesa_stencil_is_enabled(ctx) || ctx->Depth.Test) {
if (!(span->arrayMask & SPAN_Z))
_swrast_span_interpolate_z(ctx, span);
if (ctx->Transform.DepthClamp)
_swrast_depth_clamp_span(ctx, span);
- if (ctx->Stencil._Enabled) {
+ if (_mesa_stencil_is_enabled(ctx)) {
/* Combined Z/stencil tests */
if (!_swrast_stencil_and_ztest_span(ctx, span)) {
/* all fragments failed test */