i965: Use SATURATE
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 19 May 2020 15:11:41 +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/mesa/drivers/dri/i965/brw_meta_util.c

index 6a6d68425fad878d55f99068dfdd64c971b190aa..268b3192de0df1ef10293eadbb93350d5446d6ac 100644 (file)
@@ -365,7 +365,7 @@ brw_meta_convert_fast_clear_color(const struct brw_context *brw,
    switch (_mesa_get_format_datatype(mt->format)) {
    case GL_UNSIGNED_NORMALIZED:
       for (int i = 0; i < 4; i++)
-         override_color.f32[i] = CLAMP(override_color.f32[i], 0.0f, 1.0f);
+         override_color.f32[i] = SATURATE(override_color.f32[i]);
       break;
 
    case GL_SIGNED_NORMALIZED: