From: Rob Clark Date: Fri, 14 Sep 2018 20:44:32 +0000 (-0400) Subject: freedreno/a6xx: backface stencil state X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b65b6f7606cc381b7c3874f49eb14b738a60f9b6;p=mesa.git freedreno/a6xx: backface stencil state Signed-off-by: Rob Clark --- diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c index 5528077e1cd..7433e39f168 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c @@ -654,7 +654,8 @@ fd6_emit_state(struct fd_context *ctx, struct fd_ringbuffer *ring, struct pipe_stencil_ref *sr = &ctx->stencil_ref; OUT_PKT4(ring, REG_A6XX_RB_STENCILREF, 3); - OUT_RING(ring, A6XX_RB_STENCILREF_REF(sr->ref_value[0])); // TODO bf? + OUT_RING(ring, A6XX_RB_STENCILREF_REF(sr->ref_value[0]) | + A6XX_RB_STENCILREF_BFREF(sr->ref_value[1])); OUT_RING(ring, zsa->rb_stencilmask); OUT_RING(ring, zsa->rb_stencilwrmask); } diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_zsa.c b/src/gallium/drivers/freedreno/a6xx/fd6_zsa.c index 84a5d21d41c..b7ce799eb40 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_zsa.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_zsa.c @@ -101,7 +101,8 @@ fd6_zsa_state_create(struct pipe_context *pctx, A6XX_RB_STENCIL_CONTROL_ZPASS_BF(fd_stencil_op(bs->zpass_op)) | A6XX_RB_STENCIL_CONTROL_ZFAIL_BF(fd_stencil_op(bs->zfail_op)); - // TODO backface stencil state? + so->rb_stencilmask |= A6XX_RB_STENCILMASK_BFMASK(bs->valuemask); + so->rb_stencilwrmask |= A6XX_RB_STENCILWRMASK_BFWRMASK(bs->writemask); } }