summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2014-12-20 12:01:02 -0500
committerRob Clark <[email protected]>2014-12-20 12:08:37 -0500
commit10d81a03b393d524deb7f0f436e609ca5691c9f2 (patch)
treecdd8db46eedfb92e4ddea89b0eafdbd80de02d10 /src
parent097d760aac9f4248298e954378123852c7f13f28 (diff)
freedreno/a4xx: alpha-test
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/freedreno/a4xx/fd4_zsa.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_zsa.c b/src/gallium/drivers/freedreno/a4xx/fd4_zsa.c
index da0c2b748fe..e14b617570d 100644
--- a/src/gallium/drivers/freedreno/a4xx/fd4_zsa.c
+++ b/src/gallium/drivers/freedreno/a4xx/fd4_zsa.c
@@ -92,10 +92,12 @@ fd4_zsa_state_create(struct pipe_context *pctx,
}
if (cso->alpha.enabled) {
+ uint32_t ref = cso->alpha.ref_value * 255.0;
so->gras_alpha_control =
A4XX_GRAS_ALPHA_CONTROL_ALPHA_TEST_ENABLE;
so->rb_alpha_control =
A4XX_RB_ALPHA_CONTROL_ALPHA_TEST |
+ A4XX_RB_ALPHA_CONTROL_ALPHA_REF(ref) |
A4XX_RB_ALPHA_CONTROL_ALPHA_TEST_FUNC(cso->alpha.func);
so->rb_depth_control |=
A4XX_RB_DEPTH_CONTROL_EARLY_Z_DISABLE;