mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
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:
parent
d136583c82
commit
15b5437f8f
1 changed files with 2 additions and 2 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue