mesa/src/util/format
Juan A. Suarez Romero 5b42da1be8 util/format: nr_channels is always <= 4
While the nr_channels is defined with 3 bits, which allows up to 7
channels, actually the number of channels is less or equal to 4.

This adds an assertion that helps static analyzers to avoid several
false positives related with this.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32589>
2024-12-11 18:34:47 +00:00
..
format_utils.h
meson.build format: Generate endian-independent format aliases 2024-07-19 13:50:42 +00:00
texcompress_bptc_tmp.h
texcompress_etc_tmp.h util: use unsigned types when performing bitshift 2024-06-21 21:07:05 +00:00
texcompress_s3tc_tmp.h
u_format.c util: Add a helper for querying sparse tile sizes 2024-06-27 09:29:33 +00:00
u_format.h util/format: nr_channels is always <= 4 2024-12-11 18:34:47 +00:00
u_format.yaml format: Add R8_G8B8_422_UNORM format 2024-12-11 15:28:08 +00:00
u_format_bptc.c
u_format_bptc.h
u_format_etc.c
u_format_etc.h
u_format_fxt1.c util/format/fxt1: include "u_format_pack.h" instead of "util/format/u_format_pack.h" 2024-01-15 20:13:07 +00:00
u_format_fxt1.h
u_format_latc.c
u_format_latc.h
u_format_other.c
u_format_other.h
u_format_pack.py util/format_pack: Clamp SNORM values to [-1, 1] when unpacking 2024-06-19 01:56:22 +00:00
u_format_parse.py format: Generate sRGB<->linear conversions from table 2024-07-19 13:50:42 +00:00
u_format_rgtc.c
u_format_rgtc.h
u_format_s3tc.c
u_format_s3tc.h
u_format_table.py format: Add R8_G8B8_422_UNORM format 2024-12-11 15:28:08 +00:00
u_format_tests.c util/format: Add G8B8_G8R8_422_UNORM and B8G8_R8G8_422_UNORM formats 2023-08-14 23:44:19 +00:00
u_format_tests.h
u_format_unpack_neon.c
u_format_yuv.c mesa/main: add PIPE_FORMAT_VYUY and PIPE_FORMAT_B8R8_G8R8 2023-07-10 16:29:13 +00:00
u_format_yuv.h mesa/main: add PIPE_FORMAT_VYUY and PIPE_FORMAT_B8R8_G8R8 2023-07-10 16:29:13 +00:00
u_format_zs.c
u_format_zs.h
u_formats.h egl, mesa: add support for NV15 and NV20 textures 2024-11-25 13:04:19 +00:00