summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-07-20 19:58:43 -0400
committerIlia Mirkin <[email protected]>2015-07-21 17:52:16 -0400
commita2a1a5805fd617e7f3cc8be44dd79b50da07ebb9 (patch)
tree7e6a9899840ea5e7fef875185f05eafc1b04d293 /src/gallium/auxiliary/util
parent958b5c31116f46a81249d11033164354ec158556 (diff)
gallium: replace INLINE with inline
Generated by running: git grep -l INLINE src/gallium/ | xargs sed -i 's/\bINLINE\b/inline/g' git grep -l INLINE src/mesa/state_tracker/ | xargs sed -i 's/\bINLINE\b/inline/g' git checkout src/gallium/state_trackers/clover/Doxyfile and manual edits to src/gallium/include/pipe/p_compiler.h src/gallium/README.portability to remove mentions of the inline define. Signed-off-by: Ilia Mirkin <[email protected]> Acked-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r--src/gallium/auxiliary/util/u_bitmask.c6
-rw-r--r--src/gallium/auxiliary/util/u_blend.h2
-rw-r--r--src/gallium/auxiliary/util/u_blit.c4
-rw-r--r--src/gallium/auxiliary/util/u_blitter.c6
-rw-r--r--src/gallium/auxiliary/util/u_blitter.h40
-rw-r--r--src/gallium/auxiliary/util/u_box.h22
-rw-r--r--src/gallium/auxiliary/util/u_cache.c2
-rw-r--r--src/gallium/auxiliary/util/u_clear.h2
-rw-r--r--src/gallium/auxiliary/util/u_cpu_detect.c8
-rw-r--r--src/gallium/auxiliary/util/u_debug.h6
-rw-r--r--src/gallium/auxiliary/util/u_debug_memory.c6
-rw-r--r--src/gallium/auxiliary/util/u_debug_refcnt.h4
-rw-r--r--src/gallium/auxiliary/util/u_debug_symbol.c4
-rw-r--r--src/gallium/auxiliary/util/u_dirty_surfaces.h16
-rw-r--r--src/gallium/auxiliary/util/u_draw.h12
-rw-r--r--src/gallium/auxiliary/util/u_dual_blend.h4
-rw-r--r--src/gallium/auxiliary/util/u_dump_state.c2
-rw-r--r--src/gallium/auxiliary/util/u_dynarray.h10
-rw-r--r--src/gallium/auxiliary/util/u_fifo.h8
-rw-r--r--src/gallium/auxiliary/util/u_format.h64
-rw-r--r--src/gallium/auxiliary/util/u_format_pack.py6
-rw-r--r--src/gallium/auxiliary/util/u_format_r11g11b10f.h12
-rw-r--r--src/gallium/auxiliary/util/u_format_rgb9e5.h8
-rw-r--r--src/gallium/auxiliary/util/u_format_s3tc.c8
-rw-r--r--src/gallium/auxiliary/util/u_format_yuv.h8
-rw-r--r--src/gallium/auxiliary/util/u_format_zs.c20
-rw-r--r--src/gallium/auxiliary/util/u_half.h4
-rw-r--r--src/gallium/auxiliary/util/u_handle_table.c4
-rw-r--r--src/gallium/auxiliary/util/u_hash_table.c6
-rw-r--r--src/gallium/auxiliary/util/u_inlines.h66
-rw-r--r--src/gallium/auxiliary/util/u_keymap.c6
-rw-r--r--src/gallium/auxiliary/util/u_linear.h2
-rw-r--r--src/gallium/auxiliary/util/u_math.h90
-rw-r--r--src/gallium/auxiliary/util/u_memory.h2
-rw-r--r--src/gallium/auxiliary/util/u_mm.c2
-rw-r--r--src/gallium/auxiliary/util/u_pack_color.h26
-rw-r--r--src/gallium/auxiliary/util/u_pointer.h16
-rw-r--r--src/gallium/auxiliary/util/u_prim.h20
-rw-r--r--src/gallium/auxiliary/util/u_range.h10
-rw-r--r--src/gallium/auxiliary/util/u_rect.h10
-rw-r--r--src/gallium/auxiliary/util/u_resource.h2
-rw-r--r--src/gallium/auxiliary/util/u_ringbuffer.c4
-rw-r--r--src/gallium/auxiliary/util/u_split_prim.h4
-rw-r--r--src/gallium/auxiliary/util/u_sse.h12
-rw-r--r--src/gallium/auxiliary/util/u_string.h22
-rw-r--r--src/gallium/auxiliary/util/u_surfaces.h6
-rw-r--r--src/gallium/auxiliary/util/u_tile.h2
-rw-r--r--src/gallium/auxiliary/util/u_time.h14
-rw-r--r--src/gallium/auxiliary/util/u_transfer.c2
-rw-r--r--src/gallium/auxiliary/util/u_video.h10
50 files changed, 316 insertions, 316 deletions
diff --git a/src/gallium/auxiliary/util/u_bitmask.c b/src/gallium/auxiliary/util/u_bitmask.c
index 23c93a3ebcb..b19be29a5a4 100644
--- a/src/gallium/auxiliary/util/u_bitmask.c
+++ b/src/gallium/auxiliary/util/u_bitmask.c
@@ -85,7 +85,7 @@ util_bitmask_create(void)
/**
* Resize the bitmask if necessary
*/
-static INLINE boolean
+static inline boolean
util_bitmask_resize(struct util_bitmask *bm,
unsigned minimum_index)
{
@@ -131,7 +131,7 @@ util_bitmask_resize(struct util_bitmask *bm,
/**
* Lazily update the filled.
*/
-static INLINE void
+static inline void
util_bitmask_filled_set(struct util_bitmask *bm,
unsigned index)
{
@@ -144,7 +144,7 @@ util_bitmask_filled_set(struct util_bitmask *bm,
}
}
-static INLINE void
+static inline void
util_bitmask_filled_unset(struct util_bitmask *bm,
unsigned index)
{
diff --git a/src/gallium/auxiliary/util/u_blend.h b/src/gallium/auxiliary/util/u_blend.h
index 2485c34d418..4f969778972 100644
--- a/src/gallium/auxiliary/util/u_blend.h
+++ b/src/gallium/auxiliary/util/u_blend.h
@@ -9,7 +9,7 @@
* garbage that's there. Return a blend factor that will take that into
* account.
*/
-static INLINE int
+static inline int
util_blend_dst_alpha_to_one(int factor)
{
switch (factor) {
diff --git a/src/gallium/auxiliary/util/u_blit.c b/src/gallium/auxiliary/util/u_blit.c
index e3f30557a03..0ba00a3997a 100644
--- a/src/gallium/auxiliary/util/u_blit.c
+++ b/src/gallium/auxiliary/util/u_blit.c
@@ -158,7 +158,7 @@ util_destroy_blit(struct blit_state *ctx)
/**
* Helper function to set the fragment shaders.
*/
-static INLINE void
+static inline void
set_fragment_shader(struct blit_state *ctx, uint writemask,
enum pipe_format format,
enum pipe_texture_target pipe_tex)
@@ -194,7 +194,7 @@ set_fragment_shader(struct blit_state *ctx, uint writemask,
/**
* Helper function to set the vertex shader.
*/
-static INLINE void
+static inline void
set_vertex_shader(struct blit_state *ctx)
{
/* vertex shader - still required to provide the linkage between
diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c
index b5ef9a23966..85206eab1a7 100644
--- a/src/gallium/auxiliary/util/u_blitter.c
+++ b/src/gallium/auxiliary/util/u_blitter.c
@@ -938,7 +938,7 @@ static void *blitter_get_fs_texfetch_col(struct blitter_context_priv *ctx,
}
}
-static INLINE
+static inline
void *blitter_get_fs_texfetch_depth(struct blitter_context_priv *ctx,
enum pipe_texture_target target,
unsigned nr_samples)
@@ -976,7 +976,7 @@ void *blitter_get_fs_texfetch_depth(struct blitter_context_priv *ctx,
}
}
-static INLINE
+static inline
void *blitter_get_fs_texfetch_depthstencil(struct blitter_context_priv *ctx,
enum pipe_texture_target target,
unsigned nr_samples)
@@ -1014,7 +1014,7 @@ void *blitter_get_fs_texfetch_depthstencil(struct blitter_context_priv *ctx,
}
}
-static INLINE
+static inline
void *blitter_get_fs_texfetch_stencil(struct blitter_context_priv *ctx,
enum pipe_texture_target target,
unsigned nr_samples)
diff --git a/src/gallium/auxiliary/util/u_blitter.h b/src/gallium/auxiliary/util/u_blitter.h
index 93b0e513bd0..0cd173d6284 100644
--- a/src/gallium/auxiliary/util/u_blitter.h
+++ b/src/gallium/auxiliary/util/u_blitter.h
@@ -143,7 +143,7 @@ void util_blitter_cache_all_shaders(struct blitter_context *blitter);
/**
* Return the pipe context associated with a blitter context.
*/
-static INLINE
+static inline
struct pipe_context *util_blitter_get_pipe(struct blitter_context *blitter)
{
return blitter->pipe;
@@ -371,77 +371,77 @@ void util_blitter_custom_resolve_color(struct blitter_context *blitter,
*
* States not listed here are not affected by util_blitter. */
-static INLINE
+static inline
void util_blitter_save_blend(struct blitter_context *blitter,
void *state)
{
blitter->saved_blend_state = state;
}
-static INLINE
+static inline
void util_blitter_save_depth_stencil_alpha(struct blitter_context *blitter,
void *state)
{
blitter->saved_dsa_state = state;
}
-static INLINE
+static inline
void util_blitter_save_vertex_elements(struct blitter_context *blitter,
void *state)
{
blitter->saved_velem_state = state;
}
-static INLINE
+static inline
void util_blitter_save_stencil_ref(struct blitter_context *blitter,
const struct pipe_stencil_ref *state)
{
blitter->saved_stencil_ref = *state;
}
-static INLINE
+static inline
void util_blitter_save_rasterizer(struct blitter_context *blitter,
void *state)
{
blitter->saved_rs_state = state;
}
-static INLINE
+static inline
void util_blitter_save_fragment_shader(struct blitter_context *blitter,
void *fs)
{
blitter->saved_fs = fs;
}
-static INLINE
+static inline
void util_blitter_save_vertex_shader(struct blitter_context *blitter,
void *vs)
{
blitter->saved_vs = vs;
}
-static INLINE
+static inline
void util_blitter_save_geometry_shader(struct blitter_context *blitter,
void *gs)
{
blitter->saved_gs = gs;
}
-static INLINE void
+static inline void
util_blitter_save_tessctrl_shader(struct blitter_context *blitter,
void *sh)
{
blitter->saved_tcs = sh;
}
-static INLINE void
+static inline void
util_blitter_save_tesseval_shader(struct blitter_context *blitter,
void *sh)
{
blitter->saved_tes = sh;
}
-static INLINE
+static inline
void util_blitter_save_framebuffer(struct blitter_context *blitter,
const struct pipe_framebuffer_state *state)
{
@@ -449,21 +449,21 @@ void util_blitter_save_framebuffer(struct blitter_context *blitter,
util_copy_framebuffer_state(&blitter->saved_fb_state, state);
}
-static INLINE
+static inline
void util_blitter_save_viewport(struct blitter_context *blitter,
struct pipe_viewport_state *state)
{
blitter->saved_viewport = *state;
}
-static INLINE
+static inline
void util_blitter_save_scissor(struct blitter_context *blitter,
struct pipe_scissor_state *state)
{
blitter->saved_scissor = *state;
}
-static INLINE
+static inline
void util_blitter_save_fragment_sampler_states(
struct blitter_context *blitter,
unsigned num_sampler_states,
@@ -476,7 +476,7 @@ void util_blitter_save_fragment_sampler_states(
num_sampler_states * sizeof(void *));
}
-static INLINE void
+static inline void
util_blitter_save_fragment_sampler_views(struct blitter_context *blitter,
unsigned num_views,
struct pipe_sampler_view **views)
@@ -490,7 +490,7 @@ util_blitter_save_fragment_sampler_views(struct blitter_context *blitter,
views[i]);
}
-static INLINE void
+static inline void
util_blitter_save_vertex_buffer_slot(struct blitter_context *blitter,
struct pipe_vertex_buffer *vertex_buffers)
{
@@ -500,7 +500,7 @@ util_blitter_save_vertex_buffer_slot(struct blitter_context *blitter,
sizeof(struct pipe_vertex_buffer));
}
-static INLINE void
+static inline void
util_blitter_save_so_targets(struct blitter_context *blitter,
unsigned num_targets,
struct pipe_stream_output_target **targets)
@@ -514,7 +514,7 @@ util_blitter_save_so_targets(struct blitter_context *blitter,
targets[i]);
}
-static INLINE void
+static inline void
util_blitter_save_sample_mask(struct blitter_context *blitter,
unsigned sample_mask)
{
@@ -522,7 +522,7 @@ util_blitter_save_sample_mask(struct blitter_context *blitter,
blitter->saved_sample_mask = sample_mask;
}
-static INLINE void
+static inline void
util_blitter_save_render_condition(struct blitter_context *blitter,
struct pipe_query *query,
boolean condition,
diff --git a/src/gallium/auxiliary/util/u_box.h b/src/gallium/auxiliary/util/u_box.h
index 520a3d596cb..66cf989a830 100644
--- a/src/gallium/auxiliary/util/u_box.h
+++ b/src/gallium/auxiliary/util/u_box.h
@@ -4,7 +4,7 @@
#include "pipe/p_state.h"
#include "util/u_math.h"
-static INLINE
+static inline
void u_box_1d( unsigned x,
unsigned w,
struct pipe_box *box )
@@ -17,7 +17,7 @@ void u_box_1d( unsigned x,
box->depth = 1;
}
-static INLINE
+static inline
void u_box_2d( unsigned x,
unsigned y,
unsigned w,
@@ -32,7 +32,7 @@ void u_box_2d( unsigned x,
box->depth = 1;
}
-static INLINE
+static inline
void u_box_origin_2d( unsigned w,
unsigned h,
struct pipe_box *box )
@@ -45,7 +45,7 @@ void u_box_origin_2d( unsigned w,
box->depth = 1;
}
-static INLINE
+static inline
void u_box_2d_zslice( unsigned x,
unsigned y,
unsigned z,
@@ -61,7 +61,7 @@ void u_box_2d_zslice( unsigned x,
box->depth = 1;
}
-static INLINE
+static inline
void u_box_3d( unsigned x,
unsigned y,
unsigned z,
@@ -86,7 +86,7 @@ void u_box_3d( unsigned x,
* 3 if both width and height have been reduced.
* Aliasing permitted.
*/
-static INLINE int
+static inline int
u_box_clip_2d(struct pipe_box *dst,
const struct pipe_box *box, int w, int h)
{
@@ -129,14 +129,14 @@ u_box_clip_2d(struct pipe_box *dst,
return res;
}
-static INLINE int64_t
+static inline int64_t
u_box_volume_3d(const struct pipe_box *box)
{
return (int64_t)box->width * box->height * box->depth;
}
/* Aliasing of @dst permitted. */
-static INLINE void
+static inline void
u_box_union_2d(struct pipe_box *dst,
const struct pipe_box *a, const struct pipe_box *b)
{
@@ -148,7 +148,7 @@ u_box_union_2d(struct pipe_box *dst,
}
/* Aliasing of @dst permitted. */
-static INLINE void
+static inline void
u_box_union_3d(struct pipe_box *dst,
const struct pipe_box *a, const struct pipe_box *b)
{
@@ -161,7 +161,7 @@ u_box_union_3d(struct pipe_box *dst,
dst->depth = MAX2(a->z + a->depth, b->z + b->depth) - dst->z;
}
-static INLINE boolean
+static inline boolean
u_box_test_intersection_2d(const struct pipe_box *a,
const struct pipe_box *b)
{
@@ -185,7 +185,7 @@ u_box_test_intersection_2d(const struct pipe_box *a,
return TRUE;
}
-static INLINE void
+static inline void
u_box_minify_2d(struct pipe_box *dst,
const struct pipe_box *src, unsigned l)
{
diff --git a/src/gallium/auxiliary/util/u_cache.c b/src/gallium/auxiliary/util/u_cache.c
index 9395c66f2f8..da0856981eb 100644
--- a/src/gallium/auxiliary/util/u_cache.c
+++ b/src/gallium/auxiliary/util/u_cache.c
@@ -155,7 +155,7 @@ util_cache_entry_get(struct util_cache *cache,
return NULL;
}
-static INLINE void
+static inline void
util_cache_entry_destroy(struct util_cache *cache,
struct util_cache_entry *entry)
{
diff --git a/src/gallium/auxiliary/util/u_clear.h b/src/gallium/auxiliary/util/u_clear.h
index af557be00bd..864d1302b4f 100644
--- a/src/gallium/auxiliary/util/u_clear.h
+++ b/src/gallium/auxiliary/util/u_clear.h
@@ -37,7 +37,7 @@
* Clear the given buffers to the specified values.
* No masking, no scissor (clear entire buffer).
*/
-static INLINE void
+static inline void
util_clear(struct pipe_context *pipe,
struct pipe_framebuffer_state *framebuffer, unsigned buffers,
const union pipe_color_union *color, double depth, unsigned stencil)
diff --git a/src/gallium/auxiliary/util/u_cpu_detect.c b/src/gallium/auxiliary/util/u_cpu_detect.c
index 23ab46c54bc..d1f9e978682 100644
--- a/src/gallium/auxiliary/util/u_cpu_detect.c
+++ b/src/gallium/auxiliary/util/u_cpu_detect.c
@@ -179,7 +179,7 @@ static int has_cpuid(void)
* @sa cpuid.h included in gcc-4.3 onwards.
* @sa http://msdn.microsoft.com/en-us/library/hskdteyh.aspx
*/
-static INLINE void
+static inline void
cpuid(uint32_t ax, uint32_t *p)
{
#if (defined(PIPE_CC_GCC) || defined(PIPE_CC_SUNPRO)) && defined(PIPE_ARCH_X86)
@@ -216,7 +216,7 @@ cpuid(uint32_t ax, uint32_t *p)
* @sa cpuid.h included in gcc-4.4 onwards.
* @sa http://msdn.microsoft.com/en-us/library/hskdteyh%28v=vs.90%29.aspx
*/
-static INLINE void
+static inline void
cpuid_count(uint32_t ax, uint32_t cx, uint32_t *p)
{
#if (defined(PIPE_CC_GCC) || defined(PIPE_CC_SUNPRO)) && defined(PIPE_ARCH_X86)
@@ -250,7 +250,7 @@ cpuid_count(uint32_t ax, uint32_t cx, uint32_t *p)
}
-static INLINE uint64_t xgetbv(void)
+static inline uint64_t xgetbv(void)
{
#if defined(PIPE_CC_GCC)
uint32_t eax, edx;
@@ -272,7 +272,7 @@ static INLINE uint64_t xgetbv(void)
#if defined(PIPE_ARCH_X86)
-PIPE_ALIGN_STACK static INLINE boolean sse2_has_daz(void)
+PIPE_ALIGN_STACK static inline boolean sse2_has_daz(void)
{
struct {
uint32_t pad1[7];
diff --git a/src/gallium/auxiliary/util/u_debug.h b/src/gallium/auxiliary/util/u_debug.h
index 3b2255244a7..b4286d32b32 100644
--- a/src/gallium/auxiliary/util/u_debug.h
+++ b/src/gallium/auxiliary/util/u_debug.h
@@ -58,7 +58,7 @@ extern "C" {
void _debug_vprintf(const char *format, va_list ap);
-static INLINE void
+static inline void
_debug_printf(const char *format, ...)
{
va_list ap;
@@ -78,10 +78,10 @@ _debug_printf(const char *format, ...)
* that is guaranteed to be printed in all platforms)
*/
#if !defined(PIPE_OS_HAIKU)
-static INLINE void
+static inline void
debug_printf(const char *format, ...) _util_printf_format(1,2);
-static INLINE void
+static inline void
debug_printf(const char *format, ...)
{
#ifdef DEBUG
diff --git a/src/gallium/auxiliary/util/u_debug_memory.c b/src/gallium/auxiliary/util/u_debug_memory.c
index 747837cd148..3e7ecfa79f3 100644
--- a/src/gallium/auxiliary/util/u_debug_memory.c
+++ b/src/gallium/auxiliary/util/u_debug_memory.c
@@ -92,7 +92,7 @@ pipe_static_mutex(list_mutex);
static unsigned long last_no = 0;
-static INLINE struct debug_memory_header *
+static inline struct debug_memory_header *
header_from_data(void *data)
{
if(data)
@@ -101,7 +101,7 @@ header_from_data(void *data)
return NULL;
}
-static INLINE void *
+static inline void *
data_from_header(struct debug_memory_header *hdr)
{
if(hdr)
@@ -110,7 +110,7 @@ data_from_header(struct debug_memory_header *hdr)
return NULL;
}
-static INLINE struct debug_memory_footer *
+static inline struct debug_memory_footer *
footer_from_header(struct debug_memory_header *hdr)
{
if(hdr)
diff --git a/src/gallium/auxiliary/util/u_debug_refcnt.h b/src/gallium/auxiliary/util/u_debug_refcnt.h
index c02fba27ddf..1f9218fec9a 100644
--- a/src/gallium/auxiliary/util/u_debug_refcnt.h
+++ b/src/gallium/auxiliary/util/u_debug_refcnt.h
@@ -42,7 +42,7 @@ extern int debug_refcnt_state;
void debug_reference_slowpath(const struct pipe_reference* p, debug_reference_descriptor get_desc, int change);
-static INLINE void debug_reference(const struct pipe_reference* p, debug_reference_descriptor get_desc, int change)
+static inline void debug_reference(const struct pipe_reference* p, debug_reference_descriptor get_desc, int change)
{
if (debug_refcnt_state >= 0)
debug_reference_slowpath(p, get_desc, change);
@@ -50,7 +50,7 @@ static INLINE void debug_reference(const struct pipe_reference* p, debug_referen
#else
-static INLINE void debug_reference(const struct pipe_reference* p, debug_reference_descriptor get_desc, int change)
+static inline void debug_reference(const struct pipe_reference* p, debug_reference_descriptor get_desc, int change)
{
}
diff --git a/src/gallium/auxiliary/util/u_debug_symbol.c b/src/gallium/auxiliary/util/u_debug_symbol.c
index 542493252ce..10efdd593e5 100644
--- a/src/gallium/auxiliary/util/u_debug_symbol.c
+++ b/src/gallium/auxiliary/util/u_debug_symbol.c
@@ -146,7 +146,7 @@ DBGHELP_DISPATCH(SymGetLineFromAddr64,
#undef DBGHELP_DISPATCH
-static INLINE boolean
+static inline boolean
debug_symbol_name_dbghelp(const void *addr, char* buf, unsigned size)
{
DWORD64 dwAddr = (DWORD64)(uintptr_t)addr;
@@ -227,7 +227,7 @@ debug_symbol_name_dbghelp(const void *addr, char* buf, unsigned size)
*
* To fix this, post-process the output with tools/addr2line.sh
*/
-static INLINE boolean
+static inline boolean
debug_symbol_name_glibc(const void *addr, char* buf, unsigned size)
{
char** syms = backtrace_symbols((void**)&addr, 1);
diff --git a/src/gallium/auxiliary/util/u_dirty_surfaces.h b/src/gallium/auxiliary/util/u_dirty_surfaces.h
index d31f8b9170a..ccde8a8c115 100644
--- a/src/gallium/auxiliary/util/u_dirty_surfaces.h
+++ b/src/gallium/auxiliary/util/u_dirty_surfaces.h
@@ -47,13 +47,13 @@ struct util_dirty_surface
struct list_head dirty_list;
};
-static INLINE void
+static inline void
util_dirty_surfaces_init(struct util_dirty_surfaces *ds)
{
LIST_INITHEAD(&ds->dirty_list);
}
-static INLINE void
+static inline void
util_dirty_surfaces_use_for_sampling(struct pipe_context *pipe, struct util_dirty_surfaces *dss, util_dirty_surface_flush_t flush)
{
struct list_head *p, *next;
@@ -66,7 +66,7 @@ util_dirty_surfaces_use_for_sampling(struct pipe_context *pipe, struct util_dirt
}
}
-static INLINE void
+static inline void
util_dirty_surfaces_use_levels_for_sampling(struct pipe_context *pipe, struct util_dirty_surfaces *dss, unsigned first, unsigned last, util_dirty_surface_flush_t flush)
{
struct list_head *p, *next;
@@ -82,7 +82,7 @@ util_dirty_surfaces_use_levels_for_sampling(struct pipe_context *pipe, struct ut
}
}
-static INLINE void
+static inline void
util_dirty_surfaces_use_for_sampling_with(struct pipe_context *pipe, struct util_dirty_surfaces *dss, struct pipe_sampler_view *psv, struct pipe_sampler_state *pss, util_dirty_surface_flush_t flush)
{
if(!LIST_IS_EMPTY(&dss->dirty_list))
@@ -90,26 +90,26 @@ util_dirty_surfaces_use_for_sampling_with(struct pipe_context *pipe, struct util
MIN2((unsigned)ceilf(pss->max_lod) + psv->u.tex.first_level, psv->u.tex.last_level), flush);
}
-static INLINE void
+static inline void
util_dirty_surface_init(struct util_dirty_surface *ds)
{
LIST_INITHEAD(&ds->dirty_list);
}
-static INLINE boolean
+static inline boolean
util_dirty_surface_is_dirty(struct util_dirty_surface *ds)
{
return !LIST_IS_EMPTY(&ds->dirty_list);
}
-static INLINE void
+static inline void
util_dirty_surface_set_dirty(struct util_dirty_surfaces *dss, struct util_dirty_surface *ds)
{
if(LIST_IS_EMPTY(&ds->dirty_list))
LIST_ADDTAIL(&ds->dirty_list, &dss->dirty_list);
}
-static INLINE void
+static inline void
util_dirty_surface_set_clean(struct util_dirty_surfaces *dss, struct util_dirty_surface *ds)
{
if(!LIST_IS_EMPTY(&ds->dirty_list))
diff --git a/src/gallium/auxiliary/util/u_draw.h b/src/gallium/auxiliary/util/u_draw.h
index 9fc3e9924e1..5c0880f6ce4 100644
--- a/src/gallium/auxiliary/util/u_draw.h
+++ b/src/gallium/auxiliary/util/u_draw.h
@@ -39,7 +39,7 @@ extern "C" {
#endif
-static INLINE void
+static inline void
util_draw_init_info(struct pipe_draw_info *info)
{
memset(info, 0, sizeof(*info));
@@ -48,7 +48,7 @@ util_draw_init_info(struct pipe_draw_info *info)
}
-static INLINE void
+static inline void
util_draw_arrays(struct pipe_context *pipe, uint mode, uint start, uint count)
{
struct pipe_draw_info info;
@@ -63,7 +63,7 @@ util_draw_arrays(struct pipe_context *pipe, uint mode, uint start, uint count)
pipe->draw_vbo(pipe, &info);
}
-static INLINE void
+static inline void
util_draw_elements(struct pipe_context *pipe, int index_bias,
uint mode, uint start, uint count)
{
@@ -79,7 +79,7 @@ util_draw_elements(struct pipe_context *pipe, int index_bias,
pipe->draw_vbo(pipe, &info);
}
-static INLINE void
+static inline void
util_draw_arrays_instanced(struct pipe_context *pipe,
uint mode, uint start, uint count,
uint start_instance,
@@ -99,7 +99,7 @@ util_draw_arrays_instanced(struct pipe_context *pipe,
pipe->draw_vbo(pipe, &info);
}
-static INLINE void
+static inline void
util_draw_elements_instanced(struct pipe_context *pipe,
int index_bias,
uint mode, uint start, uint count,
@@ -120,7 +120,7 @@ util_draw_elements_instanced(struct pipe_context *pipe,
pipe->draw_vbo(pipe, &info);
}
-static INLINE void
+static inline void
util_draw_range_elements(struct pipe_context *pipe,
int index_bias,
uint min_index,
diff --git a/src/gallium/auxiliary/util/u_dual_blend.h b/src/gallium/auxiliary/util/u_dual_blend.h
index e31d43c18bd..9450800f715 100644
--- a/src/gallium/auxiliary/util/u_dual_blend.h
+++ b/src/gallium/auxiliary/util/u_dual_blend.h
@@ -3,7 +3,7 @@
#include "pipe/p_state.h"
-static INLINE boolean util_blend_factor_is_dual_src(int factor)
+static inline boolean util_blend_factor_is_dual_src(int factor)
{
return (factor == PIPE_BLENDFACTOR_SRC1_COLOR) ||
(factor == PIPE_BLENDFACTOR_SRC1_ALPHA) ||
@@ -11,7 +11,7 @@ static INLINE boolean util_blend_factor_is_dual_src(int factor)
(factor == PIPE_BLENDFACTOR_INV_SRC1_ALPHA);
}
-static INLINE boolean util_blend_state_is_dual(const struct pipe_blend_state *blend,
+static inline boolean util_blend_state_is_dual(const struct pipe_blend_state *blend,
int index)
{
if (util_blend_factor_is_dual_src(blend->rt[index].rgb_src_factor) ||
diff --git a/src/gallium/auxiliary/util/u_dump_state.c b/src/gallium/auxiliary/util/u_dump_state.c
index 88027cbbc79..58ccfba2dc4 100644
--- a/src/gallium/auxiliary/util/u_dump_state.c
+++ b/src/gallium/auxiliary/util/u_dump_state.c
@@ -39,7 +39,7 @@
* Dump primitives
*/
-static INLINE void
+static inline void
util_stream_writef(FILE *stream, const char *format, ...)
{
static char buf[1024];
diff --git a/src/gallium/auxiliary/util/u_dynarray.h b/src/gallium/auxiliary/util/u_dynarray.h
index 980cadf22d1..7b7a093d824 100644
--- a/src/gallium/auxiliary/util/u_dynarray.h
+++ b/src/gallium/auxiliary/util/u_dynarray.h
@@ -43,13 +43,13 @@ struct util_dynarray
unsigned capacity;
};
-static INLINE void
+static inline void
util_dynarray_init(struct util_dynarray *buf)
{
memset(buf, 0, sizeof(*buf));
}
-static INLINE void
+static inline void
util_dynarray_fini(struct util_dynarray *buf)
{
if(buf->data)
@@ -60,7 +60,7 @@ util_dynarray_fini(struct util_dynarray *buf)
}
/* use util_dynarray_trim to reduce the allocated storage */
-static INLINE void *
+static inline void *
util_dynarray_resize(struct util_dynarray *buf, unsigned newsize)
{
char *p;
@@ -78,13 +78,13 @@ util_dynarray_resize(struct util_dynarray *buf, unsigned newsize)
return p;
}
-static INLINE void *
+static inline void *
util_dynarray_grow(struct util_dynarray *buf, int diff)
{
return util_dynarray_resize(buf, buf->size + diff);
}
-static INLINE void
+static inline void
util_dynarray_trim(struct util_dynarray *buf)
{
if (buf->size != buf->capacity) {
diff --git a/src/gallium/auxiliary/util/u_fifo.h b/src/gallium/auxiliary/util/u_fifo.h
index 9e007de1ada..a7aad6179d9 100644
--- a/src/gallium/auxiliary/util/u_fifo.h
+++ b/src/gallium/auxiliary/util/u_fifo.h
@@ -36,7 +36,7 @@ struct util_fifo
size_t size;
};
-static INLINE struct util_fifo *
+static inline struct util_fifo *
u_fifo_create(size_t size)
{
struct util_fifo *fifo;
@@ -50,7 +50,7 @@ u_fifo_create(size_t size)
return fifo;
}
-static INLINE boolean
+static inline boolean
u_fifo_add(struct util_fifo *fifo, void *ptr)
{
void **array = (void**)&fifo[1];
@@ -67,7 +67,7 @@ u_fifo_add(struct util_fifo *fifo, void *ptr)
return TRUE;
}
-static INLINE boolean
+static inline boolean
u_fifo_pop(struct util_fifo *fifo, void **ptr)
{
void **array = (void**)&fifo[1];
@@ -85,7 +85,7 @@ u_fifo_pop(struct util_fifo *fifo, void **ptr)
return TRUE;
}
-static INLINE void
+static inline void
u_fifo_destroy(struct util_fifo *fifo)
{
FREE(fifo);
diff --git a/src/gallium/auxiliary/util/u_format.h b/src/gallium/auxiliary/util/u_format.h
index 621574c9673..42b39ff04fd 100644
--- a/src/gallium/auxiliary/util/u_format.h
+++ b/src/gallium/auxiliary/util/u_format.h
@@ -425,7 +425,7 @@ util_format_description(enum pipe_format format);
* Format query functions.
*/
-static INLINE const char *
+static inline const char *
util_format_name(enum pipe_format format)
{
const struct util_format_description *desc = util_format_description(format);
@@ -438,7 +438,7 @@ util_format_name(enum pipe_format format)
return desc->name;
}
-static INLINE const char *
+static inline const char *
util_format_short_name(enum pipe_format format)
{
const struct util_format_description *desc = util_format_description(format);
@@ -454,7 +454,7 @@ util_format_short_name(enum pipe_format format)
/**
* Whether this format is plain, see UTIL_FORMAT_LAYOUT_PLAIN for more info.
*/
-static INLINE boolean
+static inline boolean
util_format_is_plain(enum pipe_format format)
{
const struct util_format_description *desc = util_format_description(format);
@@ -466,7 +466,7 @@ util_format_is_plain(enum pipe_format format)
return desc->layout == UTIL_FORMAT_LAYOUT_PLAIN ? TRUE : FALSE;
}
-static INLINE boolean
+static inline boolean
util_format_is_compressed(enum pipe_format format)
{
const struct util_format_description *desc = util_format_description(format);
@@ -488,7 +488,7 @@ util_format_is_compressed(enum pipe_format format)
}
}
-static INLINE boolean
+static inline boolean
util_format_is_s3tc(enum pipe_format format)
{
const struct util_format_description *desc = util_format_description(format);
@@ -501,28 +501,28 @@ util_format_is_s3tc(enum pipe_format format)
return desc->layout == UTIL_FORMAT_LAYOUT_S3TC ? TRUE : FALSE;
}
-static INLINE boolean
+static inline boolean
util_format_is_srgb(enum pipe_format format)
{
const struct util_format_description *desc = util_format_description(format);
return desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB;
}
-static INLINE boolean
+static inline boolean
util_format_has_depth(const struct util_format_description *desc)
{
return desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS &&
desc->swizzle[0] != UTIL_FORMAT_SWIZZLE_NONE;
}
-static INLINE boolean
+static inline boolean
util_format_has_stencil(const struct util_format_description *desc)
{
return desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS &&
desc->swizzle[1] != UTIL_FORMAT_SWIZZLE_NONE;
}
-static INLINE boolean
+static inline boolean
util_format_is_depth_or_stencil(enum pipe_format format)
{
const struct util_format_description *desc = util_format_description(format);
@@ -536,7 +536,7 @@ util_format_is_depth_or_stencil(enum pipe_format format)
util_format_has_stencil(desc);
}
-static INLINE boolean
+static inline boolean
util_format_is_depth_and_stencil(enum pipe_format format)
{
const struct util_format_description *desc = util_format_description(format);
@@ -554,7 +554,7 @@ util_format_is_depth_and_stencil(enum pipe_format format)
/**
* Calculates the depth format type based upon the incoming format description.
*/
-static INLINE unsigned
+static inline unsigned
util_get_depth_format_type(const struct util_format_description *desc)
{
unsigned depth_channel = desc->swizzle[0];
@@ -581,7 +581,7 @@ util_get_depth_format_mrd(const struct util_format_description *desc);
* Return whether this is an RGBA, Z, S, or combined ZS format.
* Useful for initializing pipe_blit_info::mask.
*/
-static INLINE unsigned
+static inline unsigned
util_format_get_mask(enum pipe_format format)
{
const struct util_format_description *desc =
@@ -611,7 +611,7 @@ util_format_get_mask(enum pipe_format format)
*
* That is, the channels whose values are preserved.
*/
-static INLINE unsigned
+static inline unsigned
util_format_colormask(const struct util_format_description *desc)
{
unsigned colormask;
@@ -643,7 +643,7 @@ util_format_colormask(const struct util_format_description *desc)
* @param desc a format description to check colormask with
* @param colormask a bit mask for channels, matches format of PIPE_MASK_RGBA
*/
-static INLINE boolean
+static inline boolean
util_format_colormask_full(const struct util_format_description *desc, unsigned colormask)
{
return (~colormask & util_format_colormask(desc)) == 0;
@@ -709,7 +709,7 @@ util_format_is_supported(enum pipe_format format, unsigned bind);
*
* PIPE_FORMAT_?8?8?8?8_UNORM
*/
-static INLINE boolean
+static inline boolean
util_format_is_rgba8_variant(const struct util_format_description *desc)
{
unsigned chan;
@@ -737,7 +737,7 @@ util_format_is_rgba8_variant(const struct util_format_description *desc)
/**
* Return total bits needed for the pixel format per block.
*/
-static INLINE uint
+static inline uint
util_format_get_blocksizebits(enum pipe_format format)
{
const struct util_format_description *desc = util_format_description(format);
@@ -753,7 +753,7 @@ util_format_get_blocksizebits(enum pipe_format format)
/**
* Return bytes per block (not pixel) for the given format.
*/
-static INLINE uint
+static inline uint
util_format_get_blocksize(enum pipe_format format)
{
uint bits = util_format_get_blocksizebits(format);
@@ -768,7 +768,7 @@ util_format_get_blocksize(enum pipe_format format)
return bytes;
}
-static INLINE uint
+static inline uint
util_format_get_blockwidth(enum pipe_format format)
{
const struct util_format_description *desc = util_format_description(format);
@@ -781,7 +781,7 @@ util_format_get_blockwidth(enum pipe_format format)
return desc->block.width;
}
-static INLINE uint
+static inline uint
util_format_get_blockheight(enum pipe_format format)
{
const struct util_format_description *desc = util_format_description(format);
@@ -794,7 +794,7 @@ util_format_get_blockheight(enum pipe_format format)
return desc->block.height;
}
-static INLINE unsigned
+static inline unsigned
util_format_get_nblocksx(enum pipe_format format,
unsigned x)
{
@@ -802,7 +802,7 @@ util_format_get_nblocksx(enum pipe_format format,
return (x + blockwidth - 1) / blockwidth;
}
-static INLINE unsigned
+static inline unsigned
util_format_get_nblocksy(enum pipe_format format,
unsigned y)
{
@@ -810,7 +810,7 @@ util_format_get_nblocksy(enum pipe_format format,
return (y + blockheight - 1) / blockheight;
}
-static INLINE unsigned
+static inline unsigned
util_format_get_nblocks(enum pipe_format format,
unsigned width,
unsigned height)
@@ -818,14 +818,14 @@ util_format_get_nblocks(enum pipe_format format,
return util_format_get_nblocksx(format, width) * util_format_get_nblocksy(format, height);
}
-static INLINE size_t
+static inline size_t
util_format_get_stride(enum pipe_format format,
unsigned width)
{
return util_format_get_nblocksx(format, width) * util_format_get_blocksize(format);
}
-static INLINE size_t
+static inline size_t
util_format_get_2d_size(enum pipe_format format,
size_t stride,
unsigned height)
@@ -833,7 +833,7 @@ util_format_get_2d_size(enum pipe_format format,
return util_format_get_nblocksy(format, height) * stride;
}
-static INLINE uint
+static inline uint
util_format_get_component_bits(enum pipe_format format,
enum util_format_colorspace colorspace,
uint component)
@@ -880,7 +880,7 @@ util_format_get_component_bits(enum pipe_format format,
* Given a linear RGB colorspace format, return the corresponding SRGB
* format, or PIPE_FORMAT_NONE if none.
*/
-static INLINE enum pipe_format
+static inline enum pipe_format
util_format_srgb(enum pipe_format format)
{
if (util_format_is_srgb(format))
@@ -930,7 +930,7 @@ util_format_srgb(enum pipe_format format)
* Given an sRGB format, return the corresponding linear colorspace format.
* For non sRGB formats, return the format unchanged.
*/
-static INLINE enum pipe_format
+static inline enum pipe_format
util_format_linear(enum pipe_format format)
{
switch (format) {
@@ -977,7 +977,7 @@ util_format_linear(enum pipe_format format)
* Given a depth-stencil format, return the corresponding stencil-only format.
* For stencil-only formats, return the format unchanged.
*/
-static INLINE enum pipe_format
+static inline enum pipe_format
util_format_stencil_only(enum pipe_format format)
{
switch (format) {
@@ -1006,7 +1006,7 @@ util_format_stencil_only(enum pipe_format format)
* Converts PIPE_FORMAT_*I* to PIPE_FORMAT_*R*.
* This is identity for non-intensity formats.
*/
-static INLINE enum pipe_format
+static inline enum pipe_format
util_format_intensity_to_red(enum pipe_format format)
{
switch (format) {
@@ -1044,7 +1044,7 @@ util_format_intensity_to_red(enum pipe_format format)
* Converts PIPE_FORMAT_*L* to PIPE_FORMAT_*R*.
* This is identity for non-luminance formats.
*/
-static INLINE enum pipe_format
+static inline enum pipe_format
util_format_luminance_to_red(enum pipe_format format)
{
switch (format) {
@@ -1122,7 +1122,7 @@ util_format_luminance_to_red(enum pipe_format format)
* Return the number of components stored.
* Formats with block size != 1x1 will always have 1 component (the block).
*/
-static INLINE unsigned
+static inline unsigned
util_format_get_nr_components(enum pipe_format format)
{
const struct util_format_description *desc = util_format_description(format);
@@ -1133,7 +1133,7 @@ util_format_get_nr_components(enum pipe_format format)
* Return the index of the first non-void channel
* -1 if no non-void channels
*/
-static INLINE int
+static inline int
util_format_get_first_non_void_channel(enum pipe_format format)
{
const struct util_format_description *desc = util_format_description(format);
diff --git a/src/gallium/auxiliary/util/u_format_pack.py b/src/gallium/auxiliary/util/u_format_pack.py
index d5138cc0577..fb42de723c4 100644
--- a/src/gallium/auxiliary/util/u_format_pack.py
+++ b/src/gallium/auxiliary/util/u_format_pack.py
@@ -616,7 +616,7 @@ def generate_format_unpack(format, dst_channel, dst_native_type, dst_suffix):
name = format.short_name()
- print 'static INLINE void'
+ print 'static inline void'
print 'util_format_%s_unpack_%s(%s *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)' % (name, dst_suffix, dst_native_type)
print '{'
@@ -645,7 +645,7 @@ def generate_format_pack(format, src_channel, src_native_type, src_suffix):
name = format.short_name()
- print 'static INLINE void'
+ print 'static inline void'
print 'util_format_%s_pack_%s(uint8_t *dst_row, unsigned dst_stride, const %s *src_row, unsigned src_stride, unsigned width, unsigned height)' % (name, src_suffix, src_native_type)
print '{'
@@ -674,7 +674,7 @@ def generate_format_fetch(format, dst_channel, dst_native_type, dst_suffix):
name = format.short_name()
- print 'static INLINE void'
+ print 'static inline void'
print 'util_format_%s_fetch_%s(%s *dst, const uint8_t *src, unsigned i, unsigned j)' % (name, dst_suffix, dst_native_type)
print '{'
diff --git a/src/gallium/auxiliary/util/u_format_r11g11b10f.h b/src/gallium/auxiliary/util/u_format_r11g11b10f.h
index 57516c39c6e..218822b16e6 100644
--- a/src/gallium/auxiliary/util/u_format_r11g11b10f.h
+++ b/src/gallium/auxiliary/util/u_format_r11g11b10f.h
@@ -45,7 +45,7 @@
#define F32_INFINITY 0x7f800000
-static INLINE unsigned f32_to_uf11(float val)
+static inline unsigned f32_to_uf11(float val)
{
union {
float f;
@@ -94,7 +94,7 @@ static INLINE unsigned f32_to_uf11(float val)
return uf11;
}
-static INLINE float uf11_to_f32(uint16_t val)
+static inline float uf11_to_f32(uint16_t val)
{
union {
float f;
@@ -131,7 +131,7 @@ static INLINE float uf11_to_f32(uint16_t val)
return f32.f;
}
-static INLINE unsigned f32_to_uf10(float val)
+static inline unsigned f32_to_uf10(float val)
{
union {
float f;
@@ -180,7 +180,7 @@ static INLINE unsigned f32_to_uf10(float val)
return uf10;
}
-static INLINE float uf10_to_f32(uint16_t val)
+static inline float uf10_to_f32(uint16_t val)
{
union {
float f;
@@ -217,14 +217,14 @@ static INLINE float uf10_to_f32(uint16_t val)
return f32.f;
}
-static INLINE unsigned float3_to_r11g11b10f(const float rgb[3])
+static inline unsigned float3_to_r11g11b10f(const float rgb[3])
{
return ( f32_to_uf11(rgb[0]) & 0x7ff) |
((f32_to_uf11(rgb[1]) & 0x7ff) << 11) |
((f32_to_uf10(rgb[2]) & 0x3ff) << 22);
}
-static INLINE void r11g11b10f_to_float3(unsigned rgb, float retval[3])
+static inline void r11g11b10f_to_float3(unsigned rgb, float retval[3])
{
retval[0] = uf11_to_f32( rgb & 0x7ff);
retval[1] = uf11_to_f32((rgb >> 11) & 0x7ff);
diff --git a/src/gallium/auxiliary/util/u_format_rgb9e5.h b/src/gallium/auxiliary/util/u_format_rgb9e5.h
index c2a3f6f3e9d..973e542c536 100644
--- a/src/gallium/auxiliary/util/u_format_rgb9e5.h
+++ b/src/gallium/auxiliary/util/u_format_rgb9e5.h
@@ -73,7 +73,7 @@ typedef union {
} field;
} rgb9e5;
-static INLINE float rgb9e5_ClampRange(float x)
+static inline float rgb9e5_ClampRange(float x)
{
if (x > 0.0) {
if (x >= MAX_RGB9E5) {
@@ -90,7 +90,7 @@ static INLINE float rgb9e5_ClampRange(float x)
/* Ok, FloorLog2 is not correct for the denorm and zero values, but we
are going to do a max of this value with the minimum rgb9e5 exponent
that will hide these problem cases. */
-static INLINE int rgb9e5_FloorLog2(float x)
+static inline int rgb9e5_FloorLog2(float x)
{
float754 f;
@@ -98,7 +98,7 @@ static INLINE int rgb9e5_FloorLog2(float x)
return (f.field.biasedexponent - 127);
}
-static INLINE unsigned float3_to_rgb9e5(const float rgb[3])
+static inline unsigned float3_to_rgb9e5(const float rgb[3])
{
rgb9e5 retval;
float maxrgb;
@@ -146,7 +146,7 @@ static INLINE unsigned float3_to_rgb9e5(const float rgb[3])
return retval.raw;
}
-static INLINE void rgb9e5_to_float3(unsigned rgb, float retval[3])
+static inline void rgb9e5_to_float3(unsigned rgb, float retval[3])
{
rgb9e5 v;
int exponent;
diff --git a/src/gallium/auxiliary/util/u_format_s3tc.c b/src/gallium/auxiliary/util/u_format_s3tc.c
index 7e05989e6a1..cd3e165d3f0 100644
--- a/src/gallium/auxiliary/util/u_format_s3tc.c
+++ b/src/gallium/auxiliary/util/u_format_s3tc.c
@@ -235,7 +235,7 @@ util_format_dxt5_rgba_fetch_rgba_float(float *dst, const uint8_t *src, unsigned
* Block decompression.
*/
-static INLINE void
+static inline void
util_format_dxtn_rgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
const uint8_t *src_row, unsigned src_stride,
unsigned width, unsigned height,
@@ -312,7 +312,7 @@ util_format_dxt5_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
16, FALSE);
}
-static INLINE void
+static inline void
util_format_dxtn_rgb_unpack_rgba_float(float *dst_row, unsigned dst_stride,
const uint8_t *src_row, unsigned src_stride,
unsigned width, unsigned height,
@@ -400,7 +400,7 @@ util_format_dxt5_rgba_unpack_rgba_float(float *dst_row, unsigned dst_stride,
* Block compression.
*/
-static INLINE void
+static inline void
util_format_dxtn_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
const uint8_t *src, unsigned src_stride,
unsigned width, unsigned height,
@@ -478,7 +478,7 @@ util_format_dxt5_rgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
16, FALSE);
}
-static INLINE void
+static inline void
util_format_dxtn_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
const float *src, unsigned src_stride,
unsigned width, unsigned height,
diff --git a/src/gallium/auxiliary/util/u_format_yuv.h b/src/gallium/auxiliary/util/u_format_yuv.h
index 4ec39812e47..41524d63f3a 100644
--- a/src/gallium/auxiliary/util/u_format_yuv.h
+++ b/src/gallium/auxiliary/util/u_format_yuv.h
@@ -54,7 +54,7 @@
* precision in the coefficients.
*/
-static INLINE void
+static inline void
util_format_rgb_float_to_yuv(float r, float g, float b,
uint8_t *y, uint8_t *u, uint8_t *v)
{
@@ -74,7 +74,7 @@ util_format_rgb_float_to_yuv(float r, float g, float b,
}
-static INLINE void
+static inline void
util_format_yuv_to_rgb_float(uint8_t y, uint8_t u, uint8_t v,
float *r, float *g, float *b)
{
@@ -92,7 +92,7 @@ util_format_yuv_to_rgb_float(uint8_t y, uint8_t u, uint8_t v,
}
-static INLINE void
+static inline void
util_format_rgb_8unorm_to_yuv(uint8_t r, uint8_t g, uint8_t b,
uint8_t *y, uint8_t *u, uint8_t *v)
{
@@ -102,7 +102,7 @@ util_format_rgb_8unorm_to_yuv(uint8_t r, uint8_t g, uint8_t b,
}
-static INLINE void
+static inline void
util_format_yuv_to_rgb_8unorm(uint8_t y, uint8_t u, uint8_t v,
uint8_t *r, uint8_t *g, uint8_t *b)
{
diff --git a/src/gallium/auxiliary/util/u_format_zs.c b/src/gallium/auxiliary/util/u_format_zs.c
index f1ed32f1d5c..69f2f2971f7 100644
--- a/src/gallium/auxiliary/util/u_format_zs.c
+++ b/src/gallium/auxiliary/util/u_format_zs.c
@@ -35,28 +35,28 @@
* z32_unorm conversion functions
*/
-static INLINE uint16_t
+static inline uint16_t
z32_unorm_to_z16_unorm(uint32_t z)
{
/* z * 0xffff / 0xffffffff */
return z >> 16;
}
-static INLINE uint32_t
+static inline uint32_t
z16_unorm_to_z32_unorm(uint16_t z)
{
/* z * 0xffffffff / 0xffff */
return (z << 16) | z;
}
-static INLINE uint32_t
+static inline uint32_t
z32_unorm_to_z24_unorm(uint32_t z)
{
/* z * 0xffffff / 0xffffffff */
return z >> 8;
}
-static INLINE uint32_t
+static inline uint32_t
z24_unorm_to_z32_unorm(uint32_t z)
{
/* z * 0xffffffff / 0xffffff */
@@ -68,42 +68,42 @@ z24_unorm_to_z32_unorm(uint32_t z)
* z32_float conversion functions
*/
-static INLINE uint16_t
+static inline uint16_t
z32_float_to_z16_unorm(float z)
{
const float scale = 0xffff;
return (uint16_t)(z * scale + 0.5f);
}
-static INLINE float
+static inline float
z16_unorm_to_z32_float(uint16_t z)
{
const float scale = 1.0 / 0xffff;
return (float)(z * scale);
}
-static INLINE uint32_t
+static inline uint32_t
z32_float_to_z24_unorm(float z)
{
const double scale = 0xffffff;
return (uint32_t)(z * scale) & 0xffffff;
}
-static INLINE float
+static inline float
z24_unorm_to_z32_float(uint32_t z)
{
const double scale = 1.0 / 0xffffff;
return (float)(z * scale);
}
-static INLINE uint32_t
+static inline uint32_t
z32_float_to_z32_unorm(float z)
{
const double scale = 0xffffffff;
return (uint32_t)(z * scale);
}
-static INLINE float
+static inline float
z32_unorm_to_z32_float(uint32_t z)
{
const double scale = 1.0 / 0xffffffff;
diff --git a/src/gallium/auxiliary/util/u_half.h b/src/gallium/auxiliary/util/u_half.h
index d340b9a7aef..d28fae3c77d 100644
--- a/src/gallium/auxiliary/util/u_half.h
+++ b/src/gallium/auxiliary/util/u_half.h
@@ -43,7 +43,7 @@ extern "C" {
* https://gist.github.com/2144712
*/
-static INLINE uint16_t
+static inline uint16_t
util_float_to_half(float f)
{
uint32_t sign_mask = 0x80000000;
@@ -96,7 +96,7 @@ util_float_to_half(float f)
return f16;
}
-static INLINE float
+static inline float
util_half_to_float(uint16_t f16)
{
union fi infnan;
diff --git a/src/gallium/auxiliary/util/u_handle_table.c b/src/gallium/auxiliary/util/u_handle_table.c
index 85302f1e194..42c4e44b644 100644
--- a/src/gallium/auxiliary/util/u_handle_table.c
+++ b/src/gallium/auxiliary/util/u_handle_table.c
@@ -96,7 +96,7 @@ handle_table_set_destroy(struct handle_table *ht,
/**
* Resize the table if necessary
*/
-static INLINE int
+static inline int
handle_table_resize(struct handle_table *ht,
unsigned minimum_size)
{
@@ -126,7 +126,7 @@ handle_table_resize(struct handle_table *ht,
}
-static INLINE void
+static inline void
handle_table_clear(struct handle_table *ht,
unsigned index)
{
diff --git a/src/gallium/auxiliary/util/u_hash_table.c b/src/gallium/auxiliary/util/u_hash_table.c
index 06c8b5c91a5..a505fbc4d83 100644
--- a/src/gallium/auxiliary/util/u_hash_table.c
+++ b/src/gallium/auxiliary/util/u_hash_table.c
@@ -68,7 +68,7 @@ struct util_hash_table_item
};
-static INLINE struct util_hash_table_item *
+static inline struct util_hash_table_item *
util_hash_table_item(struct cso_hash_iter iter)
{
return (struct util_hash_table_item *)cso_hash_iter_data(iter);
@@ -98,7 +98,7 @@ util_hash_table_create(unsigned (*hash)(void *key),
}
-static INLINE struct cso_hash_iter
+static inline struct cso_hash_iter
util_hash_table_find_iter(struct util_hash_table *ht,
void *key,
unsigned key_hash)
@@ -118,7 +118,7 @@ util_hash_table_find_iter(struct util_hash_table *ht,
}
-static INLINE struct util_hash_table_item *
+static inline struct util_hash_table_item *
util_hash_table_find_item(struct util_hash_table *ht,
void *key,
unsigned key_hash)
diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h
index 661a949a4b1..bb99a02ce49 100644
--- a/src/gallium/auxiliary/util/u_inlines.h
+++ b/src/gallium/auxiliary/util/u_inlines.h
@@ -51,13 +51,13 @@ extern "C" {
*/
-static INLINE void
+static inline void
pipe_reference_init(struct pipe_reference *reference, unsigned count)
{
p_atomic_set(&reference->count, count);
}
-static INLINE boolean
+static inline boolean
pipe_is_referenced(struct pipe_reference *reference)
{
return p_atomic_read(&reference->count) != 0;
@@ -69,7 +69,7 @@ pipe_is_referenced(struct pipe_reference *reference)
* Both 'ptr' and 'reference' may be NULL.
* \return TRUE if the object's refcount hits zero and should be destroyed.
*/
-static INLINE boolean
+static inline boolean
pipe_reference_described(struct pipe_reference *ptr,
struct pipe_reference *reference,
debug_reference_descriptor get_desc)
@@ -96,14 +96,14 @@ pipe_reference_described(struct pipe_reference *ptr,
return destroy;
}
-static INLINE boolean
+static inline boolean
pipe_reference(struct pipe_reference *ptr, struct pipe_reference *reference)
{
return pipe_reference_described(ptr, reference,
(debug_reference_descriptor)debug_describe_reference);
}
-static INLINE void
+static inline void
pipe_surface_reference(struct pipe_surface **ptr, struct pipe_surface *surf)
{
struct pipe_surface *old_surf = *ptr;
@@ -120,7 +120,7 @@ pipe_surface_reference(struct pipe_surface **ptr, struct pipe_surface *surf)
* of using a deleted context's surface_destroy() method when freeing a surface
* that's shared by multiple contexts.
*/
-static INLINE void
+static inline void
pipe_surface_release(struct pipe_context *pipe, struct pipe_surface **ptr)
{
if (pipe_reference_described(&(*ptr)->reference, NULL,
@@ -130,7 +130,7 @@ pipe_surface_release(struct pipe_context *pipe, struct pipe_surface **ptr)
}
-static INLINE void
+static inline void
pipe_resource_reference(struct pipe_resource **ptr, struct pipe_resource *tex)
{
struct pipe_resource *old_tex = *ptr;
@@ -141,7 +141,7 @@ pipe_resource_reference(struct pipe_resource **ptr, struct pipe_resource *tex)
*ptr = tex;
}
-static INLINE void
+static inline void
pipe_sampler_view_reference(struct pipe_sampler_view **ptr, struct pipe_sampler_view *view)
{
struct pipe_sampler_view *old_view = *ptr;
@@ -158,7 +158,7 @@ pipe_sampler_view_reference(struct pipe_sampler_view **ptr, struct pipe_sampler_
* work-around for fixing a dangling context pointer problem when textures
* are shared by multiple contexts. XXX fix this someday.
*/
-static INLINE void
+static inline void
pipe_sampler_view_release(struct pipe_context *ctx,
struct pipe_sampler_view **ptr)
{
@@ -173,7 +173,7 @@ pipe_sampler_view_release(struct pipe_context *ctx,
*ptr = NULL;
}
-static INLINE void
+static inline void
pipe_image_view_reference(struct pipe_image_view **ptr, struct pipe_image_view *view)
{
struct pipe_image_view *old_view = *ptr;
@@ -184,7 +184,7 @@ pipe_image_view_reference(struct pipe_image_view **ptr, struct pipe_image_view *
*ptr = view;
}
-static INLINE void
+static inline void
pipe_so_target_reference(struct pipe_stream_output_target **ptr,
struct pipe_stream_output_target *target)
{
@@ -196,7 +196,7 @@ pipe_so_target_reference(struct pipe_stream_output_target **ptr,
*ptr = target;
}
-static INLINE void
+static inline void
pipe_surface_reset(struct pipe_context *ctx, struct pipe_surface* ps,
struct pipe_resource *pt, unsigned level, unsigned layer)
{
@@ -209,7 +209,7 @@ pipe_surface_reset(struct pipe_context *ctx, struct pipe_surface* ps,
ps->context = ctx;
}
-static INLINE void
+static inline void
pipe_surface_init(struct pipe_context *ctx, struct pipe_surface* ps,
struct pipe_resource *pt, unsigned level, unsigned layer)
{
@@ -219,7 +219,7 @@ pipe_surface_init(struct pipe_context *ctx, struct pipe_surface* ps,
}
/* Return true if the surfaces are equal. */
-static INLINE boolean
+static inline boolean
pipe_surface_equal(struct pipe_surface *s1, struct pipe_surface *s2)
{
return s1->texture == s2->texture &&
@@ -243,7 +243,7 @@ pipe_surface_equal(struct pipe_surface *s1, struct pipe_surface *s2)
* \param bind bitmask of PIPE_BIND_x flags
* \param usage bitmask of PIPE_USAGE_x flags
*/
-static INLINE struct pipe_resource *
+static inline struct pipe_resource *
pipe_buffer_create( struct pipe_screen *screen,
unsigned bind,
unsigned usage,
@@ -271,7 +271,7 @@ pipe_buffer_create( struct pipe_screen *screen,
* \param access bitmask of PIPE_TRANSFER_x flags
* \param transfer returns a transfer object
*/
-static INLINE void *
+static inline void *
pipe_buffer_map_range(struct pipe_context *pipe,
struct pipe_resource *buffer,
unsigned offset,
@@ -302,7 +302,7 @@ pipe_buffer_map_range(struct pipe_context *pipe,
* \param access bitmask of PIPE_TRANSFER_x flags
* \param transfer returns a transfer object
*/
-static INLINE void *
+static inline void *
pipe_buffer_map(struct pipe_context *pipe,
struct pipe_resource *buffer,
unsigned access,
@@ -312,14 +312,14 @@ pipe_buffer_map(struct pipe_context *pipe,
}
-static INLINE void
+static inline void
pipe_buffer_unmap(struct pipe_context *pipe,
struct pipe_transfer *transfer)
{
pipe->transfer_unmap(pipe, transfer);
}
-static INLINE void
+static inline void
pipe_buffer_flush_mapped_range(struct pipe_context *pipe,
struct pipe_transfer *transfer,
unsigned offset,
@@ -343,7 +343,7 @@ pipe_buffer_flush_mapped_range(struct pipe_context *pipe,
pipe->transfer_flush_region(pipe, transfer, &box);
}
-static INLINE void
+static inline void
pipe_buffer_write(struct pipe_context *pipe,
struct pipe_resource *buf,
unsigned offset,
@@ -377,7 +377,7 @@ pipe_buffer_write(struct pipe_context *pipe,
* We can avoid GPU/CPU synchronization when writing range that has never
* been written before.
*/
-static INLINE void
+static inline void
pipe_buffer_write_nooverlap(struct pipe_context *pipe,
struct pipe_resource *buf,
unsigned offset, unsigned size,
@@ -403,7 +403,7 @@ pipe_buffer_write_nooverlap(struct pipe_context *pipe,
* \param bind bitmask of PIPE_BIND_x flags
* \param usage bitmask of PIPE_USAGE_x flags
*/
-static INLINE struct pipe_resource *
+static inline struct pipe_resource *
pipe_buffer_create_with_data(struct pipe_context *pipe,
unsigned bind,
unsigned usage,
@@ -416,7 +416,7 @@ pipe_buffer_create_with_data(struct pipe_context *pipe,
return res;
}
-static INLINE void
+static inline void
pipe_buffer_read(struct pipe_context *pipe,
struct pipe_resource *buf,
unsigned offset,
@@ -443,7 +443,7 @@ pipe_buffer_read(struct pipe_context *pipe,
* Map a resource for reading/writing.
* \param access bitmask of PIPE_TRANSFER_x flags
*/
-static INLINE void *
+static inline void *
pipe_transfer_map(struct pipe_context *context,
struct pipe_resource *resource,
unsigned level, unsigned layer,
@@ -466,7 +466,7 @@ pipe_transfer_map(struct pipe_context *context,
* Map a 3D (texture) resource for reading/writing.
* \param access bitmask of PIPE_TRANSFER_x flags
*/
-static INLINE void *
+static inline void *
pipe_transfer_map_3d(struct pipe_context *context,
struct pipe_resource *resource,
unsigned level,
@@ -484,14 +484,14 @@ pipe_transfer_map_3d(struct pipe_context *context,
&box, transfer);
}
-static INLINE void
+static inline void
pipe_transfer_unmap( struct pipe_context *context,
struct pipe_transfer *transfer )
{
context->transfer_unmap( context, transfer );
}
-static INLINE void
+static inline void
pipe_set_constant_buffer(struct pipe_context *pipe, uint shader, uint index,
struct pipe_resource *buf)
{
@@ -512,7 +512,7 @@ pipe_set_constant_buffer(struct pipe_context *pipe, uint shader, uint index,
* Get the polygon offset enable/disable flag for the given polygon fill mode.
* \param fill_mode one of PIPE_POLYGON_MODE_POINT/LINE/FILL
*/
-static INLINE boolean
+static inline boolean
util_get_offset(const struct pipe_rasterizer_state *templ,
unsigned fill_mode)
{
@@ -529,7 +529,7 @@ util_get_offset(const struct pipe_rasterizer_state *templ,
}
}
-static INLINE float
+static inline float
util_get_min_point_size(const struct pipe_rasterizer_state *state)
{
/* The point size should be clamped to this value at the rasterizer stage.
@@ -539,7 +539,7 @@ util_get_min_point_size(const struct pipe_rasterizer_state *state)
!state->multisample ? 1.0f : 0.0f;
}
-static INLINE void
+static inline void
util_query_clear_result(union pipe_query_result *result, unsigned type)
{
switch (type) {
@@ -570,7 +570,7 @@ util_query_clear_result(union pipe_query_result *result, unsigned type)
}
/** Convert PIPE_TEXTURE_x to TGSI_TEXTURE_x */
-static INLINE unsigned
+static inline unsigned
util_pipe_tex_to_tgsi_tex(enum pipe_texture_target pipe_tex_target,
unsigned nr_samples)
{
@@ -615,7 +615,7 @@ util_pipe_tex_to_tgsi_tex(enum pipe_texture_target pipe_tex_target,
}
-static INLINE void
+static inline void
util_copy_constant_buffer(struct pipe_constant_buffer *dst,
const struct pipe_constant_buffer *src)
{
@@ -633,7 +633,7 @@ util_copy_constant_buffer(struct pipe_constant_buffer *dst,
}
}
-static INLINE unsigned
+static inline unsigned
util_max_layer(const struct pipe_resource *r, unsigned level)
{
switch (r->target) {
diff --git a/src/gallium/auxiliary/util/u_keymap.c b/src/gallium/auxiliary/util/u_keymap.c
index ae14eda3cec..daa2991ced6 100644
--- a/src/gallium/auxiliary/util/u_keymap.c
+++ b/src/gallium/auxiliary/util/u_keymap.c
@@ -71,7 +71,7 @@ default_delete_func(const struct keymap *map,
}
-static INLINE struct keymap_item *
+static inline struct keymap_item *
hash_table_item(struct cso_hash_iter iter)
{
return (struct keymap_item *) cso_hash_iter_data(iter);
@@ -143,7 +143,7 @@ util_delete_keymap(struct keymap *map, void *user)
}
-static INLINE struct cso_hash_iter
+static inline struct cso_hash_iter
hash_table_find_iter(const struct keymap *map, const void *key,
unsigned key_hash)
{
@@ -162,7 +162,7 @@ hash_table_find_iter(const struct keymap *map, const void *key,
}
-static INLINE struct keymap_item *
+static inline struct keymap_item *
hash_table_find_item(const struct keymap *map, const void *key,
unsigned key_hash)
{
diff --git a/src/gallium/auxiliary/util/u_linear.h b/src/gallium/auxiliary/util/u_linear.h
index 81ffc9fb27d..87e52a344d4 100644
--- a/src/gallium/auxiliary/util/u_linear.h
+++ b/src/gallium/auxiliary/util/u_linear.h
@@ -89,7 +89,7 @@ void pipe_linear_fill_info(struct pipe_tile_info *t,
unsigned tile_width, unsigned tile_height,
unsigned tiles_x, unsigned tiles_y);
-static INLINE boolean pipe_linear_check_tile(const struct pipe_tile_info *t)
+static inline boolean pipe_linear_check_tile(const struct pipe_tile_info *t)
{
if (t->tile.size != t->block.size * t->cols * t->rows)
return FALSE;
diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h
index 3b4040f0ee2..f5c409dbdf2 100644
--- a/src/gallium/auxiliary/util/u_math.h
+++ b/src/gallium/auxiliary/util/u_math.h
@@ -92,7 +92,7 @@ union di {
/**
* Extract the IEEE float32 exponent.
*/
-static INLINE signed
+static inline signed
util_get_float32_exponent(float x)
{
union fi f;
@@ -112,7 +112,7 @@ util_get_float32_exponent(float x)
* Compute exp2(ipart) with i << ipart
* Compute exp2(fpart) with lookup table.
*/
-static INLINE float
+static inline float
util_fast_exp2(float x)
{
int32_t ipart;
@@ -143,7 +143,7 @@ util_fast_exp2(float x)
/**
* Fast approximation to exp(x).
*/
-static INLINE float
+static inline float
util_fast_exp(float x)
{
const float k = 1.44269f; /* = log2(e) */
@@ -160,7 +160,7 @@ extern float log2_table[LOG2_TABLE_SIZE];
/**
* Fast approximation to log2(x).
*/
-static INLINE float
+static inline float
util_fast_log2(float x)
{
union fi num;
@@ -176,7 +176,7 @@ util_fast_log2(float x)
/**
* Fast approximation to x^y.
*/
-static INLINE float
+static inline float
util_fast_pow(float x, float y)
{
return util_fast_exp2(util_fast_log2(x) * y);
@@ -184,7 +184,7 @@ util_fast_pow(float x, float y)
/* Note that this counts zero as a power of two.
*/
-static INLINE boolean
+static inline boolean
util_is_power_of_two( unsigned v )
{
return (v & (v-1)) == 0;
@@ -194,7 +194,7 @@ util_is_power_of_two( unsigned v )
/**
* Floor(x), returned as int.
*/
-static INLINE int
+static inline int
util_ifloor(float f)
{
int ai, bi;
@@ -211,7 +211,7 @@ util_ifloor(float f)
/**
* Round float to nearest int.
*/
-static INLINE int
+static inline int
util_iround(float f)
{
#if defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86)
@@ -237,7 +237,7 @@ util_iround(float f)
/**
* Approximate floating point comparison
*/
-static INLINE boolean
+static inline boolean
util_is_approx(float a, float b, float tol)
{
return fabs(b - a) <= tol;
@@ -256,7 +256,7 @@ util_is_approx(float a, float b, float tol)
/**
* Single-float
*/
-static INLINE boolean
+static inline boolean
util_is_inf_or_nan(float x)
{
union fi tmp;
@@ -265,7 +265,7 @@ util_is_inf_or_nan(float x)
}
-static INLINE boolean
+static inline boolean
util_is_nan(float x)
{
union fi tmp;
@@ -274,7 +274,7 @@ util_is_nan(float x)
}
-static INLINE int
+static inline int
util_inf_sign(float x)
{
union fi tmp;
@@ -290,7 +290,7 @@ util_inf_sign(float x)
/**
* Double-float
*/
-static INLINE boolean
+static inline boolean
util_is_double_inf_or_nan(double x)
{
union di tmp;
@@ -299,7 +299,7 @@ util_is_double_inf_or_nan(double x)
}
-static INLINE boolean
+static inline boolean
util_is_double_nan(double x)
{
union di tmp;
@@ -308,7 +308,7 @@ util_is_double_nan(double x)
}
-static INLINE int
+static inline int
util_double_inf_sign(double x)
{
union di tmp;
@@ -324,21 +324,21 @@ util_double_inf_sign(double x)
/**
* Half-float
*/
-static INLINE boolean
+static inline boolean
util_is_half_inf_or_nan(int16_t x)
{
return (x & 0x7c00) == 0x7c00;
}
-static INLINE boolean
+static inline boolean
util_is_half_nan(int16_t x)
{
return (x & 0x7fff) > 0x7c00;
}
-static INLINE int
+static inline int
util_half_inf_sign(int16_t x)
{
if ((x & 0x7fff) != 0x7c00) {
@@ -359,7 +359,7 @@ util_half_inf_sign(int16_t x)
#if defined(_MSC_VER) && (_M_IX86 || _M_AMD64 || _M_IA64)
unsigned char _BitScanForward(unsigned long* Index, unsigned long Mask);
#pragma intrinsic(_BitScanForward)
-static INLINE
+static inline
unsigned long ffs( unsigned long u )
{
unsigned long i;
@@ -369,7 +369,7 @@ unsigned long ffs( unsigned long u )
return 0;
}
#elif defined(PIPE_CC_MSVC) && defined(PIPE_ARCH_X86)
-static INLINE
+static inline
unsigned ffs( unsigned u )
{
unsigned i;
@@ -409,7 +409,7 @@ unsigned ffs( unsigned u )
* Find last bit set in a word. The least significant bit is 1.
* Return 0 if no bits are set.
*/
-static INLINE unsigned
+static inline unsigned
util_last_bit(unsigned u)
{
#if defined(HAVE___BUILTIN_CLZ)
@@ -428,7 +428,7 @@ util_last_bit(unsigned u)
* Find last bit set in a word. The least significant bit is 1.
* Return 0 if no bits are set.
*/
-static INLINE unsigned
+static inline unsigned
util_last_bit64(uint64_t u)
{
#if defined(HAVE___BUILTIN_CLZLL)
@@ -448,7 +448,7 @@ util_last_bit64(uint64_t u)
* significant bit is 1.
* Return 0 if no bits are set.
*/
-static INLINE unsigned
+static inline unsigned
util_last_bit_signed(int i)
{
if (i >= 0)
@@ -465,7 +465,7 @@ util_last_bit_signed(int i)
* }
*
*/
-static INLINE int
+static inline int
u_bit_scan(unsigned *mask)
{
int i = ffs(*mask) - 1;
@@ -474,7 +474,7 @@ u_bit_scan(unsigned *mask)
}
#ifndef _MSC_VER
-static INLINE int
+static inline int
u_bit_scan64(uint64_t *mask)
{
int i = ffsll(*mask) - 1;
@@ -486,7 +486,7 @@ u_bit_scan64(uint64_t *mask)
/**
* Return float bits.
*/
-static INLINE unsigned
+static inline unsigned
fui( float f )
{
union fi fi;
@@ -494,7 +494,7 @@ fui( float f )
return fi.ui;
}
-static INLINE float
+static inline float
uif(uint32_t ui)
{
union fi fi;
@@ -507,7 +507,7 @@ uif(uint32_t ui)
* Convert ubyte to float in [0, 1].
* XXX a 256-entry lookup table would be slightly faster.
*/
-static INLINE float
+static inline float
ubyte_to_float(ubyte ub)
{
return (float) ub * (1.0f / 255.0f);
@@ -517,7 +517,7 @@ ubyte_to_float(ubyte ub)
/**
* Convert float in [0,1] to ubyte in [0,255] with clamping.
*/
-static INLINE ubyte
+static inline ubyte
float_to_ubyte(float f)
{
union fi tmp;
@@ -535,13 +535,13 @@ float_to_ubyte(float f)
}
}
-static INLINE float
+static inline float
byte_to_float_tex(int8_t b)
{
return (b == -128) ? -1.0F : b * 1.0F / 127.0F;
}
-static INLINE int8_t
+static inline int8_t
float_to_byte_tex(float f)
{
return (int8_t) (127.0F * f);
@@ -550,7 +550,7 @@ float_to_byte_tex(float f)
/**
* Calc log base 2
*/
-static INLINE unsigned
+static inline unsigned
util_logbase2(unsigned n)
{
#if defined(HAVE___BUILTIN_CLZ)
@@ -570,7 +570,7 @@ util_logbase2(unsigned n)
/**
* Returns the smallest power of two >= x
*/
-static INLINE unsigned
+static inline unsigned
util_next_power_of_two(unsigned x)
{
#if defined(HAVE___BUILTIN_CLZ)
@@ -602,7 +602,7 @@ util_next_power_of_two(unsigned x)
/**
* Return number of bits set in n.
*/
-static INLINE unsigned
+static inline unsigned
util_bitcount(unsigned n)
{
#if defined(HAVE___BUILTIN_POPCOUNT)
@@ -623,7 +623,7 @@ util_bitcount(unsigned n)
}
-static INLINE unsigned
+static inline unsigned
util_bitcount64(uint64_t n)
{
#ifdef HAVE___BUILTIN_POPCOUNTLL
@@ -639,7 +639,7 @@ util_bitcount64(uint64_t n)
* Algorithm taken from:
* http://stackoverflow.com/questions/9144800/c-reverse-bits-in-unsigned-integer
*/
-static INLINE unsigned
+static inline unsigned
util_bitreverse(unsigned n)
{
n = ((n >> 1) & 0x55555555u) | ((n & 0x55555555u) << 1);
@@ -671,7 +671,7 @@ util_bitreverse(unsigned n)
/**
* Reverse byte order of a 32 bit word.
*/
-static INLINE uint32_t
+static inline uint32_t
util_bswap32(uint32_t n)
{
#if defined(HAVE___BUILTIN_BSWAP32)
@@ -687,7 +687,7 @@ util_bswap32(uint32_t n)
/**
* Reverse byte order of a 64bit word.
*/
-static INLINE uint64_t
+static inline uint64_t
util_bswap64(uint64_t n)
{
#if defined(HAVE___BUILTIN_BSWAP64)
@@ -702,14 +702,14 @@ util_bswap64(uint64_t n)
/**
* Reverse byte order of a 16 bit word.
*/
-static INLINE uint16_t
+static inline uint16_t
util_bswap16(uint16_t n)
{
return (n >> 8) |
(n << 8);
}
-static INLINE void*
+static inline void*
util_memcpy_cpu_to_le32(void * restrict dest, const void * restrict src, size_t n)
{
#ifdef PIPE_ARCH_BIG_ENDIAN
@@ -746,7 +746,7 @@ util_memcpy_cpu_to_le32(void * restrict dest, const void * restrict src, size_t
/**
* Align a value, only works pot alignemnts.
*/
-static INLINE int
+static inline int
align(int value, int alignment)
{
return (value + alignment - 1) & ~(alignment - 1);
@@ -755,7 +755,7 @@ align(int value, int alignment)
/**
* Works like align but on npot alignments.
*/
-static INLINE size_t
+static inline size_t
util_align_npot(size_t value, size_t alignment)
{
if (value % alignment)
@@ -763,7 +763,7 @@ util_align_npot(size_t value, size_t alignment)
return value;
}
-static INLINE unsigned
+static inline unsigned
u_minify(unsigned value, unsigned levels)
{
return MAX2(1, value >> levels);
@@ -796,13 +796,13 @@ do { \
#endif
-static INLINE uint32_t
+static inline uint32_t
util_unsigned_fixed(float value, unsigned frac_bits)
{
return value < 0 ? 0 : (uint32_t)(value * (1<<frac_bits));
}
-static INLINE int32_t
+static inline int32_t
util_signed_fixed(float value, unsigned frac_bits)
{
return (int32_t)(value * (1<<frac_bits));
diff --git a/src/gallium/auxiliary/util/u_memory.h b/src/gallium/auxiliary/util/u_memory.h
index 9ff6c7da919..7fe0fe6f053 100644
--- a/src/gallium/auxiliary/util/u_memory.h
+++ b/src/gallium/auxiliary/util/u_memory.h
@@ -67,7 +67,7 @@ extern "C" {
/**
* Duplicate a block of memory.
*/
-static INLINE void *
+static inline void *
mem_dup(const void *src, uint size)
{
void *dup = MALLOC(size);
diff --git a/src/gallium/auxiliary/util/u_mm.c b/src/gallium/auxiliary/util/u_mm.c
index 82f83702d1e..2069b56f464 100644
--- a/src/gallium/auxiliary/util/u_mm.c
+++ b/src/gallium/auxiliary/util/u_mm.c
@@ -224,7 +224,7 @@ u_mmFindBlock(struct mem_block *heap, int start)
}
-static INLINE int
+static inline int
Join2Blocks(struct mem_block *p)
{
/* XXX there should be some assertions here */
diff --git a/src/gallium/auxiliary/util/u_pack_color.h b/src/gallium/auxiliary/util/u_pack_color.h
index e0c9018f8ef..b882502b7ba 100644
--- a/src/gallium/auxiliary/util/u_pack_color.h
+++ b/src/gallium/auxiliary/util/u_pack_color.h
@@ -60,7 +60,7 @@ union util_color {
/**
* Pack ubyte R,G,B,A into dest pixel.
*/
-static INLINE void
+static inline void
util_pack_color_ub(ubyte r, ubyte g, ubyte b, ubyte a,
enum pipe_format format, union util_color *uc)
{
@@ -161,7 +161,7 @@ util_pack_color_ub(ubyte r, ubyte g, ubyte b, ubyte a,
/**
* Unpack RGBA from a packed pixel, returning values as ubytes in [0,255].
*/
-static INLINE void
+static inline void
util_unpack_color_ub(enum pipe_format format, union util_color *uc,
ubyte *r, ubyte *g, ubyte *b, ubyte *a)
{
@@ -333,7 +333,7 @@ util_unpack_color_ub(enum pipe_format format, union util_color *uc,
* This will not work (and might not really be useful with float input)
* for pure integer formats (which lack the pack_rgba_float function).
*/
-static INLINE void
+static inline void
util_pack_color(const float rgba[4], enum pipe_format format, union util_color *uc)
{
ubyte r = 0;
@@ -437,7 +437,7 @@ util_pack_color(const float rgba[4], enum pipe_format format, union util_color *
/* Integer versions of util_pack_z and util_pack_z_stencil - useful for
* constructing clear masks.
*/
-static INLINE uint32_t
+static inline uint32_t
util_pack_mask_z(enum pipe_format format, uint32_t z)
{
switch (format) {
@@ -462,7 +462,7 @@ util_pack_mask_z(enum pipe_format format, uint32_t z)
}
-static INLINE uint64_t
+static inline uint64_t
util_pack64_mask_z(enum pipe_format format, uint32_t z)
{
switch (format) {
@@ -474,7 +474,7 @@ util_pack64_mask_z(enum pipe_format format, uint32_t z)
}
-static INLINE uint32_t
+static inline uint32_t
util_pack_mask_z_stencil(enum pipe_format format, uint32_t z, uint8_t s)
{
uint32_t packed = util_pack_mask_z(format, z);
@@ -497,7 +497,7 @@ util_pack_mask_z_stencil(enum pipe_format format, uint32_t z, uint8_t s)
}
-static INLINE uint64_t
+static inline uint64_t
util_pack64_mask_z_stencil(enum pipe_format format, uint32_t z, uint8_t s)
{
uint64_t packed;
@@ -516,7 +516,7 @@ util_pack64_mask_z_stencil(enum pipe_format format, uint32_t z, uint8_t s)
/**
* Note: it's assumed that z is in [0,1]
*/
-static INLINE uint32_t
+static inline uint32_t
util_pack_z(enum pipe_format format, double z)
{
union fi fui;
@@ -558,7 +558,7 @@ util_pack_z(enum pipe_format format, double z)
}
-static INLINE uint64_t
+static inline uint64_t
util_pack64_z(enum pipe_format format, double z)
{
union fi fui;
@@ -580,7 +580,7 @@ util_pack64_z(enum pipe_format format, double z)
* Pack Z and/or stencil values into a 32-bit value described by format.
* Note: it's assumed that z is in [0,1] and s in [0,255]
*/
-static INLINE uint32_t
+static inline uint32_t
util_pack_z_stencil(enum pipe_format format, double z, uint8_t s)
{
uint32_t packed = util_pack_z(format, z);
@@ -603,7 +603,7 @@ util_pack_z_stencil(enum pipe_format format, double z, uint8_t s)
}
-static INLINE uint64_t
+static inline uint64_t
util_pack64_z_stencil(enum pipe_format format, double z, uint8_t s)
{
uint64_t packed;
@@ -624,7 +624,7 @@ util_pack64_z_stencil(enum pipe_format format, double z, uint8_t s)
/**
* Pack 4 ubytes into a 4-byte word
*/
-static INLINE unsigned
+static inline unsigned
pack_ub4(ubyte b0, ubyte b1, ubyte b2, ubyte b3)
{
return ((((unsigned int)b0) << 0) |
@@ -637,7 +637,7 @@ pack_ub4(ubyte b0, ubyte b1, ubyte b2, ubyte b3)
/**
* Pack/convert 4 floats into one 4-byte word.
*/
-static INLINE unsigned
+static inline unsigned
pack_ui32_float4(float a, float b, float c, float d)
{
return pack_ub4( float_to_ubyte(a),
diff --git a/src/gallium/auxiliary/util/u_pointer.h b/src/gallium/auxiliary/util/u_pointer.h
index 30c23b79831..4f7a27ca61d 100644
--- a/src/gallium/auxiliary/util/u_pointer.h
+++ b/src/gallium/auxiliary/util/u_pointer.h
@@ -34,7 +34,7 @@
extern "C" {
#endif
-static INLINE intptr_t
+static inline intptr_t
pointer_to_intptr( const void *p )
{
union {
@@ -45,7 +45,7 @@ pointer_to_intptr( const void *p )
return pi.i;
}
-static INLINE void *
+static inline void *
intptr_to_pointer( intptr_t i )
{
union {
@@ -56,7 +56,7 @@ intptr_to_pointer( intptr_t i )
return pi.p;
}
-static INLINE uintptr_t
+static inline uintptr_t
pointer_to_uintptr( const void *ptr )
{
union {
@@ -67,7 +67,7 @@ pointer_to_uintptr( const void *ptr )
return pu.u;
}
-static INLINE void *
+static inline void *
uintptr_to_pointer( uintptr_t u )
{
union {
@@ -81,7 +81,7 @@ uintptr_to_pointer( uintptr_t u )
/**
* Return a pointer aligned to next multiple of N bytes.
*/
-static INLINE void *
+static inline void *
align_pointer( const void *unaligned, uintptr_t alignment )
{
uintptr_t aligned = (pointer_to_uintptr( unaligned ) + alignment - 1) & ~(alignment - 1);
@@ -92,7 +92,7 @@ align_pointer( const void *unaligned, uintptr_t alignment )
/**
* Return a pointer aligned to next multiple of 16 bytes.
*/
-static INLINE void *
+static inline void *
align16( void *unaligned )
{
return align_pointer( unaligned, 16 );
@@ -100,7 +100,7 @@ align16( void *unaligned )
typedef void (*func_pointer)(void);
-static INLINE func_pointer
+static inline func_pointer
pointer_to_func( void *p )
{
union {
@@ -111,7 +111,7 @@ pointer_to_func( void *p )
return pf.f;
}
-static INLINE void *
+static inline void *
func_to_pointer( func_pointer f )
{
union {
diff --git a/src/gallium/auxiliary/util/u_prim.h b/src/gallium/auxiliary/util/u_prim.h
index b2dd44df230..366801545ed 100644
--- a/src/gallium/auxiliary/util/u_prim.h
+++ b/src/gallium/auxiliary/util/u_prim.h
@@ -46,7 +46,7 @@ struct u_prim_vertex_count {
* Decompose a primitive that is a loop, a strip, or a fan. Return the
* original primitive if it is already decomposed.
*/
-static INLINE unsigned
+static inline unsigned
u_decomposed_prim(unsigned prim)
{
switch (prim) {
@@ -71,7 +71,7 @@ u_decomposed_prim(unsigned prim)
* Reduce a primitive to one of PIPE_PRIM_POINTS, PIPE_PRIM_LINES, and
* PIPE_PRIM_TRIANGLES.
*/
-static INLINE unsigned
+static inline unsigned
u_reduced_prim(unsigned prim)
{
switch (prim) {
@@ -91,7 +91,7 @@ u_reduced_prim(unsigned prim)
/**
* Re-assemble a primitive to remove its adjacency.
*/
-static INLINE unsigned
+static inline unsigned
u_assembled_prim(unsigned prim)
{
switch (prim) {
@@ -113,7 +113,7 @@ u_assembled_prim(unsigned prim)
* source file, it will increase the size of the binary slightly more than
* expected because of the use of a table.
*/
-static INLINE const struct u_prim_vertex_count *
+static inline const struct u_prim_vertex_count *
u_prim_vertex_count(unsigned prim)
{
static const struct u_prim_vertex_count prim_table[PIPE_PRIM_MAX] = {
@@ -140,7 +140,7 @@ u_prim_vertex_count(unsigned prim)
* Given a vertex count, return the number of primitives.
* For polygons, return the number of triangles.
*/
-static INLINE unsigned
+static inline unsigned
u_prims_for_vertices(unsigned prim, unsigned num)
{
const struct u_prim_vertex_count *info = u_prim_vertex_count(prim);
@@ -151,7 +151,7 @@ u_prims_for_vertices(unsigned prim, unsigned num)
return 1 + ((num - info->min) / info->incr);
}
-static INLINE boolean u_validate_pipe_prim( unsigned pipe_prim, unsigned nr )
+static inline boolean u_validate_pipe_prim( unsigned pipe_prim, unsigned nr )
{
const struct u_prim_vertex_count *count = u_prim_vertex_count(pipe_prim);
@@ -159,7 +159,7 @@ static INLINE boolean u_validate_pipe_prim( unsigned pipe_prim, unsigned nr )
}
-static INLINE boolean u_trim_pipe_prim( unsigned pipe_prim, unsigned *nr )
+static inline boolean u_trim_pipe_prim( unsigned pipe_prim, unsigned *nr )
{
const struct u_prim_vertex_count *count = u_prim_vertex_count(pipe_prim);
@@ -174,7 +174,7 @@ static INLINE boolean u_trim_pipe_prim( unsigned pipe_prim, unsigned *nr )
}
}
-static INLINE unsigned
+static inline unsigned
u_vertices_per_prim(int primitive)
{
switch(primitive) {
@@ -216,7 +216,7 @@ u_vertices_per_prim(int primitive)
* statistics depend on knowing the exact number of decomposed
* primitives for a set of vertices.
*/
-static INLINE unsigned
+static inline unsigned
u_decomposed_prims_for_vertices(int primitive, int vertices)
{
switch (primitive) {
@@ -263,7 +263,7 @@ u_decomposed_prims_for_vertices(int primitive, int vertices)
* count. Each quad is treated as two triangles. Polygons are treated as
* triangle fans.
*/
-static INLINE unsigned
+static inline unsigned
u_reduced_prims_for_vertices(int primitive, int vertices)
{
switch (primitive) {
diff --git a/src/gallium/auxiliary/util/u_range.h b/src/gallium/auxiliary/util/u_range.h
index efe25ef5e42..a1da5e5a6f0 100644
--- a/src/gallium/auxiliary/util/u_range.h
+++ b/src/gallium/auxiliary/util/u_range.h
@@ -47,7 +47,7 @@ struct util_range {
};
-static INLINE void
+static inline void
util_range_set_empty(struct util_range *range)
{
range->start = ~0;
@@ -55,7 +55,7 @@ util_range_set_empty(struct util_range *range)
}
/* This is like a union of two sets. */
-static INLINE void
+static inline void
util_range_add(struct util_range *range, unsigned start, unsigned end)
{
if (start < range->start || end > range->end) {
@@ -66,7 +66,7 @@ util_range_add(struct util_range *range, unsigned start, unsigned end)
}
}
-static INLINE boolean
+static inline boolean
util_ranges_intersect(struct util_range *range, unsigned start, unsigned end)
{
return MAX2(start, range->start) < MIN2(end, range->end);
@@ -75,14 +75,14 @@ util_ranges_intersect(struct util_range *range, unsigned start, unsigned end)
/* Init/deinit */
-static INLINE void
+static inline void
util_range_init(struct util_range *range)
{
pipe_mutex_init(range->write_mutex);
util_range_set_empty(range);
}
-static INLINE void
+static inline void
util_range_destroy(struct util_range *range)
{
pipe_mutex_destroy(range->write_mutex);
diff --git a/src/gallium/auxiliary/util/u_rect.h b/src/gallium/auxiliary/util/u_rect.h
index cf29dff0d02..b26f671f313 100644
--- a/src/gallium/auxiliary/util/u_rect.h
+++ b/src/gallium/auxiliary/util/u_rect.h
@@ -43,7 +43,7 @@ struct u_rect {
/* Do two rectangles intersect?
*/
-static INLINE boolean
+static inline boolean
u_rect_test_intersection(const struct u_rect *a,
const struct u_rect *b)
{
@@ -55,7 +55,7 @@ u_rect_test_intersection(const struct u_rect *a,
/* Find the intersection of two rectangles known to intersect.
*/
-static INLINE void
+static inline void
u_rect_find_intersection(const struct u_rect *a,
struct u_rect *b)
{
@@ -68,13 +68,13 @@ u_rect_find_intersection(const struct u_rect *a,
}
-static INLINE int
+static inline int
u_rect_area(const struct u_rect *r)
{
return (r->x1 - r->x0) * (r->y1 - r->y0);
}
-static INLINE void
+static inline void
u_rect_possible_intersection(const struct u_rect *a,
struct u_rect *b)
{
@@ -88,7 +88,7 @@ u_rect_possible_intersection(const struct u_rect *a,
/* Set @d to a rectangle that covers both @a and @b.
*/
-static INLINE void
+static inline void
u_rect_union(struct u_rect *d, const struct u_rect *a, const struct u_rect *b)
{
d->x0 = MIN2(a->x0, b->x0);
diff --git a/src/gallium/auxiliary/util/u_resource.h b/src/gallium/auxiliary/util/u_resource.h
index a5e091fd66e..6736476f4da 100644
--- a/src/gallium/auxiliary/util/u_resource.h
+++ b/src/gallium/auxiliary/util/u_resource.h
@@ -36,7 +36,7 @@ util_resource_size(const struct pipe_resource *res);
*
* Note that this function returns true for single-layered array textures.
*/
-static INLINE boolean
+static inline boolean
util_resource_is_array_texture(const struct pipe_resource *res)
{
switch (res->target) {
diff --git a/src/gallium/auxiliary/util/u_ringbuffer.c b/src/gallium/auxiliary/util/u_ringbuffer.c
index 648b105b137..5816b781660 100644
--- a/src/gallium/auxiliary/util/u_ringbuffer.c
+++ b/src/gallium/auxiliary/util/u_ringbuffer.c
@@ -56,7 +56,7 @@ void util_ringbuffer_destroy( struct util_ringbuffer *ring )
/**
* Return number of free entries in the ring
*/
-static INLINE unsigned util_ringbuffer_space( const struct util_ringbuffer *ring )
+static inline unsigned util_ringbuffer_space( const struct util_ringbuffer *ring )
{
return (ring->tail - (ring->head + 1)) & ring->mask;
}
@@ -64,7 +64,7 @@ static INLINE unsigned util_ringbuffer_space( const struct util_ringbuffer *ring
/**
* Is the ring buffer empty?
*/
-static INLINE boolean util_ringbuffer_empty( const struct util_ringbuffer *ring )
+static inline boolean util_ringbuffer_empty( const struct util_ringbuffer *ring )
{
return util_ringbuffer_space(ring) == ring->mask;
}
diff --git a/src/gallium/auxiliary/util/u_split_prim.h b/src/gallium/auxiliary/util/u_split_prim.h
index 7f80fc12700..5afb7d9a920 100644
--- a/src/gallium/auxiliary/util/u_split_prim.h
+++ b/src/gallium/auxiliary/util/u_split_prim.h
@@ -23,7 +23,7 @@ struct util_split_prim {
uint edgeflag_off:1;
};
-static INLINE void
+static inline void
util_split_prim_init(struct util_split_prim *s,
unsigned mode, unsigned start, unsigned count)
{
@@ -41,7 +41,7 @@ util_split_prim_init(struct util_split_prim *s,
s->repeat_first = 0;
}
-static INLINE boolean
+static inline boolean
util_split_prim_next(struct util_split_prim *s, unsigned max_verts)
{
int repeat = 0;
diff --git a/src/gallium/auxiliary/util/u_sse.h b/src/gallium/auxiliary/util/u_sse.h
index d4f51912a2d..7f8e5a1a3cf 100644
--- a/src/gallium/auxiliary/util/u_sse.h
+++ b/src/gallium/auxiliary/util/u_sse.h
@@ -51,7 +51,7 @@ union m128i {
uint ui[4];
};
-static INLINE void u_print_epi8(const char *name, __m128i r)
+static inline void u_print_epi8(const char *name, __m128i r)
{
union { __m128i m; ubyte ub[16]; } u;
u.m = r;
@@ -80,7 +80,7 @@ static INLINE void u_print_epi8(const char *name, __m128i r)
u.ub[12], u.ub[13], u.ub[14], u.ub[15]);
}
-static INLINE void u_print_epi16(const char *name, __m128i r)
+static inline void u_print_epi16(const char *name, __m128i r)
{
union { __m128i m; ushort us[8]; } u;
u.m = r;
@@ -99,7 +99,7 @@ static INLINE void u_print_epi16(const char *name, __m128i r)
u.us[4], u.us[5], u.us[6], u.us[7]);
}
-static INLINE void u_print_epi32(const char *name, __m128i r)
+static inline void u_print_epi32(const char *name, __m128i r)
{
union { __m128i m; uint ui[4]; } u;
u.m = r;
@@ -113,7 +113,7 @@ static INLINE void u_print_epi32(const char *name, __m128i r)
u.ui[0], u.ui[1], u.ui[2], u.ui[3]);
}
-static INLINE void u_print_ps(const char *name, __m128 r)
+static inline void u_print_ps(const char *name, __m128 r)
{
union { __m128 m; float f[4]; } u;
u.m = r;
@@ -179,7 +179,7 @@ _mm_shuffle_epi8(__m128i a, __m128i mask)
* _mm_mullo_epi32() intrinsic as to not justify adding an sse4
* dependency at this point.
*/
-static INLINE __m128i mm_mullo_epi32(const __m128i a, const __m128i b)
+static inline __m128i mm_mullo_epi32(const __m128i a, const __m128i b)
{
__m128i a4 = _mm_srli_epi64(a, 32); /* shift by one dword */
__m128i b4 = _mm_srli_epi64(b, 32); /* shift by one dword */
@@ -204,7 +204,7 @@ static INLINE __m128i mm_mullo_epi32(const __m128i a, const __m128i b)
}
-static INLINE void
+static inline void
transpose4_epi32(const __m128i * restrict a,
const __m128i * restrict b,
const __m128i * restrict c,
diff --git a/src/gallium/auxiliary/util/u_string.h b/src/gallium/auxiliary/util/u_string.h
index dc89c4400bc..da3e2675d8e 100644
--- a/src/gallium/auxiliary/util/u_string.h
+++ b/src/gallium/auxiliary/util/u_string.h
@@ -54,7 +54,7 @@ extern "C" {
#else
-static INLINE char *
+static inline char *
util_strchrnul(const char *s, char c)
{
for (; *s && *s != c; ++s);
@@ -69,13 +69,13 @@ util_strchrnul(const char *s, char c)
int util_vsnprintf(char *, size_t, const char *, va_list);
int util_snprintf(char *str, size_t size, const char *format, ...);
-static INLINE void
+static inline void
util_vsprintf(char *str, const char *format, va_list ap)
{
util_vsnprintf(str, (size_t)-1, format, ap);
}
-static INLINE void
+static inline void
util_sprintf(char *str, const char *format, ...)
{
va_list ap;
@@ -84,7 +84,7 @@ util_sprintf(char *str, const char *format, ...)
va_end(ap);
}
-static INLINE char *
+static inline char *
util_strchr(const char *s, char c)
{
char *p = util_strchrnul(s, c);
@@ -92,7 +92,7 @@ util_strchr(const char *s, char c)
return *p ? p : NULL;
}
-static INLINE char*
+static inline char*
util_strncat(char *dst, const char *src, size_t n)
{
char *p = dst + strlen(dst);
@@ -106,7 +106,7 @@ util_strncat(char *dst, const char *src, size_t n)
return dst;
}
-static INLINE int
+static inline int
util_strcmp(const char *s1, const char *s2)
{
unsigned char u1, u2;
@@ -122,7 +122,7 @@ util_strcmp(const char *s1, const char *s2)
return 0;
}
-static INLINE int
+static inline int
util_strncmp(const char *s1, const char *s2, size_t n)
{
unsigned char u1, u2;
@@ -138,7 +138,7 @@ util_strncmp(const char *s1, const char *s2, size_t n)
return 0;
}
-static INLINE char *
+static inline char *
util_strstr(const char *haystack, const char *needle)
{
const char *p = haystack;
@@ -152,7 +152,7 @@ util_strstr(const char *haystack, const char *needle)
return NULL;
}
-static INLINE void *
+static inline void *
util_memmove(void *dest, const void *src, size_t n)
{
char *p = (char *)dest;
@@ -199,7 +199,7 @@ struct util_strbuf
};
-static INLINE void
+static inline void
util_strbuf_init(struct util_strbuf *sbuf, char *str, size_t size)
{
sbuf->str = str;
@@ -209,7 +209,7 @@ util_strbuf_init(struct util_strbuf *sbuf, char *str, size_t size)
}
-static INLINE void
+static inline void
util_strbuf_printf(struct util_strbuf *sbuf, const char *format, ...)
{
if(sbuf->left > 1) {
diff --git a/src/gallium/auxiliary/util/u_surfaces.h b/src/gallium/auxiliary/util/u_surfaces.h
index 1605215cb88..b84694c540b 100644
--- a/src/gallium/auxiliary/util/u_surfaces.h
+++ b/src/gallium/auxiliary/util/u_surfaces.h
@@ -50,7 +50,7 @@ util_surfaces_do_get(struct util_surfaces *us, unsigned surface_struct_size,
struct pipe_surface **res);
/* fast inline path for the very common case */
-static INLINE boolean
+static inline boolean
util_surfaces_get(struct util_surfaces *us, unsigned surface_struct_size,
struct pipe_context *ctx, struct pipe_resource *pt,
unsigned level, unsigned layer,
@@ -70,7 +70,7 @@ util_surfaces_get(struct util_surfaces *us, unsigned surface_struct_size,
return util_surfaces_do_get(us, surface_struct_size, ctx, pt, level, layer, res);
}
-static INLINE struct pipe_surface *
+static inline struct pipe_surface *
util_surfaces_peek(struct util_surfaces *us, struct pipe_resource *pt, unsigned level, unsigned layer)
{
if(!us->u.pv)
@@ -84,7 +84,7 @@ util_surfaces_peek(struct util_surfaces *us, struct pipe_resource *pt, unsigned
void util_surfaces_do_detach(struct util_surfaces *us, struct pipe_surface *ps);
-static INLINE void
+static inline void
util_surfaces_detach(struct util_surfaces *us, struct pipe_surface *ps)
{
if(likely(ps->texture->target == PIPE_TEXTURE_2D || ps->texture->target == PIPE_TEXTURE_RECT))
diff --git a/src/gallium/auxiliary/util/u_tile.h b/src/gallium/auxiliary/util/u_tile.h
index a33d7f7722b..dc1f568a8e5 100644
--- a/src/gallium/auxiliary/util/u_tile.h
+++ b/src/gallium/auxiliary/util/u_tile.h
@@ -42,7 +42,7 @@ struct pipe_transfer;
*
* \return TRUE if tile is totally clipped, FALSE otherwise
*/
-static INLINE boolean
+static inline boolean
u_clip_tile(uint x, uint y, uint *w, uint *h, const struct pipe_box *box)
{
if ((int) x >= box->width)
diff --git a/src/gallium/auxiliary/util/u_time.h b/src/gallium/auxiliary/util/u_time.h
index 2bee1e00014..a5017d6bce2 100644
--- a/src/gallium/auxiliary/util/u_time.h
+++ b/src/gallium/auxiliary/util/u_time.h
@@ -60,7 +60,7 @@ struct util_time
PIPE_DEPRECATED
-static INLINE void
+static inline void
util_time_get(struct util_time *t)
{
t->counter = os_time_get();
@@ -71,7 +71,7 @@ util_time_get(struct util_time *t)
* Return t2 = t1 + usecs
*/
PIPE_DEPRECATED
-static INLINE void
+static inline void
util_time_add(const struct util_time *t1,
int64_t usecs,
struct util_time *t2)
@@ -84,7 +84,7 @@ util_time_add(const struct util_time *t1,
* Return difference between times, in microseconds
*/
PIPE_DEPRECATED
-static INLINE int64_t
+static inline int64_t
util_time_diff(const struct util_time *t1,
const struct util_time *t2)
{
@@ -98,7 +98,7 @@ util_time_diff(const struct util_time *t1,
* Not publicly available because it does not take in account wrap-arounds.
* Use util_time_timeout instead.
*/
-static INLINE int
+static inline int
_util_time_compare(const struct util_time *t1,
const struct util_time *t2)
{
@@ -115,7 +115,7 @@ _util_time_compare(const struct util_time *t1,
* Returns non-zero when the timeout expires.
*/
PIPE_DEPRECATED
-static INLINE boolean
+static inline boolean
util_time_timeout(const struct util_time *start,
const struct util_time *end,
const struct util_time *curr)
@@ -128,7 +128,7 @@ util_time_timeout(const struct util_time *start,
* Return current time in microseconds
*/
PIPE_DEPRECATED
-static INLINE int64_t
+static inline int64_t
util_time_micros(void)
{
return os_time_get();
@@ -136,7 +136,7 @@ util_time_micros(void)
PIPE_DEPRECATED
-static INLINE void
+static inline void
util_time_sleep(int64_t usecs)
{
os_time_sleep(usecs);
diff --git a/src/gallium/auxiliary/util/u_transfer.c b/src/gallium/auxiliary/util/u_transfer.c
index 71da35d6d39..4cb524d5cb1 100644
--- a/src/gallium/auxiliary/util/u_transfer.c
+++ b/src/gallium/auxiliary/util/u_transfer.c
@@ -90,7 +90,7 @@ void u_default_transfer_unmap( struct pipe_context *pipe,
}
-static INLINE struct u_resource *
+static inline struct u_resource *
u_resource( struct pipe_resource *res )
{
return (struct u_resource *)res;
diff --git a/src/gallium/auxiliary/util/u_video.h b/src/gallium/auxiliary/util/u_video.h
index b4743d13fbf..99d0f6e775a 100644
--- a/src/gallium/auxiliary/util/u_video.h
+++ b/src/gallium/auxiliary/util/u_video.h
@@ -40,7 +40,7 @@ extern "C" {
#include "util/u_debug.h"
#include "util/u_math.h"
-static INLINE enum pipe_video_format
+static inline enum pipe_video_format
u_reduce_video_profile(enum pipe_video_profile profile)
{
switch (profile)
@@ -73,7 +73,7 @@ u_reduce_video_profile(enum pipe_video_profile profile)
}
}
-static INLINE void
+static inline void
u_copy_nv12_to_yv12(void *const *destination_data,
uint32_t const *destination_pitches,
int src_plane, int src_field,
@@ -99,7 +99,7 @@ u_copy_nv12_to_yv12(void *const *destination_data,
}
}
-static INLINE void
+static inline void
u_copy_yv12_to_nv12(void *const *destination_data,
uint32_t const *destination_pitches,
int src_plane, int src_field,
@@ -122,7 +122,7 @@ u_copy_yv12_to_nv12(void *const *destination_data,
}
}
-static INLINE void
+static inline void
u_copy_swap422_packed(void *const *destination_data,
uint32_t const *destination_pitches,
int src_plane, int src_field,
@@ -147,7 +147,7 @@ u_copy_swap422_packed(void *const *destination_data,
}
}
-static INLINE uint32_t
+static inline uint32_t
u_get_h264_level(uint32_t width, uint32_t height, uint32_t *max_reference)
{
uint32_t max_dpb_mbs;