From 8b6f8f2576e3358d3da9c072d134f40e9a3332fc Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Wed, 30 Nov 2016 13:52:11 -0500 Subject: [PATCH] freedreno/a5xx: fix discard Signed-off-by: Rob Clark --- src/gallium/drivers/freedreno/a5xx/fd5_emit.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_emit.c b/src/gallium/drivers/freedreno/a5xx/fd5_emit.c index edb1f4f1e43..04d880816dd 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_emit.c +++ b/src/gallium/drivers/freedreno/a5xx/fd5_emit.c @@ -285,9 +285,6 @@ fd5_emit_state(struct fd_context *ctx, struct fd_ringbuffer *ring, OUT_PKT4(ring, REG_A5XX_RB_STENCILREFMASK, 1); OUT_RING(ring, zsa->rb_stencilrefmask | A5XX_RB_STENCILREFMASK_STENCILREF(sr->ref_value[0])); - - OUT_PKT4(ring, REG_A5XX_GRAS_SU_DEPTH_PLANE_CNTL, 1); - OUT_RING(ring, zsa->gras_su_depth_plane_cntl); } if (dirty & (FD_DIRTY_ZSA | FD_DIRTY_RASTERIZER | FD_DIRTY_PROG)) { @@ -299,6 +296,10 @@ fd5_emit_state(struct fd_context *ctx, struct fd_ringbuffer *ring, OUT_PKT4(ring, REG_A5XX_RB_DEPTH_PLANE_CNTL, 1); OUT_RING(ring, COND(fragz, A5XX_RB_DEPTH_PLANE_CNTL_FRAG_WRITES_Z)); + + OUT_PKT4(ring, REG_A5XX_GRAS_SU_DEPTH_PLANE_CNTL, 1); + OUT_RING(ring, zsa->gras_su_depth_plane_cntl | + COND(fragz, A5XX_GRAS_SU_DEPTH_PLANE_CNTL_ALPHA_TEST_ENABLE)); } if (dirty & FD_DIRTY_RASTERIZER) { -- 2.30.2