From: Rob Clark Date: Sat, 20 Dec 2014 17:01:02 +0000 (-0500) Subject: freedreno/a4xx: alpha-test X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=10d81a03b393d524deb7f0f436e609ca5691c9f2;p=mesa.git freedreno/a4xx: alpha-test Signed-off-by: Rob Clark --- 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;