c8a8543af7
Skip padding channels and only consider valid color channels. Add and use a common helper for this. Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Signed-off-by: Valentine Burley <valentine.burley@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30821>