u_format: Add restrict to fn pointer and manual format pack/unpack/fetch
authorJesse Natalie <jenatali@microsoft.com>
Wed, 17 Mar 2021 22:05:35 +0000 (15:05 -0700)
committerMarge Bot <eric+marge@anholt.net>
Thu, 18 Mar 2021 14:53:52 +0000 (14:53 +0000)
commit69c2a472c25c909c58e387af2bace3d847d51003
treed83307cdaf9a0369cfb1acfa02e37eb904dca6c4
parent3419b16b6d5e0048290fffa788fe8b66c3c68419
u_format: Add restrict to fn pointer and manual format pack/unpack/fetch

MSVC warns (loudly) about a mismatch between the generated functions in
u_format_table.c and the definition of util_format_[un]pack_description,
specifically having 'restrict' in the function but not in the pointer
type in the struct.

So, add 'restrict' everywhere - to the function types, and to the rest
of the implementations that are assigned to those structs.

v2: util_format_unpack_description is used in gallium/auxiliary/translate

Fixes: 5785fdac ("u_format: Mark the generated pack/unpack src/dst args as restrict.")
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9670>
20 files changed:
src/gallium/auxiliary/translate/translate_generic.c
src/util/format/u_format.h
src/util/format/u_format_bptc.c
src/util/format/u_format_bptc.h
src/util/format/u_format_etc.c
src/util/format/u_format_etc.h
src/util/format/u_format_fxt1.c
src/util/format/u_format_fxt1.h
src/util/format/u_format_latc.c
src/util/format/u_format_latc.h
src/util/format/u_format_other.c
src/util/format/u_format_other.h
src/util/format/u_format_rgtc.c
src/util/format/u_format_rgtc.h
src/util/format/u_format_s3tc.c
src/util/format/u_format_s3tc.h
src/util/format/u_format_yuv.c
src/util/format/u_format_yuv.h
src/util/format/u_format_zs.c
src/util/format/u_format_zs.h