Mesa (master): u_format: Add restrict to fn pointer and manual format pack/unpack/fetch
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Mar 18 15:12:37 UTC 2021
Module: Mesa
Branch: master
Commit: 69c2a472c25c909c58e387af2bace3d847d51003
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=69c2a472c25c909c58e387af2bace3d847d51003
Author: Jesse Natalie <jenatali at microsoft.com>
Date: Wed Mar 17 15:05:35 2021 -0700
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 at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9670>
---
.../auxiliary/translate/translate_generic.c | 4 +-
src/util/format/u_format.h | 54 +++---
src/util/format/u_format_bptc.c | 72 +++----
src/util/format/u_format_bptc.h | 72 +++----
src/util/format/u_format_etc.c | 14 +-
src/util/format/u_format_etc.h | 10 +-
src/util/format/u_format_fxt1.c | 46 ++---
src/util/format/u_format_fxt1.h | 24 +--
src/util/format/u_format_latc.c | 56 +++---
src/util/format/u_format_latc.h | 48 ++---
src/util/format/u_format_other.c | 54 +++---
src/util/format/u_format_other.h | 54 +++---
src/util/format/u_format_rgtc.c | 60 +++---
src/util/format/u_format_rgtc.h | 52 ++---
src/util/format/u_format_s3tc.c | 136 ++++++-------
src/util/format/u_format_s3tc.h | 96 +++++-----
src/util/format/u_format_yuv.c | 72 +++----
src/util/format/u_format_yuv.h | 72 +++----
src/util/format/u_format_zs.c | 210 ++++++++++-----------
src/util/format/u_format_zs.h | 110 +++++------
20 files changed, 658 insertions(+), 658 deletions(-)
Diff: http://cgit.freedesktop.org/mesa/mesa/diff/?id=69c2a472c25c909c58e387af2bace3d847d51003
More information about the mesa-commit
mailing list