Commit Graph

3 Commits

Author SHA1 Message Date
Erik Faye-Lund 9ec514ded7 util: add missing c99_compat.h includes
These headers use the "restrict" keyword, so they need to include
c99_compat.h in case they get included from C++.

Right now, we include c99_compat.h in many needless places, which saves
us. But we're about to stop doing that.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16812>
2022-06-02 13:09:15 +00:00
Jesse Natalie 69c2a472c2 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>
2021-03-18 14:53:52 +00:00
Eric Anholt a46b73ee25 mesa: Move the FXT1 compressor/decompressor to util/
softpipe failed at handling FXT1, despite exposing it, because we didn't
have a fetch function for it in the util/ format table.

Fixes: #3968
Reviewed-by: Adam jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9194>
2021-02-23 20:38:50 +00:00