etnaviv: Use SATURATE

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5100>
This commit is contained in:
Alyssa Rosenzweig 2020-05-19 11:11:07 -04:00 committed by Marge Bot
parent bb5e10af24
commit 9e53562980

View file

@ -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);