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>
This commit is contained in:
Erik Faye-Lund 2022-06-01 14:04:53 +02:00 committed by Marge Bot
parent 806272ec97
commit 9ec514ded7
12 changed files with 20 additions and 0 deletions

View File

@ -34,6 +34,8 @@
#include "pipe/p_defines.h"
#include "util/u_debug.h"
#include "c99_compat.h"
union pipe_color_union;
struct pipe_screen;

View File

@ -32,6 +32,8 @@
#include "pipe/p_compiler.h"
#include "c99_compat.h"
#ifdef __cplusplus
extern "C" {
#endif

View File

@ -28,6 +28,8 @@
#ifndef U_FORMAT_ETC1_H_
#define U_FORMAT_ETC1_H_
#include "c99_compat.h"
void
util_format_etc1_rgb8_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height);

View File

@ -32,6 +32,8 @@
#include "pipe/p_compiler.h"
#include "c99_compat.h"
#ifdef __cplusplus
extern "C" {
#endif

View File

@ -28,6 +28,8 @@
#ifndef U_FORMAT_LATC_H_
#define U_FORMAT_LATC_H_
#include "c99_compat.h"
void
util_format_latc1_unorm_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j);

View File

@ -32,6 +32,7 @@
#include "pipe/p_compiler.h"
#include "c99_compat.h"
void
util_format_r9g9b9e5_float_unpack_rgba_float(void *restrict dst_row,

View File

@ -28,6 +28,8 @@
#ifndef U_FORMAT_RGTC_H_
#define U_FORMAT_RGTC_H_
#include "c99_compat.h"
void
util_format_rgtc1_unorm_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j);

View File

@ -32,6 +32,8 @@
#include "pipe/p_compiler.h"
#include "c99_compat.h"
#ifdef __cplusplus
extern "C" {
#endif

View File

@ -48,6 +48,7 @@
#include "pipe/p_compiler.h"
#include "util/u_math.h"
#include "c99_compat.h"
/*
* TODO: Ensure we use consistent and right floating formulas, with enough

View File

@ -32,6 +32,8 @@
#include "pipe/p_compiler.h"
#include "c99_compat.h"
#ifdef __cplusplus
extern "C" {
#endif

View File

@ -82,6 +82,7 @@ def prolog():
#include "util/u_debug.h"
#include "util/u_memory.h"
#include "c99_compat.h"
static unsigned out_size_idx( unsigned index_size )
{

View File

@ -39,6 +39,7 @@
#define U_MATH_H
#include "c99_compat.h"
#include "c99_math.h"
#include <assert.h>
#include <float.h>