summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/gen6_cc.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2014-04-21 19:30:51 -0700
committerKenneth Graunke <[email protected]>2014-11-03 15:32:45 -0800
commiteaf12022d2cdf9f185cc57ad67cde352d7b0a446 (patch)
tree55dd116fb822322f10ef9cfa363fba7da511ed52 /src/mesa/drivers/dri/i965/gen6_cc.c
parent822e791321c387cadcec562820a0521aae90cc77 (diff)
i965/skl: Update stencil reference handling for Skylake.
Skylake uploads the stencil reference values in DW3 of the 3DSTATE_WM_DEPTH_STENCIL packet, rather than in COLOR_CALC_STATE. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen6_cc.c')
-rw-r--r--src/mesa/drivers/dri/i965/gen6_cc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_cc.c b/src/mesa/drivers/dri/i965/gen6_cc.c
index 45c926cca83..4770063fe7e 100644
--- a/src/mesa/drivers/dri/i965/gen6_cc.c
+++ b/src/mesa/drivers/dri/i965/gen6_cc.c
@@ -264,9 +264,12 @@ gen6_upload_color_calc_state(struct brw_context *brw)
cc->cc0.alpha_test_format = BRW_ALPHATEST_FORMAT_UNORM8;
UNCLAMPED_FLOAT_TO_UBYTE(cc->cc1.alpha_ref_fi.ui, ctx->Color.AlphaRef);
- /* _NEW_STENCIL */
- cc->cc0.stencil_ref = _mesa_get_stencil_ref(ctx, 0);
- cc->cc0.bf_stencil_ref = _mesa_get_stencil_ref(ctx, ctx->Stencil._BackFace);
+ if (brw->gen < 9) {
+ /* _NEW_STENCIL */
+ cc->cc0.stencil_ref = _mesa_get_stencil_ref(ctx, 0);
+ cc->cc0.bf_stencil_ref =
+ _mesa_get_stencil_ref(ctx, ctx->Stencil._BackFace);
+ }
/* _NEW_COLOR */
cc->constant_r = ctx->Color.BlendColorUnclamped[0];