diff options
author | Kenneth Graunke <[email protected]> | 2013-04-02 10:29:37 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2013-04-04 15:38:18 -0700 |
commit | 01bd29d681c68c8b5b23dfc8f92a3ff25c51a069 (patch) | |
tree | 0f9e3591b54d4ba4731c2c363047a86c6aa8f727 /src/mesa/drivers/dri/i965/gen7_misc_state.c | |
parent | 1e3235d36e45ee7565d322971dfa179f48d79767 (diff) |
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 <[email protected]>
Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen7_misc_state.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/gen7_misc_state.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/gen7_misc_state.c b/src/mesa/drivers/dri/i965/gen7_misc_state.c index 2009070dda9..1d3677d38da 100644 --- a/src/mesa/drivers/dri/i965/gen7_misc_state.c +++ b/src/mesa/drivers/dri/i965/gen7_misc_state.c @@ -50,7 +50,7 @@ gen7_emit_depth_stencil_hiz(struct brw_context *brw, OUT_BATCH((depth_mt ? depth_mt->region->pitch - 1 : 0) | (depthbuffer_format << 18) | ((hiz_mt ? 1 : 0) << 22) | - ((stencil_mt != NULL && ctx->Stencil.WriteMask != 0) << 27) | + ((stencil_mt != NULL && ctx->Stencil._WriteEnabled) << 27) | ((ctx->Depth.Mask != 0) << 28) | (depth_surface_type << 29)); |