gallium: fix util_clamp_color type confusion

fixes arb_color_buffer_float-clear GL_RGBA8_SNORM.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26613>
This commit is contained in:
Alyssa Rosenzweig 2023-12-06 16:38:48 -04:00
parent d136583c82
commit 15b5437f8f

View file

@ -553,9 +553,9 @@ util_clamp_color(enum pipe_format format,
continue;
if (util_format_is_unorm(format))
clamp_color.ui[i] = _mesa_unorm_to_unorm(clamp_color.ui[i], bits, bits);
clamp_color.f[i] = SATURATE(clamp_color.f[i]);
else if (util_format_is_snorm(format))
clamp_color.i[i] = _mesa_snorm_to_snorm(clamp_color.i[i], bits, bits);
clamp_color.f[i] = CLAMP(clamp_color.f[i], -1.0, 1.0);
else if (util_format_is_pure_uint(format))
clamp_color.ui[i] = _mesa_unsigned_to_unsigned(clamp_color.ui[i], bits);
else if (util_format_is_pure_sint(format))