From 3ec4d1f809bdecd6469dd55ab05a029ccc511a39 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Tue, 6 Dec 2016 17:07:16 -0500 Subject: [PATCH] freedreno/a5xx: fix alpha test GRAS_SU_DEPTH_PLANE_CNTL doesn't in fact seem to be anything to do with alpha test. This fixes xonotic and (other than some iommu faults) gets gnome-shell working. Signed-off-by: Rob Clark --- src/gallium/drivers/freedreno/a5xx/fd5_emit.c | 3 +-- src/gallium/drivers/freedreno/a5xx/fd5_zsa.c | 2 -- src/gallium/drivers/freedreno/a5xx/fd5_zsa.h | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_emit.c b/src/gallium/drivers/freedreno/a5xx/fd5_emit.c index 04d8808..ce8c89c 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_emit.c +++ b/src/gallium/drivers/freedreno/a5xx/fd5_emit.c @@ -298,8 +298,7 @@ fd5_emit_state(struct fd_context *ctx, struct fd_ringbuffer *ring, 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)); + OUT_RING(ring, COND(fragz, A5XX_GRAS_SU_DEPTH_PLANE_CNTL_ALPHA_TEST_ENABLE)); } if (dirty & FD_DIRTY_RASTERIZER) { diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_zsa.c b/src/gallium/drivers/freedreno/a5xx/fd5_zsa.c index f113a92..7b2be93 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_zsa.c +++ b/src/gallium/drivers/freedreno/a5xx/fd5_zsa.c @@ -87,8 +87,6 @@ fd5_zsa_state_create(struct pipe_context *pctx, if (cso->alpha.enabled) { uint32_t ref = cso->alpha.ref_value * 255.0; - so->gras_su_depth_plane_cntl = - A5XX_GRAS_SU_DEPTH_PLANE_CNTL_ALPHA_TEST_ENABLE; so->rb_alpha_control = A5XX_RB_ALPHA_CONTROL_ALPHA_TEST | A5XX_RB_ALPHA_CONTROL_ALPHA_REF(ref) | diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_zsa.h b/src/gallium/drivers/freedreno/a5xx/fd5_zsa.h index 02c116a..86bdd5f 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_zsa.h +++ b/src/gallium/drivers/freedreno/a5xx/fd5_zsa.h @@ -36,7 +36,6 @@ struct fd5_zsa_stateobj { struct pipe_depth_stencil_alpha_state base; - uint32_t gras_su_depth_plane_cntl; uint32_t rb_alpha_control; uint32_t rb_depth_cntl; uint32_t rb_stencil_control; -- 2.7.4