From 10d81a03b393d524deb7f0f436e609ca5691c9f2 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Sat, 20 Dec 2014 12:01:02 -0500 Subject: freedreno/a4xx: alpha-test Signed-off-by: Rob Clark --- src/gallium/drivers/freedreno/a4xx/fd4_zsa.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gallium/drivers/freedreno/a4xx') 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; -- cgit v1.2.3