summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gallium/include/pipe/p_state.h2
-rw-r--r--src/mesa/state_tracker/st_atom_depth.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
index 3593446e1c..2dc9a92186 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -181,7 +181,7 @@ struct pipe_depth_stencil_alpha_state
unsigned occlusion_count:1; /**< do occlusion counting? */
} depth;
struct {
- unsigned enabled:1;
+ unsigned enabled:1; /**< stencil[0]: stencil enabled, stencil[1]: two-side enabled */
unsigned func:3; /**< PIPE_FUNC_x */
unsigned fail_op:3; /**< PIPE_STENCIL_OP_x */
unsigned zpass_op:3; /**< PIPE_STENCIL_OP_x */
diff --git a/src/mesa/state_tracker/st_atom_depth.c b/src/mesa/state_tracker/st_atom_depth.c
index 03057e37fa..ef467582c0 100644
--- a/src/mesa/state_tracker/st_atom_depth.c
+++ b/src/mesa/state_tracker/st_atom_depth.c
@@ -115,7 +115,7 @@ update_depth_stencil_alpha(struct st_context *st)
dsa->stencil[0].value_mask = st->ctx->Stencil.ValueMask[0] & 0xff;
dsa->stencil[0].write_mask = st->ctx->Stencil.WriteMask[0] & 0xff;
- if (st->ctx->Stencil.TestTwoSide) {
+ if (st->ctx->Stencil._TestTwoSide) {
dsa->stencil[1].enabled = 1;
dsa->stencil[1].func = st_compare_func_to_pipe(st->ctx->Stencil.Function[1]);
dsa->stencil[1].fail_op = gl_stencil_op_to_pipe(st->ctx->Stencil.FailFunc[1]);
@@ -127,6 +127,7 @@ update_depth_stencil_alpha(struct st_context *st)
}
else {
dsa->stencil[1] = dsa->stencil[0];
+ dsa->stencil[1].enabled = 0;
}
}