From: Alyssa Rosenzweig Date: Tue, 19 May 2020 15:11:07 +0000 (-0400) Subject: etnaviv: Use SATURATE X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9e535629805deb88ca169f9ce8b82720f2efca02;p=mesa.git etnaviv: Use SATURATE Signed-off-by: Alyssa Rosenzweig Reviewed-by: Eric Engestrom Reviewed-by: Lucas Stach Part-of: --- 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);