softpipe: Use SATURATE
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 19 May 2020 15:11:25 +0000 (11:11 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 26 May 2020 22:31:31 +0000 (22:31 +0000)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5100>

src/gallium/drivers/softpipe/sp_state_blend.c

index 319bbccea2c39f16c258d74ffb5ba23d1b84d3bd..7351e09a5bbda14e265c0bc0beae50522518551a 100644 (file)
@@ -79,7 +79,7 @@ softpipe_set_blend_color(struct pipe_context *pipe,
    /* save clamped color too */
    for (i = 0; i < 4; i++)
       softpipe->blend_color_clamped.color[i] =
-         CLAMP(blend_color->color[i], 0.0f, 1.0f);
+         SATURATE(blend_color->color[i]);
 
    softpipe->dirty |= SP_NEW_BLEND;
 }