aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/stencil.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/stencil.c')
-rw-r--r--mesalib/src/mesa/main/stencil.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/stencil.c b/mesalib/src/mesa/main/stencil.c
index c161808e5..330841731 100644
--- a/mesalib/src/mesa/main/stencil.c
+++ b/mesalib/src/mesa/main/stencil.c
@@ -551,6 +551,11 @@ _mesa_update_stencil(struct gl_context *ctx)
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));
}