diff options
author | Rob Clark <[email protected]> | 2014-12-20 12:01:02 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2014-12-20 12:08:37 -0500 |
commit | 10d81a03b393d524deb7f0f436e609ca5691c9f2 (patch) | |
tree | cdd8db46eedfb92e4ddea89b0eafdbd80de02d10 /src/gallium/drivers/freedreno/a4xx | |
parent | 097d760aac9f4248298e954378123852c7f13f28 (diff) |
freedreno/a4xx: alpha-test
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a4xx')
-rw-r--r-- | src/gallium/drivers/freedreno/a4xx/fd4_zsa.c | 2 |
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; |