diff options
author | Eric Anholt <[email protected]> | 2014-10-20 22:53:07 +0100 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2014-10-21 15:16:41 +0100 |
commit | 48f6351940ff62c29fff618cec722e845acc86d5 (patch) | |
tree | 26382580783c863a2cf94155e9a9482c74f37156 | |
parent | 4f17e026bb99c173444ff5ca7d0b782ed89ee604 (diff) |
vc4: Don't look at back stencil state unless two-sided stencil is enabled.
Fixes regressions in the next bugfix, because gallium util stuff leaves
the back stencil state as 0 if !back->enabled.
-rw-r--r-- | src/gallium/drivers/vc4/vc4_state.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/vc4/vc4_state.c b/src/gallium/drivers/vc4/vc4_state.c index 31f24242860..99b5b3c7271 100644 --- a/src/gallium/drivers/vc4/vc4_state.c +++ b/src/gallium/drivers/vc4/vc4_state.c @@ -203,12 +203,16 @@ vc4_create_depth_stencil_alpha_state(struct pipe_context *pctx, uint8_t front_writemask_bits = tlb_stencil_setup_writemask(front->writemask); - uint8_t back_writemask_bits = - tlb_stencil_setup_writemask(back->writemask); + uint8_t back_writemask = front->writemask; + uint8_t back_writemask_bits = front_writemask_bits; so->stencil_uniforms[0] = tlb_stencil_setup_bits(front, front_writemask_bits); if (back->enabled) { + back_writemask = back->writemask; + back_writemask_bits = + tlb_stencil_setup_writemask(back->writemask); + so->stencil_uniforms[0] |= (1 << 30); so->stencil_uniforms[1] = tlb_stencil_setup_bits(back, back_writemask_bits); |