util: Add util_format_get_array.
authorTimur Kristóf <timur.kristof@gmail.com>
Fri, 17 Feb 2023 19:14:00 +0000 (20:14 +0100)
committerMarge Bot <emma+marge@anholt.net>
Fri, 3 Mar 2023 23:08:57 +0000 (23:08 +0000)
commitd89aea73e2ff9c28516ada9a31fed4ba5fb42c05
tree6d8a6b9775e6913460040eb99632e4e568402829
parent26c51bb8d8a33098b1990425a391f56ffba5728c
util: Add util_format_get_array.

This is a poor man's version of MESA_ARRAY_FORMAT.
Implemented based on a gigantic switch-case
with some help from the C preprocessor.
Thank you, preprocessor!

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21692>
src/util/format/u_format.c
src/util/format/u_format.h