aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/etnaviv
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-05-19 11:11:07 -0400
committerMarge Bot <[email protected]>2020-05-26 22:31:31 +0000
commit9e535629805deb88ca169f9ce8b82720f2efca02 (patch)
tree42cefe3ae38f9e797af19e8a651c190008cf0613 /src/gallium/drivers/etnaviv
parentbb5e10af246b320796f11d6faccbf6dc4c43e4fe (diff)
etnaviv: Use SATURATE
Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Lucas Stach <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5100>
Diffstat (limited to 'src/gallium/drivers/etnaviv')
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_zsa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_zsa.c b/src/gallium/drivers/etnaviv/etnaviv_zsa.c
index 0684ab77a83..afff6b7d9c9 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_zsa.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_zsa.c
@@ -98,7 +98,7 @@ etna_zsa_state_create(struct pipe_context *pctx,
uint32_t extra_reference = 0;
if (VIV_FEATURE(screen, chipMinorFeatures1, HALF_FLOAT))
- extra_reference = util_float_to_half(CLAMP(so->alpha.ref_value, 0.0f, 1.0f));
+ extra_reference = util_float_to_half(SATURATE(so->alpha.ref_value));
cs->PE_STENCIL_CONFIG_EXT =
VIVS_PE_STENCIL_CONFIG_EXT_EXTRA_ALPHA_REF(extra_reference);