gallium/util: fix color clamp for alpha-only formats
authorJuan A. Suarez Romero <jasuarez@igalia.com>
Tue, 6 Jun 2023 14:59:59 +0000 (16:59 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 20 Jun 2023 07:45:31 +0000 (07:45 +0000)
commit91c56020264adcd6eff26867ffc5306b4b049b28
treed8ce1b8f2c5b2d0e12d876fce525a2553cdb044b
parente1d7861dd69651eba41aa5875c3781a51527a3bf
gallium/util: fix color clamp for alpha-only formats

Alpha format only contains one channel, but it is placed in the 4th
position, not 1st.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23497>
src/gallium/auxiliary/util/u_helpers.c