i965: Fix stencil write enable flag in 3DSTATE_DEPTH_BUFFER on Gen7+.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 2 Apr 2013 17:29:37 +0000 (10:29 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 4 Apr 2013 22:38:18 +0000 (15:38 -0700)
commit01bd29d681c68c8b5b23dfc8f92a3ff25c51a069
tree0f9e3591b54d4ba4731c2c363047a86c6aa8f727
parent1e3235d36e45ee7565d322971dfa179f48d79767
i965: Fix stencil write enable flag in 3DSTATE_DEPTH_BUFFER on Gen7+.

ctx->Stencil.WriteMask is a statically sized array of 3 elements.
Checking it against 0 actually is a NULL check, and can never fail,
which meant that we always said stencil writes were enabled.

Use the new core Mesa derived state flag to fix this.

NOTE: This is a candidate for stable branches.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/mesa/drivers/dri/i965/gen7_misc_state.c