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 <imirkin@alum.mit.edu> Acked-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
958b5c3111
commit
a2a1a5805f
|
@ -13,8 +13,6 @@ headers in general, should strictly follow these guidelines to ensure
|
|||
|
||||
* Include the p_compiler.h.
|
||||
|
||||
* Don't use the 'inline' keyword, use the INLINE macro in p_compiler.h instead.
|
||||
|
||||
* Cast explicitly when converting to integer types of smaller sizes.
|
||||
|
||||
* Cast explicitly when converting between float, double and integral types.
|
||||
|
|
|
@ -80,7 +80,7 @@ unsigned cso_construct_key(void *item, int item_size)
|
|||
return hash_key((item), item_size);
|
||||
}
|
||||
|
||||
static INLINE struct cso_hash *_cso_hash_for_type(struct cso_cache *sc, enum cso_cache_type type)
|
||||
static inline struct cso_hash *_cso_hash_for_type(struct cso_cache *sc, enum cso_cache_type type)
|
||||
{
|
||||
struct cso_hash *hash;
|
||||
hash = sc->hashes[type];
|
||||
|
@ -127,7 +127,7 @@ static void delete_velements(void *state, void *data)
|
|||
FREE(state);
|
||||
}
|
||||
|
||||
static INLINE void delete_cso(void *state, enum cso_cache_type type)
|
||||
static inline void delete_cso(void *state, enum cso_cache_type type)
|
||||
{
|
||||
switch (type) {
|
||||
case CSO_BLEND:
|
||||
|
@ -152,7 +152,7 @@ static INLINE void delete_cso(void *state, enum cso_cache_type type)
|
|||
}
|
||||
|
||||
|
||||
static INLINE void sanitize_hash(struct cso_cache *sc,
|
||||
static inline void sanitize_hash(struct cso_cache *sc,
|
||||
struct cso_hash *hash,
|
||||
enum cso_cache_type type,
|
||||
int max_size)
|
||||
|
@ -162,7 +162,7 @@ static INLINE void sanitize_hash(struct cso_cache *sc,
|
|||
}
|
||||
|
||||
|
||||
static INLINE void sanitize_cb(struct cso_hash *hash, enum cso_cache_type type,
|
||||
static inline void sanitize_cb(struct cso_hash *hash, enum cso_cache_type type,
|
||||
int max_size, void *user_data)
|
||||
{
|
||||
/* if we're approach the maximum size, remove fourth of the entries
|
||||
|
|
|
@ -192,7 +192,7 @@ static boolean delete_vertex_elements(struct cso_context *ctx,
|
|||
}
|
||||
|
||||
|
||||
static INLINE boolean delete_cso(struct cso_context *ctx,
|
||||
static inline boolean delete_cso(struct cso_context *ctx,
|
||||
void *state, enum cso_cache_type type)
|
||||
{
|
||||
switch (type) {
|
||||
|
@ -213,7 +213,7 @@ static INLINE boolean delete_cso(struct cso_context *ctx,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
sanitize_hash(struct cso_hash *hash, enum cso_cache_type type,
|
||||
int max_size, void *user_data)
|
||||
{
|
||||
|
@ -921,14 +921,14 @@ void cso_restore_tesseval_shader(struct cso_context *ctx)
|
|||
|
||||
/* clip state */
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
clip_state_cpy(struct pipe_clip_state *dst,
|
||||
const struct pipe_clip_state *src)
|
||||
{
|
||||
memcpy(dst->ucp, src->ucp, sizeof(dst->ucp));
|
||||
}
|
||||
|
||||
static INLINE int
|
||||
static inline int
|
||||
clip_state_cmp(const struct pipe_clip_state *a,
|
||||
const struct pipe_clip_state *b)
|
||||
{
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
/* fixme: move it from here */
|
||||
#define MAX_PRIMITIVES 64
|
||||
|
||||
static INLINE int
|
||||
static inline int
|
||||
draw_gs_get_input_index(int semantic, int index,
|
||||
const struct tgsi_shader_info *input_info)
|
||||
{
|
||||
|
@ -66,7 +66,7 @@ draw_gs_get_input_index(int semantic, int index,
|
|||
* the number of elements in the SOA vector. This ensures that the
|
||||
* throughput is optimized for the given vector instruction set.
|
||||
*/
|
||||
static INLINE boolean
|
||||
static inline boolean
|
||||
draw_gs_should_flush(struct draw_geometry_shader *shader)
|
||||
{
|
||||
return (shader->fetched_prim_count == shader->vector_length);
|
||||
|
|
|
@ -72,7 +72,7 @@ struct draw_gs_llvm_iface {
|
|||
LLVMValueRef input;
|
||||
};
|
||||
|
||||
static INLINE const struct draw_gs_llvm_iface *
|
||||
static inline const struct draw_gs_llvm_iface *
|
||||
draw_gs_llvm_iface(const struct lp_build_tgsi_gs_iface *iface)
|
||||
{
|
||||
return (const struct draw_gs_llvm_iface *)iface;
|
||||
|
|
|
@ -350,7 +350,7 @@ struct draw_gs_llvm_variant_key
|
|||
PIPE_MAX_SHADER_SAMPLER_VIEWS * sizeof(struct draw_sampler_static_state))
|
||||
|
||||
|
||||
static INLINE size_t
|
||||
static inline size_t
|
||||
draw_llvm_variant_key_size(unsigned nr_vertex_elements,
|
||||
unsigned nr_samplers)
|
||||
{
|
||||
|
@ -360,7 +360,7 @@ draw_llvm_variant_key_size(unsigned nr_vertex_elements,
|
|||
}
|
||||
|
||||
|
||||
static INLINE size_t
|
||||
static inline size_t
|
||||
draw_gs_llvm_variant_key_size(unsigned nr_samplers)
|
||||
{
|
||||
return (sizeof(struct draw_gs_llvm_variant_key) +
|
||||
|
@ -368,7 +368,7 @@ draw_gs_llvm_variant_key_size(unsigned nr_samplers)
|
|||
}
|
||||
|
||||
|
||||
static INLINE struct draw_sampler_static_state *
|
||||
static inline struct draw_sampler_static_state *
|
||||
draw_llvm_variant_key_samplers(struct draw_llvm_variant_key *key)
|
||||
{
|
||||
return (struct draw_sampler_static_state *)
|
||||
|
@ -476,13 +476,13 @@ struct draw_llvm {
|
|||
};
|
||||
|
||||
|
||||
static INLINE struct llvm_vertex_shader *
|
||||
static inline struct llvm_vertex_shader *
|
||||
llvm_vertex_shader(struct draw_vertex_shader *vs)
|
||||
{
|
||||
return (struct llvm_vertex_shader *)vs;
|
||||
}
|
||||
|
||||
static INLINE struct llvm_geometry_shader *
|
||||
static inline struct llvm_geometry_shader *
|
||||
llvm_geometry_shader(struct draw_geometry_shader *gs)
|
||||
{
|
||||
return (struct llvm_geometry_shader *)gs;
|
||||
|
|
|
@ -115,7 +115,7 @@ void draw_unfilled_prepare_outputs(struct draw_context *context,
|
|||
* \param idx index into stage's tmp[] array to put the copy (dest)
|
||||
* \return pointer to the copied vertex
|
||||
*/
|
||||
static INLINE struct vertex_header *
|
||||
static inline struct vertex_header *
|
||||
dup_vert( struct draw_stage *stage,
|
||||
const struct vertex_header *vert,
|
||||
unsigned idx )
|
||||
|
|
|
@ -511,7 +511,7 @@ bind_aaline_fragment_shader(struct aaline_stage *aaline)
|
|||
|
||||
|
||||
|
||||
static INLINE struct aaline_stage *
|
||||
static inline struct aaline_stage *
|
||||
aaline_stage( struct draw_stage *stage )
|
||||
{
|
||||
return (struct aaline_stage *) stage;
|
||||
|
|
|
@ -427,7 +427,7 @@ bind_aapoint_fragment_shader(struct aapoint_stage *aapoint)
|
|||
|
||||
|
||||
|
||||
static INLINE struct aapoint_stage *
|
||||
static inline struct aapoint_stage *
|
||||
aapoint_stage( struct draw_stage *stage )
|
||||
{
|
||||
return (struct aapoint_stage *) stage;
|
||||
|
|
|
@ -70,12 +70,12 @@ struct clip_stage {
|
|||
|
||||
|
||||
/** Cast wrapper */
|
||||
static INLINE struct clip_stage *clip_stage( struct draw_stage *stage )
|
||||
static inline struct clip_stage *clip_stage( struct draw_stage *stage )
|
||||
{
|
||||
return (struct clip_stage *)stage;
|
||||
}
|
||||
|
||||
static INLINE unsigned
|
||||
static inline unsigned
|
||||
draw_viewport_index(struct draw_context *draw,
|
||||
const struct vertex_header *leading_vertex)
|
||||
{
|
||||
|
@ -210,7 +210,7 @@ static void interp( const struct clip_stage *clip,
|
|||
* true, otherwise returns false.
|
||||
* Triangle is considered null/empty if it's area is qual to zero.
|
||||
*/
|
||||
static INLINE boolean
|
||||
static inline boolean
|
||||
is_tri_null(struct draw_context *draw, const struct prim_header *header)
|
||||
{
|
||||
const unsigned pos_attr = draw_current_shader_position_output(draw);
|
||||
|
@ -322,7 +322,7 @@ static void emit_poly( struct draw_stage *stage,
|
|||
}
|
||||
|
||||
|
||||
static INLINE float
|
||||
static inline float
|
||||
dot4(const float *a, const float *b)
|
||||
{
|
||||
return (a[0] * b[0] +
|
||||
|
@ -336,7 +336,7 @@ dot4(const float *a, const float *b)
|
|||
* it first checks if the shader provided a clip distance, otherwise
|
||||
* it works out the value using the clipvertex
|
||||
*/
|
||||
static INLINE float getclipdist(const struct clip_stage *clipper,
|
||||
static inline float getclipdist(const struct clip_stage *clipper,
|
||||
struct vertex_header *vert,
|
||||
int plane_idx)
|
||||
{
|
||||
|
|
|
@ -46,12 +46,12 @@ struct cull_stage {
|
|||
};
|
||||
|
||||
|
||||
static INLINE struct cull_stage *cull_stage( struct draw_stage *stage )
|
||||
static inline struct cull_stage *cull_stage( struct draw_stage *stage )
|
||||
{
|
||||
return (struct cull_stage *)stage;
|
||||
}
|
||||
|
||||
static INLINE boolean
|
||||
static inline boolean
|
||||
cull_distance_is_out(float dist)
|
||||
{
|
||||
return (dist < 0.0f) || util_is_inf_or_nan(dist);
|
||||
|
|
|
@ -47,7 +47,7 @@ struct flat_stage
|
|||
};
|
||||
|
||||
|
||||
static INLINE struct flat_stage *
|
||||
static inline struct flat_stage *
|
||||
flat_stage(struct draw_stage *stage)
|
||||
{
|
||||
return (struct flat_stage *) stage;
|
||||
|
@ -55,7 +55,7 @@ flat_stage(struct draw_stage *stage)
|
|||
|
||||
|
||||
/** Copy all the constant attributes from 'src' vertex to 'dst' vertex */
|
||||
static INLINE void copy_flats( struct draw_stage *stage,
|
||||
static inline void copy_flats( struct draw_stage *stage,
|
||||
struct vertex_header *dst,
|
||||
const struct vertex_header *src )
|
||||
{
|
||||
|
@ -70,7 +70,7 @@ static INLINE void copy_flats( struct draw_stage *stage,
|
|||
|
||||
|
||||
/** Copy all the color attributes from src vertex to dst0 & dst1 vertices */
|
||||
static INLINE void copy_flats2( struct draw_stage *stage,
|
||||
static inline void copy_flats2( struct draw_stage *stage,
|
||||
struct vertex_header *dst0,
|
||||
struct vertex_header *dst1,
|
||||
const struct vertex_header *src )
|
||||
|
|
|
@ -49,7 +49,7 @@ struct offset_stage {
|
|||
|
||||
|
||||
|
||||
static INLINE struct offset_stage *offset_stage( struct draw_stage *stage )
|
||||
static inline struct offset_stage *offset_stage( struct draw_stage *stage )
|
||||
{
|
||||
return (struct offset_stage *) stage;
|
||||
}
|
||||
|
|
|
@ -462,7 +462,7 @@ bind_pstip_fragment_shader(struct pstip_stage *pstip)
|
|||
}
|
||||
|
||||
|
||||
static INLINE struct pstip_stage *
|
||||
static inline struct pstip_stage *
|
||||
pstip_stage( struct draw_stage *stage )
|
||||
{
|
||||
return (struct pstip_stage *) stage;
|
||||
|
|
|
@ -53,7 +53,7 @@ struct stipple_stage {
|
|||
};
|
||||
|
||||
|
||||
static INLINE struct stipple_stage *
|
||||
static inline struct stipple_stage *
|
||||
stipple_stage(struct draw_stage *stage)
|
||||
{
|
||||
return (struct stipple_stage *) stage;
|
||||
|
@ -108,7 +108,7 @@ emit_segment(struct draw_stage *stage, struct prim_header *header,
|
|||
}
|
||||
|
||||
|
||||
static INLINE unsigned
|
||||
static inline unsigned
|
||||
stipple_test(int counter, ushort pattern, int factor)
|
||||
{
|
||||
int b = (counter / factor) & 0xf;
|
||||
|
|
|
@ -43,7 +43,7 @@ struct twoside_stage {
|
|||
};
|
||||
|
||||
|
||||
static INLINE struct twoside_stage *twoside_stage( struct draw_stage *stage )
|
||||
static inline struct twoside_stage *twoside_stage( struct draw_stage *stage )
|
||||
{
|
||||
return (struct twoside_stage *)stage;
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ static INLINE struct twoside_stage *twoside_stage( struct draw_stage *stage )
|
|||
/**
|
||||
* Copy back color(s) to front color(s).
|
||||
*/
|
||||
static INLINE struct vertex_header *
|
||||
static inline struct vertex_header *
|
||||
copy_bfc( struct twoside_stage *twoside,
|
||||
const struct vertex_header *v,
|
||||
unsigned idx )
|
||||
|
|
|
@ -53,7 +53,7 @@ struct unfilled_stage {
|
|||
};
|
||||
|
||||
|
||||
static INLINE struct unfilled_stage *unfilled_stage( struct draw_stage *stage )
|
||||
static inline struct unfilled_stage *unfilled_stage( struct draw_stage *stage )
|
||||
{
|
||||
return (struct unfilled_stage *)stage;
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ struct vbuf_stage {
|
|||
/**
|
||||
* Basically a cast wrapper.
|
||||
*/
|
||||
static INLINE struct vbuf_stage *
|
||||
static inline struct vbuf_stage *
|
||||
vbuf_stage( struct draw_stage *stage )
|
||||
{
|
||||
assert(stage);
|
||||
|
@ -97,7 +97,7 @@ static void vbuf_flush_vertices( struct vbuf_stage *vbuf );
|
|||
static void vbuf_alloc_vertices( struct vbuf_stage *vbuf );
|
||||
|
||||
|
||||
static INLINE boolean
|
||||
static inline boolean
|
||||
overflow( void *map, void *ptr, unsigned bytes, unsigned bufsz )
|
||||
{
|
||||
unsigned long used = (unsigned long) ((char *)ptr - (char *)map);
|
||||
|
@ -105,7 +105,7 @@ overflow( void *map, void *ptr, unsigned bytes, unsigned bufsz )
|
|||
}
|
||||
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
check_space( struct vbuf_stage *vbuf, unsigned nr )
|
||||
{
|
||||
if (vbuf->nr_vertices + nr > vbuf->max_vertices ||
|
||||
|
@ -126,7 +126,7 @@ check_space( struct vbuf_stage *vbuf, unsigned nr )
|
|||
* have a couple of slots at the beginning (1-dword header, 4-dword
|
||||
* clip pos) that we ignore here. We only use the vertex->data[] fields.
|
||||
*/
|
||||
static INLINE ushort
|
||||
static inline ushort
|
||||
emit_vertex( struct vbuf_stage *vbuf,
|
||||
struct vertex_header *vertex )
|
||||
{
|
||||
|
|
|
@ -45,7 +45,7 @@ struct wideline_stage {
|
|||
|
||||
|
||||
|
||||
static INLINE struct wideline_stage *wideline_stage( struct draw_stage *stage )
|
||||
static inline struct wideline_stage *wideline_stage( struct draw_stage *stage )
|
||||
{
|
||||
return (struct wideline_stage *)stage;
|
||||
}
|
||||
|
|
|
@ -83,7 +83,7 @@ struct widepoint_stage {
|
|||
|
||||
|
||||
|
||||
static INLINE struct widepoint_stage *
|
||||
static inline struct widepoint_stage *
|
||||
widepoint_stage( struct draw_stage *stage )
|
||||
{
|
||||
return (struct widepoint_stage *)stage;
|
||||
|
|
|
@ -494,7 +494,7 @@ void draw_update_viewport_flags(struct draw_context *draw);
|
|||
* Return index of the given viewport clamping it
|
||||
* to be between 0 <= and < PIPE_MAX_VIEWPORTS
|
||||
*/
|
||||
static INLINE unsigned
|
||||
static inline unsigned
|
||||
draw_clamp_viewport_idx(int idx)
|
||||
{
|
||||
return ((PIPE_MAX_VIEWPORTS > idx && idx >= 0) ? idx : 0);
|
||||
|
@ -505,7 +505,7 @@ draw_clamp_viewport_idx(int idx)
|
|||
* overflows then it returns the value from
|
||||
* the overflow_value variable.
|
||||
*/
|
||||
static INLINE unsigned
|
||||
static inline unsigned
|
||||
draw_overflow_uadd(unsigned a, unsigned b,
|
||||
unsigned overflow_value)
|
||||
{
|
||||
|
|
|
@ -54,7 +54,7 @@ struct fetch_pipeline_middle_end {
|
|||
|
||||
|
||||
/** cast wrapper */
|
||||
static INLINE struct fetch_pipeline_middle_end *
|
||||
static inline struct fetch_pipeline_middle_end *
|
||||
fetch_pipeline_middle_end(struct draw_pt_middle_end *middle)
|
||||
{
|
||||
return (struct fetch_pipeline_middle_end *) middle;
|
||||
|
|
|
@ -60,7 +60,7 @@ struct llvm_middle_end {
|
|||
|
||||
|
||||
/** cast wrapper */
|
||||
static INLINE struct llvm_middle_end *
|
||||
static inline struct llvm_middle_end *
|
||||
llvm_middle_end(struct draw_pt_middle_end *middle)
|
||||
{
|
||||
return (struct llvm_middle_end *) middle;
|
||||
|
|
|
@ -53,7 +53,7 @@ struct pt_post_vs {
|
|||
const struct draw_prim_info *prim_info );
|
||||
};
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
initialize_vertex_header(struct vertex_header *header)
|
||||
{
|
||||
header->clipmask = 0;
|
||||
|
@ -62,7 +62,7 @@ initialize_vertex_header(struct vertex_header *header)
|
|||
header->vertex_id = UNDEFINED_VERTEX_ID;
|
||||
}
|
||||
|
||||
static INLINE float
|
||||
static inline float
|
||||
dot4(const float *a, const float *b)
|
||||
{
|
||||
return (a[0]*b[0] +
|
||||
|
|
|
@ -65,7 +65,7 @@ draw_so_info(const struct draw_context *draw)
|
|||
return state;
|
||||
}
|
||||
|
||||
static INLINE boolean
|
||||
static inline boolean
|
||||
draw_has_so(const struct draw_context *draw)
|
||||
{
|
||||
const struct pipe_stream_output_info *state = draw_so_info(draw);
|
||||
|
|
|
@ -84,7 +84,7 @@ vsplit_flush_cache(struct vsplit_frontend *vsplit, unsigned flags)
|
|||
/**
|
||||
* Add a fetch element and add it to the draw elements.
|
||||
*/
|
||||
static INLINE void
|
||||
static inline void
|
||||
vsplit_add_cache(struct vsplit_frontend *vsplit, unsigned fetch, unsigned ofbias)
|
||||
{
|
||||
unsigned hash;
|
||||
|
@ -111,7 +111,7 @@ vsplit_add_cache(struct vsplit_frontend *vsplit, unsigned fetch, unsigned ofbias
|
|||
* The value is checked for overflows (both integer overflows
|
||||
* and the elements array overflow).
|
||||
*/
|
||||
static INLINE unsigned
|
||||
static inline unsigned
|
||||
vsplit_get_base_idx(struct vsplit_frontend *vsplit,
|
||||
unsigned start, unsigned fetch, unsigned *ofbit)
|
||||
{
|
||||
|
@ -137,7 +137,7 @@ vsplit_get_base_idx(struct vsplit_frontend *vsplit,
|
|||
* index, plus the element bias, clamped to maximum elememt
|
||||
* index if that addition overflows.
|
||||
*/
|
||||
static INLINE unsigned
|
||||
static inline unsigned
|
||||
vsplit_get_bias_idx(struct vsplit_frontend *vsplit,
|
||||
int idx, int bias, unsigned *ofbias)
|
||||
{
|
||||
|
@ -170,7 +170,7 @@ vsplit_get_bias_idx(struct vsplit_frontend *vsplit,
|
|||
elt_idx = vsplit_get_base_idx(vsplit, start, fetch, &ofbit); \
|
||||
elt_idx = vsplit_get_bias_idx(vsplit, ofbit ? 0 : DRAW_GET_IDX(elts, elt_idx), elt_bias, &ofbias)
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
vsplit_add_cache_ubyte(struct vsplit_frontend *vsplit, const ubyte *elts,
|
||||
unsigned start, unsigned fetch, int elt_bias)
|
||||
{
|
||||
|
@ -179,7 +179,7 @@ vsplit_add_cache_ubyte(struct vsplit_frontend *vsplit, const ubyte *elts,
|
|||
vsplit_add_cache(vsplit, elt_idx, ofbias);
|
||||
}
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
vsplit_add_cache_ushort(struct vsplit_frontend *vsplit, const ushort *elts,
|
||||
unsigned start, unsigned fetch, int elt_bias)
|
||||
{
|
||||
|
@ -193,7 +193,7 @@ vsplit_add_cache_ushort(struct vsplit_frontend *vsplit, const ushort *elts,
|
|||
* Add a fetch element and add it to the draw elements. The fetch element is
|
||||
* in full range (uint).
|
||||
*/
|
||||
static INLINE void
|
||||
static inline void
|
||||
vsplit_add_cache_uint(struct vsplit_frontend *vsplit, const uint *elts,
|
||||
unsigned start, unsigned fetch, int elt_bias)
|
||||
{
|
||||
|
|
|
@ -129,7 +129,7 @@ CONCAT(vsplit_primitive_, ELT_TYPE)(struct vsplit_frontend *vsplit,
|
|||
* When spoken is TRUE, ispoken replaces istart; When close is TRUE, iclose is
|
||||
* appended.
|
||||
*/
|
||||
static INLINE void
|
||||
static inline void
|
||||
CONCAT(vsplit_segment_cache_, ELT_TYPE)(struct vsplit_frontend *vsplit,
|
||||
unsigned flags,
|
||||
unsigned istart, unsigned icount,
|
||||
|
|
|
@ -91,13 +91,13 @@ struct vertex_info
|
|||
} attrib[PIPE_MAX_SHADER_OUTPUTS];
|
||||
};
|
||||
|
||||
static INLINE size_t
|
||||
static inline size_t
|
||||
draw_vinfo_size( const struct vertex_info *a )
|
||||
{
|
||||
return offsetof(const struct vertex_info, attrib[a->num_attribs]);
|
||||
}
|
||||
|
||||
static INLINE int
|
||||
static inline int
|
||||
draw_vinfo_compare( const struct vertex_info *a,
|
||||
const struct vertex_info *b )
|
||||
{
|
||||
|
@ -105,7 +105,7 @@ draw_vinfo_compare( const struct vertex_info *a,
|
|||
return memcmp( a, b, sizea );
|
||||
}
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
draw_vinfo_copy( struct vertex_info *dst,
|
||||
const struct vertex_info *src )
|
||||
{
|
||||
|
@ -121,7 +121,7 @@ draw_vinfo_copy( struct vertex_info *dst,
|
|||
* corresponds to this attribute.
|
||||
* \return slot in which the attribute was added
|
||||
*/
|
||||
static INLINE uint
|
||||
static inline uint
|
||||
draw_emit_vertex_attr(struct vertex_info *vinfo,
|
||||
enum attrib_emit emit,
|
||||
enum interp_mode interp, /* only used by softpipe??? */
|
||||
|
@ -150,7 +150,7 @@ void draw_dump_emitted_vertex(const struct vertex_info *vinfo,
|
|||
const uint8_t *data);
|
||||
|
||||
|
||||
static INLINE enum pipe_format draw_translate_vinfo_format(enum attrib_emit emit)
|
||||
static inline enum pipe_format draw_translate_vinfo_format(enum attrib_emit emit)
|
||||
{
|
||||
switch (emit) {
|
||||
case EMIT_OMIT:
|
||||
|
@ -174,7 +174,7 @@ static INLINE enum pipe_format draw_translate_vinfo_format(enum attrib_emit emit
|
|||
}
|
||||
}
|
||||
|
||||
static INLINE unsigned draw_translate_vinfo_size(enum attrib_emit emit)
|
||||
static inline unsigned draw_translate_vinfo_size(enum attrib_emit emit)
|
||||
{
|
||||
switch (emit) {
|
||||
case EMIT_OMIT:
|
||||
|
|
|
@ -191,12 +191,12 @@ draw_vs_create_variant_generic( struct draw_vertex_shader *vs,
|
|||
|
||||
|
||||
|
||||
static INLINE int draw_vs_variant_keysize( const struct draw_vs_variant_key *key )
|
||||
static inline int draw_vs_variant_keysize( const struct draw_vs_variant_key *key )
|
||||
{
|
||||
return 2 * sizeof(int) + key->nr_elements * sizeof(struct draw_variant_element);
|
||||
}
|
||||
|
||||
static INLINE int draw_vs_variant_key_compare( const struct draw_vs_variant_key *a,
|
||||
static inline int draw_vs_variant_key_compare( const struct draw_vs_variant_key *a,
|
||||
const struct draw_vs_variant_key *b )
|
||||
{
|
||||
int keysize = draw_vs_variant_keysize(a);
|
||||
|
|
|
@ -1135,7 +1135,7 @@ lp_build_div(struct lp_build_context *bld,
|
|||
*
|
||||
* @sa http://www.stereopsis.com/doubleblend.html
|
||||
*/
|
||||
static INLINE LLVMValueRef
|
||||
static inline LLVMValueRef
|
||||
lp_build_lerp_simple(struct lp_build_context *bld,
|
||||
LLVMValueRef x,
|
||||
LLVMValueRef v0,
|
||||
|
@ -1674,7 +1674,7 @@ enum lp_build_round_mode
|
|||
* NOTE: In the SSE4.1's nearest mode, if two values are equally close, the
|
||||
* result is the even value. That is, rounding 2.5 will be 2.0, and not 3.0.
|
||||
*/
|
||||
static INLINE LLVMValueRef
|
||||
static inline LLVMValueRef
|
||||
lp_build_round_sse41(struct lp_build_context *bld,
|
||||
LLVMValueRef a,
|
||||
enum lp_build_round_mode mode)
|
||||
|
@ -1761,7 +1761,7 @@ lp_build_round_sse41(struct lp_build_context *bld,
|
|||
}
|
||||
|
||||
|
||||
static INLINE LLVMValueRef
|
||||
static inline LLVMValueRef
|
||||
lp_build_iround_nearest_sse2(struct lp_build_context *bld,
|
||||
LLVMValueRef a)
|
||||
{
|
||||
|
@ -1817,7 +1817,7 @@ lp_build_iround_nearest_sse2(struct lp_build_context *bld,
|
|||
|
||||
/*
|
||||
*/
|
||||
static INLINE LLVMValueRef
|
||||
static inline LLVMValueRef
|
||||
lp_build_round_altivec(struct lp_build_context *bld,
|
||||
LLVMValueRef a,
|
||||
enum lp_build_round_mode mode)
|
||||
|
@ -1851,7 +1851,7 @@ lp_build_round_altivec(struct lp_build_context *bld,
|
|||
return lp_build_intrinsic_unary(builder, intrinsic, bld->vec_type, a);
|
||||
}
|
||||
|
||||
static INLINE LLVMValueRef
|
||||
static inline LLVMValueRef
|
||||
lp_build_round_arch(struct lp_build_context *bld,
|
||||
LLVMValueRef a,
|
||||
enum lp_build_round_mode mode)
|
||||
|
@ -2439,7 +2439,7 @@ lp_build_sqrt(struct lp_build_context *bld,
|
|||
* - http://en.wikipedia.org/wiki/Division_(digital)#Newton.E2.80.93Raphson_division
|
||||
* - http://softwarecommunity.intel.com/articles/eng/1818.htm
|
||||
*/
|
||||
static INLINE LLVMValueRef
|
||||
static inline LLVMValueRef
|
||||
lp_build_rcp_refine(struct lp_build_context *bld,
|
||||
LLVMValueRef a,
|
||||
LLVMValueRef rcp_a)
|
||||
|
@ -2524,7 +2524,7 @@ lp_build_rcp(struct lp_build_context *bld,
|
|||
*
|
||||
* See also Intel 64 and IA-32 Architectures Optimization Manual.
|
||||
*/
|
||||
static INLINE LLVMValueRef
|
||||
static inline LLVMValueRef
|
||||
lp_build_rsqrt_refine(struct lp_build_context *bld,
|
||||
LLVMValueRef a,
|
||||
LLVMValueRef rsqrt_a)
|
||||
|
|
|
@ -120,14 +120,14 @@ lp_build_const_mask_aos_swizzled(struct gallivm_state *gallivm,
|
|||
const unsigned char *swizzle);
|
||||
|
||||
|
||||
static INLINE LLVMValueRef
|
||||
static inline LLVMValueRef
|
||||
lp_build_const_int32(struct gallivm_state *gallivm, int i)
|
||||
{
|
||||
return LLVMConstInt(LLVMInt32TypeInContext(gallivm->context), i, 0);
|
||||
}
|
||||
|
||||
|
||||
static INLINE LLVMValueRef
|
||||
static inline LLVMValueRef
|
||||
lp_build_const_float(struct gallivm_state *gallivm, float x)
|
||||
{
|
||||
return LLVMConstReal(LLVMFloatTypeInContext(gallivm->context), x);
|
||||
|
@ -135,7 +135,7 @@ lp_build_const_float(struct gallivm_state *gallivm, float x)
|
|||
|
||||
|
||||
/** Return constant-valued pointer to int */
|
||||
static INLINE LLVMValueRef
|
||||
static inline LLVMValueRef
|
||||
lp_build_const_int_pointer(struct gallivm_state *gallivm, const void *ptr)
|
||||
{
|
||||
LLVMTypeRef int_type;
|
||||
|
|
|
@ -59,7 +59,7 @@ extern unsigned gallivm_debug;
|
|||
#endif
|
||||
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
lp_build_name(LLVMValueRef val, const char *format, ...)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
|
|
|
@ -95,7 +95,7 @@ lp_build_format_swizzle_aos(const struct util_format_description *desc,
|
|||
/**
|
||||
* Whether the format matches the vector type, apart of swizzles.
|
||||
*/
|
||||
static INLINE boolean
|
||||
static inline boolean
|
||||
format_matches_type(const struct util_format_description *desc,
|
||||
struct lp_type type)
|
||||
{
|
||||
|
@ -146,7 +146,7 @@ format_matches_type(const struct util_format_description *desc,
|
|||
*
|
||||
* @return XYZW in a float[4] or ubyte[4] or ushort[4] vector.
|
||||
*/
|
||||
static INLINE LLVMValueRef
|
||||
static inline LLVMValueRef
|
||||
lp_build_unpack_arith_rgba_aos(struct gallivm_state *gallivm,
|
||||
const struct util_format_description *desc,
|
||||
LLVMValueRef packed)
|
||||
|
|
|
@ -212,7 +212,7 @@ yuyv_to_yuv_soa(struct gallivm_state *gallivm,
|
|||
}
|
||||
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
yuv_to_rgb_soa(struct gallivm_state *gallivm,
|
||||
unsigned n,
|
||||
LLVMValueRef y, LLVMValueRef u, LLVMValueRef v,
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
* actually try to allocate the maximum and run out of memory and crash. So
|
||||
* stick with something reasonable here.
|
||||
*/
|
||||
static INLINE int
|
||||
static inline int
|
||||
gallivm_get_shader_param(enum pipe_shader_cap param)
|
||||
{
|
||||
switch(param) {
|
||||
|
|
|
@ -371,7 +371,7 @@ struct lp_build_sample_context
|
|||
* We only support a few wrap modes in lp_build_sample_wrap_linear_int() at
|
||||
* this time. Return whether the given mode is supported by that function.
|
||||
*/
|
||||
static INLINE boolean
|
||||
static inline boolean
|
||||
lp_is_simple_wrap_mode(unsigned mode)
|
||||
{
|
||||
switch (mode) {
|
||||
|
@ -384,7 +384,7 @@ lp_is_simple_wrap_mode(unsigned mode)
|
|||
}
|
||||
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
apply_sampler_swizzle(struct lp_build_sample_context *bld,
|
||||
LLVMValueRef *texel)
|
||||
{
|
||||
|
@ -402,7 +402,7 @@ apply_sampler_swizzle(struct lp_build_sample_context *bld,
|
|||
* not really dimension as such, this indicates the amount of
|
||||
* "normal" texture coords subject to minification, wrapping etc.
|
||||
*/
|
||||
static INLINE unsigned
|
||||
static inline unsigned
|
||||
texture_dims(enum pipe_texture_target tex)
|
||||
{
|
||||
switch (tex) {
|
||||
|
@ -424,7 +424,7 @@ texture_dims(enum pipe_texture_target tex)
|
|||
}
|
||||
}
|
||||
|
||||
static INLINE boolean
|
||||
static inline boolean
|
||||
has_layer_coord(enum pipe_texture_target tex)
|
||||
{
|
||||
switch (tex) {
|
||||
|
|
|
@ -562,13 +562,13 @@ struct lp_build_tgsi_aos_context
|
|||
|
||||
};
|
||||
|
||||
static INLINE struct lp_build_tgsi_soa_context *
|
||||
static inline struct lp_build_tgsi_soa_context *
|
||||
lp_soa_context(struct lp_build_tgsi_context *bld_base)
|
||||
{
|
||||
return (struct lp_build_tgsi_soa_context *)bld_base;
|
||||
}
|
||||
|
||||
static INLINE struct lp_build_tgsi_aos_context *
|
||||
static inline struct lp_build_tgsi_aos_context *
|
||||
lp_aos_context(struct lp_build_tgsi_context *bld_base)
|
||||
{
|
||||
return (struct lp_build_tgsi_aos_context *)bld_base;
|
||||
|
|
|
@ -462,7 +462,7 @@ analyse_instruction(struct analysis_context *ctx,
|
|||
}
|
||||
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
dump_info(const struct tgsi_token *tokens,
|
||||
struct lp_tgsi_info *info)
|
||||
{
|
||||
|
|
|
@ -106,7 +106,7 @@ emit_dump_reg(struct gallivm_state *gallivm,
|
|||
* Return the context for the current function.
|
||||
* (always 'main', if shader doesn't do any function calls)
|
||||
*/
|
||||
static INLINE struct function_ctx *
|
||||
static inline struct function_ctx *
|
||||
func_ctx(struct lp_exec_mask *mask)
|
||||
{
|
||||
assert(mask->function_stack_size > 0);
|
||||
|
@ -120,7 +120,7 @@ func_ctx(struct lp_exec_mask *mask)
|
|||
* no loop inside the current function, but we were inside
|
||||
* a loop inside another function, from which this one was called.
|
||||
*/
|
||||
static INLINE boolean
|
||||
static inline boolean
|
||||
mask_has_loop(struct lp_exec_mask *mask)
|
||||
{
|
||||
int i;
|
||||
|
@ -138,7 +138,7 @@ mask_has_loop(struct lp_exec_mask *mask)
|
|||
* no switch in the current function, but we were inside
|
||||
* a switch inside another function, from which this one was called.
|
||||
*/
|
||||
static INLINE boolean
|
||||
static inline boolean
|
||||
mask_has_switch(struct lp_exec_mask *mask)
|
||||
{
|
||||
int i;
|
||||
|
@ -156,7 +156,7 @@ mask_has_switch(struct lp_exec_mask *mask)
|
|||
* no conditional in the current function, but we were inside
|
||||
* a conditional inside another function, from which this one was called.
|
||||
*/
|
||||
static INLINE boolean
|
||||
static inline boolean
|
||||
mask_has_cond(struct lp_exec_mask *mask)
|
||||
{
|
||||
int i;
|
||||
|
|
|
@ -173,7 +173,7 @@ struct lp_build_context
|
|||
*
|
||||
* e.g. With PIPE_FORMAT_R32G32B32A32_FLOAT returns an lp_type with float[4]
|
||||
*/
|
||||
static INLINE void
|
||||
static inline void
|
||||
lp_type_from_format_desc(struct lp_type* type, const struct util_format_description *format_desc)
|
||||
{
|
||||
assert(format_desc->is_array);
|
||||
|
@ -189,14 +189,14 @@ lp_type_from_format_desc(struct lp_type* type, const struct util_format_descript
|
|||
}
|
||||
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
lp_type_from_format(struct lp_type* type, enum pipe_format format)
|
||||
{
|
||||
lp_type_from_format_desc(type, util_format_description(format));
|
||||
}
|
||||
|
||||
|
||||
static INLINE unsigned
|
||||
static inline unsigned
|
||||
lp_type_width(struct lp_type type)
|
||||
{
|
||||
return type.width * type.length;
|
||||
|
@ -204,7 +204,7 @@ lp_type_width(struct lp_type type)
|
|||
|
||||
|
||||
/** Create scalar float type */
|
||||
static INLINE struct lp_type
|
||||
static inline struct lp_type
|
||||
lp_type_float(unsigned width)
|
||||
{
|
||||
struct lp_type res_type;
|
||||
|
@ -220,7 +220,7 @@ lp_type_float(unsigned width)
|
|||
|
||||
|
||||
/** Create vector of float type */
|
||||
static INLINE struct lp_type
|
||||
static inline struct lp_type
|
||||
lp_type_float_vec(unsigned width, unsigned total_width)
|
||||
{
|
||||
struct lp_type res_type;
|
||||
|
@ -236,7 +236,7 @@ lp_type_float_vec(unsigned width, unsigned total_width)
|
|||
|
||||
|
||||
/** Create scalar int type */
|
||||
static INLINE struct lp_type
|
||||
static inline struct lp_type
|
||||
lp_type_int(unsigned width)
|
||||
{
|
||||
struct lp_type res_type;
|
||||
|
@ -251,7 +251,7 @@ lp_type_int(unsigned width)
|
|||
|
||||
|
||||
/** Create vector int type */
|
||||
static INLINE struct lp_type
|
||||
static inline struct lp_type
|
||||
lp_type_int_vec(unsigned width, unsigned total_width)
|
||||
{
|
||||
struct lp_type res_type;
|
||||
|
@ -266,7 +266,7 @@ lp_type_int_vec(unsigned width, unsigned total_width)
|
|||
|
||||
|
||||
/** Create scalar uint type */
|
||||
static INLINE struct lp_type
|
||||
static inline struct lp_type
|
||||
lp_type_uint(unsigned width)
|
||||
{
|
||||
struct lp_type res_type;
|
||||
|
@ -280,7 +280,7 @@ lp_type_uint(unsigned width)
|
|||
|
||||
|
||||
/** Create vector uint type */
|
||||
static INLINE struct lp_type
|
||||
static inline struct lp_type
|
||||
lp_type_uint_vec(unsigned width, unsigned total_width)
|
||||
{
|
||||
struct lp_type res_type;
|
||||
|
@ -293,7 +293,7 @@ lp_type_uint_vec(unsigned width, unsigned total_width)
|
|||
}
|
||||
|
||||
|
||||
static INLINE struct lp_type
|
||||
static inline struct lp_type
|
||||
lp_type_unorm(unsigned width, unsigned total_width)
|
||||
{
|
||||
struct lp_type res_type;
|
||||
|
@ -307,7 +307,7 @@ lp_type_unorm(unsigned width, unsigned total_width)
|
|||
}
|
||||
|
||||
|
||||
static INLINE struct lp_type
|
||||
static inline struct lp_type
|
||||
lp_type_fixed(unsigned width, unsigned total_width)
|
||||
{
|
||||
struct lp_type res_type;
|
||||
|
@ -322,7 +322,7 @@ lp_type_fixed(unsigned width, unsigned total_width)
|
|||
}
|
||||
|
||||
|
||||
static INLINE struct lp_type
|
||||
static inline struct lp_type
|
||||
lp_type_ufixed(unsigned width, unsigned total_width)
|
||||
{
|
||||
struct lp_type res_type;
|
||||
|
@ -364,7 +364,7 @@ LLVMTypeRef
|
|||
lp_build_int_vec_type(struct gallivm_state *gallivm, struct lp_type type);
|
||||
|
||||
|
||||
static INLINE struct lp_type
|
||||
static inline struct lp_type
|
||||
lp_float32_vec4_type(void)
|
||||
{
|
||||
struct lp_type type;
|
||||
|
@ -380,7 +380,7 @@ lp_float32_vec4_type(void)
|
|||
}
|
||||
|
||||
|
||||
static INLINE struct lp_type
|
||||
static inline struct lp_type
|
||||
lp_int32_vec4_type(void)
|
||||
{
|
||||
struct lp_type type;
|
||||
|
@ -396,7 +396,7 @@ lp_int32_vec4_type(void)
|
|||
}
|
||||
|
||||
|
||||
static INLINE struct lp_type
|
||||
static inline struct lp_type
|
||||
lp_unorm8_vec4_type(void)
|
||||
{
|
||||
struct lp_type type;
|
||||
|
|
|
@ -55,7 +55,7 @@ add_overflow_size_t(size_t a, size_t b, size_t *res)
|
|||
/**
|
||||
* Return memory on given byte alignment
|
||||
*/
|
||||
static INLINE void *
|
||||
static inline void *
|
||||
os_malloc_aligned(size_t size, size_t alignment)
|
||||
{
|
||||
char *ptr, *buf;
|
||||
|
@ -87,7 +87,7 @@ os_malloc_aligned(size_t size, size_t alignment)
|
|||
/**
|
||||
* Free memory returned by align_malloc().
|
||||
*/
|
||||
static INLINE void
|
||||
static inline void
|
||||
os_free_aligned(void *ptr)
|
||||
{
|
||||
if (ptr) {
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
|
||||
#if defined(HAVE_POSIX_MEMALIGN)
|
||||
|
||||
static INLINE void *
|
||||
static inline void *
|
||||
os_malloc_aligned(size_t size, size_t alignment)
|
||||
{
|
||||
void *ptr;
|
||||
|
|
|
@ -58,7 +58,7 @@ extern "C" {
|
|||
|
||||
extern void *__mmap2(void *, size_t, int, int, int, size_t);
|
||||
|
||||
static INLINE void *os_mmap(void *addr, size_t length, int prot, int flags,
|
||||
static inline void *os_mmap(void *addr, size_t length, int prot, int flags,
|
||||
int fd, loff_t offset)
|
||||
{
|
||||
/* offset must be aligned to 4096 (not necessarily the page size) */
|
||||
|
@ -78,7 +78,7 @@ static INLINE void *os_mmap(void *addr, size_t length, int prot, int flags,
|
|||
# define os_mmap(addr, length, prot, flags, fd, offset) \
|
||||
mmap(addr, length, prot, flags, fd, offset)
|
||||
|
||||
static INLINE int os_munmap(void *addr, size_t length)
|
||||
static inline int os_munmap(void *addr, size_t length)
|
||||
{
|
||||
/* Copied from configure code generated by AC_SYS_LARGEFILE */
|
||||
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + \
|
||||
|
|
|
@ -54,7 +54,7 @@ typedef thrd_t pipe_thread;
|
|||
#define PIPE_THREAD_ROUTINE( name, param ) \
|
||||
int name( void *param )
|
||||
|
||||
static INLINE pipe_thread pipe_thread_create( PIPE_THREAD_ROUTINE((*routine), ), void *param )
|
||||
static inline pipe_thread pipe_thread_create( PIPE_THREAD_ROUTINE((*routine), ), void *param )
|
||||
{
|
||||
pipe_thread thread;
|
||||
#ifdef HAVE_PTHREAD
|
||||
|
@ -75,17 +75,17 @@ static INLINE pipe_thread pipe_thread_create( PIPE_THREAD_ROUTINE((*routine), ),
|
|||
return thread;
|
||||
}
|
||||
|
||||
static INLINE int pipe_thread_wait( pipe_thread thread )
|
||||
static inline int pipe_thread_wait( pipe_thread thread )
|
||||
{
|
||||
return thrd_join( thread, NULL );
|
||||
}
|
||||
|
||||
static INLINE int pipe_thread_destroy( pipe_thread thread )
|
||||
static inline int pipe_thread_destroy( pipe_thread thread )
|
||||
{
|
||||
return thrd_detach( thread );
|
||||
}
|
||||
|
||||
static INLINE void pipe_thread_setname( const char *name )
|
||||
static inline void pipe_thread_setname( const char *name )
|
||||
{
|
||||
#if defined(HAVE_PTHREAD)
|
||||
# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
|
||||
|
@ -145,17 +145,17 @@ typedef cnd_t pipe_condvar;
|
|||
|
||||
typedef pthread_barrier_t pipe_barrier;
|
||||
|
||||
static INLINE void pipe_barrier_init(pipe_barrier *barrier, unsigned count)
|
||||
static inline void pipe_barrier_init(pipe_barrier *barrier, unsigned count)
|
||||
{
|
||||
pthread_barrier_init(barrier, NULL, count);
|
||||
}
|
||||
|
||||
static INLINE void pipe_barrier_destroy(pipe_barrier *barrier)
|
||||
static inline void pipe_barrier_destroy(pipe_barrier *barrier)
|
||||
{
|
||||
pthread_barrier_destroy(barrier);
|
||||
}
|
||||
|
||||
static INLINE void pipe_barrier_wait(pipe_barrier *barrier)
|
||||
static inline void pipe_barrier_wait(pipe_barrier *barrier)
|
||||
{
|
||||
pthread_barrier_wait(barrier);
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ typedef struct {
|
|||
pipe_condvar condvar;
|
||||
} pipe_barrier;
|
||||
|
||||
static INLINE void pipe_barrier_init(pipe_barrier *barrier, unsigned count)
|
||||
static inline void pipe_barrier_init(pipe_barrier *barrier, unsigned count)
|
||||
{
|
||||
barrier->count = count;
|
||||
barrier->waiters = 0;
|
||||
|
@ -180,14 +180,14 @@ static INLINE void pipe_barrier_init(pipe_barrier *barrier, unsigned count)
|
|||
pipe_condvar_init(barrier->condvar);
|
||||
}
|
||||
|
||||
static INLINE void pipe_barrier_destroy(pipe_barrier *barrier)
|
||||
static inline void pipe_barrier_destroy(pipe_barrier *barrier)
|
||||
{
|
||||
assert(barrier->waiters == 0);
|
||||
pipe_mutex_destroy(barrier->mutex);
|
||||
pipe_condvar_destroy(barrier->condvar);
|
||||
}
|
||||
|
||||
static INLINE void pipe_barrier_wait(pipe_barrier *barrier)
|
||||
static inline void pipe_barrier_wait(pipe_barrier *barrier)
|
||||
{
|
||||
pipe_mutex_lock(barrier->mutex);
|
||||
|
||||
|
@ -225,7 +225,7 @@ typedef struct
|
|||
} pipe_semaphore;
|
||||
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
pipe_semaphore_init(pipe_semaphore *sema, int init_val)
|
||||
{
|
||||
pipe_mutex_init(sema->mutex);
|
||||
|
@ -233,7 +233,7 @@ pipe_semaphore_init(pipe_semaphore *sema, int init_val)
|
|||
sema->counter = init_val;
|
||||
}
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
pipe_semaphore_destroy(pipe_semaphore *sema)
|
||||
{
|
||||
pipe_mutex_destroy(sema->mutex);
|
||||
|
@ -241,7 +241,7 @@ pipe_semaphore_destroy(pipe_semaphore *sema)
|
|||
}
|
||||
|
||||
/** Signal/increment semaphore counter */
|
||||
static INLINE void
|
||||
static inline void
|
||||
pipe_semaphore_signal(pipe_semaphore *sema)
|
||||
{
|
||||
pipe_mutex_lock(sema->mutex);
|
||||
|
@ -251,7 +251,7 @@ pipe_semaphore_signal(pipe_semaphore *sema)
|
|||
}
|
||||
|
||||
/** Wait for semaphore counter to be greater than zero */
|
||||
static INLINE void
|
||||
static inline void
|
||||
pipe_semaphore_wait(pipe_semaphore *sema)
|
||||
{
|
||||
pipe_mutex_lock(sema->mutex);
|
||||
|
@ -277,7 +277,7 @@ typedef struct {
|
|||
#define PIPE_TSD_INIT_MAGIC 0xff8adc98
|
||||
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
pipe_tsd_init(pipe_tsd *tsd)
|
||||
{
|
||||
if (tss_create(&tsd->key, NULL/*free*/) != 0) {
|
||||
|
@ -286,7 +286,7 @@ pipe_tsd_init(pipe_tsd *tsd)
|
|||
tsd->initMagic = PIPE_TSD_INIT_MAGIC;
|
||||
}
|
||||
|
||||
static INLINE void *
|
||||
static inline void *
|
||||
pipe_tsd_get(pipe_tsd *tsd)
|
||||
{
|
||||
if (tsd->initMagic != (int) PIPE_TSD_INIT_MAGIC) {
|
||||
|
@ -295,7 +295,7 @@ pipe_tsd_get(pipe_tsd *tsd)
|
|||
return tss_get(tsd->key);
|
||||
}
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
pipe_tsd_set(pipe_tsd *tsd, void *value)
|
||||
{
|
||||
if (tsd->initMagic != (int) PIPE_TSD_INIT_MAGIC) {
|
||||
|
|
|
@ -60,7 +60,7 @@ os_time_get_nano(void);
|
|||
/*
|
||||
* Get the current time in microseconds from an unknown base.
|
||||
*/
|
||||
static INLINE int64_t
|
||||
static inline int64_t
|
||||
os_time_get(void)
|
||||
{
|
||||
return os_time_get_nano() / 1000;
|
||||
|
@ -83,7 +83,7 @@ os_time_sleep(int64_t usecs);
|
|||
*
|
||||
* Returns true if the current time has elapsed beyond the specified interval.
|
||||
*/
|
||||
static INLINE boolean
|
||||
static inline boolean
|
||||
os_time_timeout(int64_t start,
|
||||
int64_t end,
|
||||
int64_t curr)
|
||||
|
|
|
@ -158,7 +158,7 @@ struct pb_vtbl
|
|||
|
||||
/* Accessor functions for pb->vtbl:
|
||||
*/
|
||||
static INLINE void *
|
||||
static inline void *
|
||||
pb_map(struct pb_buffer *buf,
|
||||
unsigned flags, void *flush_ctx)
|
||||
{
|
||||
|
@ -170,7 +170,7 @@ pb_map(struct pb_buffer *buf,
|
|||
}
|
||||
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
pb_unmap(struct pb_buffer *buf)
|
||||
{
|
||||
assert(buf);
|
||||
|
@ -181,7 +181,7 @@ pb_unmap(struct pb_buffer *buf)
|
|||
}
|
||||
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
pb_get_base_buffer( struct pb_buffer *buf,
|
||||
struct pb_buffer **base_buf,
|
||||
pb_size *offset )
|
||||
|
@ -200,7 +200,7 @@ pb_get_base_buffer( struct pb_buffer *buf,
|
|||
}
|
||||
|
||||
|
||||
static INLINE enum pipe_error
|
||||
static inline enum pipe_error
|
||||
pb_validate(struct pb_buffer *buf, struct pb_validate *vl, unsigned flags)
|
||||
{
|
||||
assert(buf);
|
||||
|
@ -211,7 +211,7 @@ pb_validate(struct pb_buffer *buf, struct pb_validate *vl, unsigned flags)
|
|||
}
|
||||
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
pb_fence(struct pb_buffer *buf, struct pipe_fence_handle *fence)
|
||||
{
|
||||
assert(buf);
|
||||
|
@ -222,7 +222,7 @@ pb_fence(struct pb_buffer *buf, struct pipe_fence_handle *fence)
|
|||
}
|
||||
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
pb_destroy(struct pb_buffer *buf)
|
||||
{
|
||||
assert(buf);
|
||||
|
@ -232,7 +232,7 @@ pb_destroy(struct pb_buffer *buf)
|
|||
buf->vtbl->destroy(buf);
|
||||
}
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
pb_reference(struct pb_buffer **dst,
|
||||
struct pb_buffer *src)
|
||||
{
|
||||
|
@ -248,7 +248,7 @@ pb_reference(struct pb_buffer **dst,
|
|||
* Utility function to check whether the provided alignment is consistent with
|
||||
* the requested or not.
|
||||
*/
|
||||
static INLINE boolean
|
||||
static inline boolean
|
||||
pb_check_alignment(pb_size requested, pb_size provided)
|
||||
{
|
||||
if(!requested)
|
||||
|
@ -265,7 +265,7 @@ pb_check_alignment(pb_size requested, pb_size provided)
|
|||
* Utility function to check whether the provided alignment is consistent with
|
||||
* the requested or not.
|
||||
*/
|
||||
static INLINE boolean
|
||||
static inline boolean
|
||||
pb_check_usage(unsigned requested, unsigned provided)
|
||||
{
|
||||
return (requested & provided) == requested ? TRUE : FALSE;
|
||||
|
|
|
@ -149,7 +149,7 @@ struct fenced_buffer
|
|||
};
|
||||
|
||||
|
||||
static INLINE struct fenced_manager *
|
||||
static inline struct fenced_manager *
|
||||
fenced_manager(struct pb_manager *mgr)
|
||||
{
|
||||
assert(mgr);
|
||||
|
@ -157,7 +157,7 @@ fenced_manager(struct pb_manager *mgr)
|
|||
}
|
||||
|
||||
|
||||
static INLINE struct fenced_buffer *
|
||||
static inline struct fenced_buffer *
|
||||
fenced_buffer(struct pb_buffer *buf)
|
||||
{
|
||||
assert(buf);
|
||||
|
@ -240,7 +240,7 @@ fenced_manager_dump_locked(struct fenced_manager *fenced_mgr)
|
|||
}
|
||||
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
fenced_buffer_destroy_locked(struct fenced_manager *fenced_mgr,
|
||||
struct fenced_buffer *fenced_buf)
|
||||
{
|
||||
|
@ -265,7 +265,7 @@ fenced_buffer_destroy_locked(struct fenced_manager *fenced_mgr,
|
|||
*
|
||||
* Reference count should be incremented before calling this function.
|
||||
*/
|
||||
static INLINE void
|
||||
static inline void
|
||||
fenced_buffer_add_locked(struct fenced_manager *fenced_mgr,
|
||||
struct fenced_buffer *fenced_buf)
|
||||
{
|
||||
|
@ -289,7 +289,7 @@ fenced_buffer_add_locked(struct fenced_manager *fenced_mgr,
|
|||
*
|
||||
* Returns TRUE if the buffer was detroyed.
|
||||
*/
|
||||
static INLINE boolean
|
||||
static inline boolean
|
||||
fenced_buffer_remove_locked(struct fenced_manager *fenced_mgr,
|
||||
struct fenced_buffer *fenced_buf)
|
||||
{
|
||||
|
@ -326,7 +326,7 @@ fenced_buffer_remove_locked(struct fenced_manager *fenced_mgr,
|
|||
* This function will release and re-acquire the mutex, so any copy of mutable
|
||||
* state must be discarded after calling it.
|
||||
*/
|
||||
static INLINE enum pipe_error
|
||||
static inline enum pipe_error
|
||||
fenced_buffer_finish_locked(struct fenced_manager *fenced_mgr,
|
||||
struct fenced_buffer *fenced_buf)
|
||||
{
|
||||
|
@ -550,7 +550,7 @@ fenced_buffer_destroy_gpu_storage_locked(struct fenced_buffer *fenced_buf)
|
|||
* This function is a shorthand around pb_manager::create_buffer for
|
||||
* fenced_buffer_create_gpu_storage_locked()'s benefit.
|
||||
*/
|
||||
static INLINE boolean
|
||||
static inline boolean
|
||||
fenced_buffer_try_create_gpu_storage_locked(struct fenced_manager *fenced_mgr,
|
||||
struct fenced_buffer *fenced_buf)
|
||||
{
|
||||
|
|
|
@ -49,7 +49,7 @@ struct malloc_buffer
|
|||
|
||||
extern const struct pb_vtbl malloc_buffer_vtbl;
|
||||
|
||||
static INLINE struct malloc_buffer *
|
||||
static inline struct malloc_buffer *
|
||||
malloc_buffer(struct pb_buffer *buf)
|
||||
{
|
||||
assert(buf);
|
||||
|
|
|
@ -50,7 +50,7 @@ struct pb_alt_manager
|
|||
};
|
||||
|
||||
|
||||
static INLINE struct pb_alt_manager *
|
||||
static inline struct pb_alt_manager *
|
||||
pb_alt_manager(struct pb_manager *mgr)
|
||||
{
|
||||
assert(mgr);
|
||||
|
|
|
@ -88,7 +88,7 @@ struct pb_cache_manager
|
|||
};
|
||||
|
||||
|
||||
static INLINE struct pb_cache_buffer *
|
||||
static inline struct pb_cache_buffer *
|
||||
pb_cache_buffer(struct pb_buffer *buf)
|
||||
{
|
||||
assert(buf);
|
||||
|
@ -96,7 +96,7 @@ pb_cache_buffer(struct pb_buffer *buf)
|
|||
}
|
||||
|
||||
|
||||
static INLINE struct pb_cache_manager *
|
||||
static inline struct pb_cache_manager *
|
||||
pb_cache_manager(struct pb_manager *mgr)
|
||||
{
|
||||
assert(mgr);
|
||||
|
@ -107,7 +107,7 @@ pb_cache_manager(struct pb_manager *mgr)
|
|||
/**
|
||||
* Actually destroy the buffer.
|
||||
*/
|
||||
static INLINE void
|
||||
static inline void
|
||||
_pb_cache_buffer_destroy(struct pb_cache_buffer *buf)
|
||||
{
|
||||
struct pb_cache_manager *mgr = buf->mgr;
|
||||
|
@ -235,7 +235,7 @@ pb_cache_buffer_vtbl = {
|
|||
};
|
||||
|
||||
|
||||
static INLINE int
|
||||
static inline int
|
||||
pb_cache_is_buffer_compat(struct pb_cache_buffer *buf,
|
||||
pb_size size,
|
||||
const struct pb_desc *desc)
|
||||
|
|
|
@ -99,7 +99,7 @@ struct pb_debug_manager
|
|||
};
|
||||
|
||||
|
||||
static INLINE struct pb_debug_buffer *
|
||||
static inline struct pb_debug_buffer *
|
||||
pb_debug_buffer(struct pb_buffer *buf)
|
||||
{
|
||||
assert(buf);
|
||||
|
@ -107,7 +107,7 @@ pb_debug_buffer(struct pb_buffer *buf)
|
|||
}
|
||||
|
||||
|
||||
static INLINE struct pb_debug_manager *
|
||||
static inline struct pb_debug_manager *
|
||||
pb_debug_manager(struct pb_manager *mgr)
|
||||
{
|
||||
assert(mgr);
|
||||
|
@ -123,7 +123,7 @@ static const uint8_t random_pattern[32] = {
|
|||
};
|
||||
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
fill_random_pattern(uint8_t *dst, pb_size size)
|
||||
{
|
||||
pb_size i = 0;
|
||||
|
@ -134,7 +134,7 @@ fill_random_pattern(uint8_t *dst, pb_size size)
|
|||
}
|
||||
|
||||
|
||||
static INLINE boolean
|
||||
static inline boolean
|
||||
check_random_pattern(const uint8_t *dst, pb_size size,
|
||||
pb_size *min_ofs, pb_size *max_ofs)
|
||||
{
|
||||
|
|
|
@ -65,7 +65,7 @@ struct mm_pb_manager
|
|||
};
|
||||
|
||||
|
||||
static INLINE struct mm_pb_manager *
|
||||
static inline struct mm_pb_manager *
|
||||
mm_pb_manager(struct pb_manager *mgr)
|
||||
{
|
||||
assert(mgr);
|
||||
|
@ -83,7 +83,7 @@ struct mm_buffer
|
|||
};
|
||||
|
||||
|
||||
static INLINE struct mm_buffer *
|
||||
static inline struct mm_buffer *
|
||||
mm_buffer(struct pb_buffer *buf)
|
||||
{
|
||||
assert(buf);
|
||||
|
|
|
@ -70,7 +70,7 @@ struct pb_ondemand_manager
|
|||
|
||||
extern const struct pb_vtbl pb_ondemand_buffer_vtbl;
|
||||
|
||||
static INLINE struct pb_ondemand_buffer *
|
||||
static inline struct pb_ondemand_buffer *
|
||||
pb_ondemand_buffer(struct pb_buffer *buf)
|
||||
{
|
||||
assert(buf);
|
||||
|
@ -80,7 +80,7 @@ pb_ondemand_buffer(struct pb_buffer *buf)
|
|||
return (struct pb_ondemand_buffer *)buf;
|
||||
}
|
||||
|
||||
static INLINE struct pb_ondemand_manager *
|
||||
static inline struct pb_ondemand_manager *
|
||||
pb_ondemand_manager(struct pb_manager *mgr)
|
||||
{
|
||||
assert(mgr);
|
||||
|
|
|
@ -73,7 +73,7 @@ struct pool_pb_manager
|
|||
};
|
||||
|
||||
|
||||
static INLINE struct pool_pb_manager *
|
||||
static inline struct pool_pb_manager *
|
||||
pool_pb_manager(struct pb_manager *mgr)
|
||||
{
|
||||
assert(mgr);
|
||||
|
@ -93,7 +93,7 @@ struct pool_buffer
|
|||
};
|
||||
|
||||
|
||||
static INLINE struct pool_buffer *
|
||||
static inline struct pool_buffer *
|
||||
pool_buffer(struct pb_buffer *buf)
|
||||
{
|
||||
assert(buf);
|
||||
|
|
|
@ -163,7 +163,7 @@ struct pb_slab_range_manager
|
|||
};
|
||||
|
||||
|
||||
static INLINE struct pb_slab_buffer *
|
||||
static inline struct pb_slab_buffer *
|
||||
pb_slab_buffer(struct pb_buffer *buf)
|
||||
{
|
||||
assert(buf);
|
||||
|
@ -171,7 +171,7 @@ pb_slab_buffer(struct pb_buffer *buf)
|
|||
}
|
||||
|
||||
|
||||
static INLINE struct pb_slab_manager *
|
||||
static inline struct pb_slab_manager *
|
||||
pb_slab_manager(struct pb_manager *mgr)
|
||||
{
|
||||
assert(mgr);
|
||||
|
@ -179,7 +179,7 @@ pb_slab_manager(struct pb_manager *mgr)
|
|||
}
|
||||
|
||||
|
||||
static INLINE struct pb_slab_range_manager *
|
||||
static inline struct pb_slab_range_manager *
|
||||
pb_slab_range_manager(struct pb_manager *mgr)
|
||||
{
|
||||
assert(mgr);
|
||||
|
|
|
@ -510,7 +510,7 @@ void x86_mov8_imm( struct x86_function *p, struct x86_reg dst, uint8_t imm )
|
|||
/**
|
||||
* Immediate group 1 instructions.
|
||||
*/
|
||||
static INLINE void
|
||||
static inline void
|
||||
x86_group1_imm( struct x86_function *p,
|
||||
unsigned op, struct x86_reg dst, int imm )
|
||||
{
|
||||
|
@ -2196,7 +2196,7 @@ void x86_release_func( struct x86_function *p )
|
|||
}
|
||||
|
||||
|
||||
static INLINE x86_func
|
||||
static inline x86_func
|
||||
voidptr_to_x86_func(void *v)
|
||||
{
|
||||
union {
|
||||
|
|
|
@ -136,7 +136,7 @@ enum x86_target
|
|||
};
|
||||
|
||||
/* make this read a member of x86_function if target != host is desired */
|
||||
static INLINE enum x86_target x86_target( struct x86_function* p )
|
||||
static inline enum x86_target x86_target( struct x86_function* p )
|
||||
{
|
||||
#ifdef PIPE_ARCH_X86
|
||||
return X86_32;
|
||||
|
@ -147,7 +147,7 @@ static INLINE enum x86_target x86_target( struct x86_function* p )
|
|||
#endif
|
||||
}
|
||||
|
||||
static INLINE unsigned x86_target_caps( struct x86_function* p )
|
||||
static inline unsigned x86_target_caps( struct x86_function* p )
|
||||
{
|
||||
return p->caps;
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
* TODO: Audit the following *screen_create() - all of
|
||||
* them should return the original screen on failuire.
|
||||
*/
|
||||
static INLINE struct pipe_screen *
|
||||
static inline struct pipe_screen *
|
||||
debug_screen_wrap(struct pipe_screen *screen)
|
||||
{
|
||||
#if defined(GALLIUM_RBUG)
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#endif
|
||||
|
||||
|
||||
static INLINE struct pipe_screen *
|
||||
static inline struct pipe_screen *
|
||||
sw_screen_create_named(struct sw_winsys *winsys, const char *driver)
|
||||
{
|
||||
struct pipe_screen *screen = NULL;
|
||||
|
@ -39,7 +39,7 @@ sw_screen_create_named(struct sw_winsys *winsys, const char *driver)
|
|||
}
|
||||
|
||||
|
||||
static INLINE struct pipe_screen *
|
||||
static inline struct pipe_screen *
|
||||
sw_screen_create(struct sw_winsys *winsys)
|
||||
{
|
||||
const char *default_driver;
|
||||
|
@ -71,7 +71,7 @@ PUBLIC const __DRIextension **__driDriverGetExtensions_swrast(void)
|
|||
return galliumsw_driver_extensions;
|
||||
}
|
||||
|
||||
INLINE struct pipe_screen *
|
||||
inline struct pipe_screen *
|
||||
drisw_create_screen(struct drisw_loader_funcs *lf)
|
||||
{
|
||||
struct sw_winsys *winsys = NULL;
|
||||
|
@ -98,7 +98,7 @@ drisw_create_screen(struct drisw_loader_funcs *lf)
|
|||
|
||||
extern struct pipe_screen *ninesw_create_screen(struct pipe_screen *screen);
|
||||
|
||||
INLINE struct pipe_screen *
|
||||
inline struct pipe_screen *
|
||||
ninesw_create_screen(struct pipe_screen *pscreen)
|
||||
{
|
||||
struct sw_winsys *winsys = NULL;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* Try to wrap a hw screen with a software screen.
|
||||
* On failure will return given screen.
|
||||
*/
|
||||
static INLINE struct pipe_screen *
|
||||
static inline struct pipe_screen *
|
||||
sw_screen_wrap(struct pipe_screen *screen)
|
||||
{
|
||||
#if defined(GALLIUM_SOFTPIPE) || defined(GALLIUM_LLVMPIPE)
|
||||
|
|
|
@ -735,7 +735,7 @@ static const union tgsi_exec_channel M128Vec = {
|
|||
* not lead to crashes, etc. But when debugging, it's helpful to catch
|
||||
* them.
|
||||
*/
|
||||
static INLINE void
|
||||
static inline void
|
||||
check_inf_or_nan(const union tgsi_exec_channel *chan)
|
||||
{
|
||||
assert(!util_is_inf_or_nan((chan)->f[0]));
|
||||
|
|
|
@ -386,7 +386,7 @@ boolean
|
|||
tgsi_check_soa_dependencies(const struct tgsi_full_instruction *inst);
|
||||
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
tgsi_set_kill_mask(struct tgsi_exec_machine *mach, unsigned mask)
|
||||
{
|
||||
mach->Temps[TGSI_EXEC_TEMP_KILMASK_I].xyzw[TGSI_EXEC_TEMP_KILMASK_C].u[0] =
|
||||
|
@ -395,7 +395,7 @@ tgsi_set_kill_mask(struct tgsi_exec_machine *mach, unsigned mask)
|
|||
|
||||
|
||||
/** Set execution mask values prior to executing the shader */
|
||||
static INLINE void
|
||||
static inline void
|
||||
tgsi_set_exec_mask(struct tgsi_exec_machine *mach,
|
||||
boolean ch0, boolean ch1, boolean ch2, boolean ch3)
|
||||
{
|
||||
|
@ -414,7 +414,7 @@ tgsi_exec_set_constant_buffers(struct tgsi_exec_machine *mach,
|
|||
const unsigned *buf_sizes);
|
||||
|
||||
|
||||
static INLINE int
|
||||
static inline int
|
||||
tgsi_exec_get_shader_param(enum pipe_shader_cap param)
|
||||
{
|
||||
switch(param) {
|
||||
|
|
|
@ -316,7 +316,7 @@ tgsi_get_processor_name( uint processor )
|
|||
*
|
||||
* MOV and UCMP is special so return VOID
|
||||
*/
|
||||
static INLINE enum tgsi_opcode_type
|
||||
static inline enum tgsi_opcode_type
|
||||
tgsi_opcode_infer_type( uint opcode )
|
||||
{
|
||||
switch (opcode) {
|
||||
|
|
|
@ -69,7 +69,7 @@ tgsi_parse_end_of_tokens(
|
|||
* warnings. The warnings seem harmless on x86 but on PPC they cause
|
||||
* real failures.
|
||||
*/
|
||||
static INLINE void
|
||||
static inline void
|
||||
copy_token(void *dst, const void *src)
|
||||
{
|
||||
memcpy(dst, src, 4);
|
||||
|
|
|
@ -133,7 +133,7 @@ void
|
|||
tgsi_parse_token(
|
||||
struct tgsi_parse_context *ctx );
|
||||
|
||||
static INLINE unsigned
|
||||
static inline unsigned
|
||||
tgsi_num_tokens(const struct tgsi_token *tokens)
|
||||
{
|
||||
struct tgsi_header header;
|
||||
|
|
|
@ -63,7 +63,7 @@ struct sanity_check_ctx
|
|||
boolean print;
|
||||
};
|
||||
|
||||
static INLINE unsigned
|
||||
static inline unsigned
|
||||
scan_register_key(const scan_register *reg)
|
||||
{
|
||||
unsigned key = reg->file;
|
||||
|
|
|
@ -203,7 +203,7 @@ const char *tgsi_immediate_type_names[4] =
|
|||
};
|
||||
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
tgsi_strings_check(void)
|
||||
{
|
||||
STATIC_ASSERT(Elements(tgsi_semantic_names) == TGSI_SEMANTIC_COUNT);
|
||||
|
|
|
@ -94,7 +94,7 @@ struct tgsi_transform_context
|
|||
/**
|
||||
* Helper for emitting temporary register declarations.
|
||||
*/
|
||||
static INLINE void
|
||||
static inline void
|
||||
tgsi_transform_temp_decl(struct tgsi_transform_context *ctx,
|
||||
unsigned index)
|
||||
{
|
||||
|
@ -108,7 +108,7 @@ tgsi_transform_temp_decl(struct tgsi_transform_context *ctx,
|
|||
}
|
||||
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
tgsi_transform_input_decl(struct tgsi_transform_context *ctx,
|
||||
unsigned index,
|
||||
unsigned sem_name, unsigned sem_index,
|
||||
|
@ -130,7 +130,7 @@ tgsi_transform_input_decl(struct tgsi_transform_context *ctx,
|
|||
}
|
||||
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
tgsi_transform_sampler_decl(struct tgsi_transform_context *ctx,
|
||||
unsigned index)
|
||||
{
|
||||
|
@ -143,7 +143,7 @@ tgsi_transform_sampler_decl(struct tgsi_transform_context *ctx,
|
|||
ctx->emit_declaration(ctx, &decl);
|
||||
}
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
tgsi_transform_sampler_view_decl(struct tgsi_transform_context *ctx,
|
||||
unsigned index,
|
||||
unsigned target,
|
||||
|
@ -165,7 +165,7 @@ tgsi_transform_sampler_view_decl(struct tgsi_transform_context *ctx,
|
|||
ctx->emit_declaration(ctx, &decl);
|
||||
}
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
tgsi_transform_immediate_decl(struct tgsi_transform_context *ctx,
|
||||
float x, float y, float z, float w)
|
||||
{
|
||||
|
@ -186,7 +186,7 @@ tgsi_transform_immediate_decl(struct tgsi_transform_context *ctx,
|
|||
/**
|
||||
* Helper for emitting 1-operand instructions.
|
||||
*/
|
||||
static INLINE void
|
||||
static inline void
|
||||
tgsi_transform_op1_inst(struct tgsi_transform_context *ctx,
|
||||
unsigned opcode,
|
||||
unsigned dst_file,
|
||||
|
@ -211,7 +211,7 @@ tgsi_transform_op1_inst(struct tgsi_transform_context *ctx,
|
|||
}
|
||||
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
tgsi_transform_op2_inst(struct tgsi_transform_context *ctx,
|
||||
unsigned opcode,
|
||||
unsigned dst_file,
|
||||
|
@ -240,7 +240,7 @@ tgsi_transform_op2_inst(struct tgsi_transform_context *ctx,
|
|||
}
|
||||
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
tgsi_transform_op1_swz_inst(struct tgsi_transform_context *ctx,
|
||||
unsigned opcode,
|
||||
unsigned dst_file,
|
||||
|
@ -282,7 +282,7 @@ tgsi_transform_op1_swz_inst(struct tgsi_transform_context *ctx,
|
|||
}
|
||||
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
tgsi_transform_op2_swz_inst(struct tgsi_transform_context *ctx,
|
||||
unsigned opcode,
|
||||
unsigned dst_file,
|
||||
|
@ -333,7 +333,7 @@ tgsi_transform_op2_swz_inst(struct tgsi_transform_context *ctx,
|
|||
}
|
||||
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
tgsi_transform_op3_swz_inst(struct tgsi_transform_context *ctx,
|
||||
unsigned opcode,
|
||||
unsigned dst_file,
|
||||
|
@ -395,7 +395,7 @@ tgsi_transform_op3_swz_inst(struct tgsi_transform_context *ctx,
|
|||
}
|
||||
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
tgsi_transform_kill_inst(struct tgsi_transform_context *ctx,
|
||||
unsigned src_file,
|
||||
unsigned src_index,
|
||||
|
@ -419,7 +419,7 @@ tgsi_transform_kill_inst(struct tgsi_transform_context *ctx,
|
|||
}
|
||||
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
tgsi_transform_tex_2d_inst(struct tgsi_transform_context *ctx,
|
||||
unsigned dst_file,
|
||||
unsigned dst_index,
|
||||
|
|
|
@ -1830,7 +1830,7 @@ void ureg_free_tokens( const struct tgsi_token *tokens )
|
|||
}
|
||||
|
||||
|
||||
static INLINE unsigned
|
||||
static inline unsigned
|
||||
pipe_shader_from_tgsi_processor(unsigned processor)
|
||||
{
|
||||
switch (processor) {
|
||||
|
|
|
@ -140,7 +140,7 @@ ureg_destroy( struct ureg_program * );
|
|||
/***********************************************************************
|
||||
* Convenience routine:
|
||||
*/
|
||||
static INLINE void *
|
||||
static inline void *
|
||||
ureg_create_shader_with_so_and_destroy( struct ureg_program *p,
|
||||
struct pipe_context *pipe,
|
||||
const struct pipe_stream_output_info *so )
|
||||
|
@ -150,7 +150,7 @@ ureg_create_shader_with_so_and_destroy( struct ureg_program *p,
|
|||
return result;
|
||||
}
|
||||
|
||||
static INLINE void *
|
||||
static inline void *
|
||||
ureg_create_shader_and_destroy( struct ureg_program *p,
|
||||
struct pipe_context *pipe )
|
||||
{
|
||||
|
@ -180,7 +180,7 @@ ureg_DECL_fs_input_cyl_centroid(struct ureg_program *,
|
|||
unsigned array_id,
|
||||
unsigned array_size);
|
||||
|
||||
static INLINE struct ureg_src
|
||||
static inline struct ureg_src
|
||||
ureg_DECL_fs_input_cyl(struct ureg_program *ureg,
|
||||
unsigned semantic_name,
|
||||
unsigned semantic_index,
|
||||
|
@ -195,7 +195,7 @@ ureg_DECL_fs_input_cyl(struct ureg_program *ureg,
|
|||
0, 0, 1);
|
||||
}
|
||||
|
||||
static INLINE struct ureg_src
|
||||
static inline struct ureg_src
|
||||
ureg_DECL_fs_input(struct ureg_program *ureg,
|
||||
unsigned semantic_name,
|
||||
unsigned semantic_index,
|
||||
|
@ -328,7 +328,7 @@ ureg_DECL_sampler_view(struct ureg_program *,
|
|||
unsigned return_type_w );
|
||||
|
||||
|
||||
static INLINE struct ureg_src
|
||||
static inline struct ureg_src
|
||||
ureg_imm4f( struct ureg_program *ureg,
|
||||
float a, float b,
|
||||
float c, float d)
|
||||
|
@ -341,7 +341,7 @@ ureg_imm4f( struct ureg_program *ureg,
|
|||
return ureg_DECL_immediate( ureg, v, 4 );
|
||||
}
|
||||
|
||||
static INLINE struct ureg_src
|
||||
static inline struct ureg_src
|
||||
ureg_imm3f( struct ureg_program *ureg,
|
||||
float a, float b,
|
||||
float c)
|
||||
|
@ -353,7 +353,7 @@ ureg_imm3f( struct ureg_program *ureg,
|
|||
return ureg_DECL_immediate( ureg, v, 3 );
|
||||
}
|
||||
|
||||
static INLINE struct ureg_src
|
||||
static inline struct ureg_src
|
||||
ureg_imm2f( struct ureg_program *ureg,
|
||||
float a, float b)
|
||||
{
|
||||
|
@ -363,7 +363,7 @@ ureg_imm2f( struct ureg_program *ureg,
|
|||
return ureg_DECL_immediate( ureg, v, 2 );
|
||||
}
|
||||
|
||||
static INLINE struct ureg_src
|
||||
static inline struct ureg_src
|
||||
ureg_imm1f( struct ureg_program *ureg,
|
||||
float a)
|
||||
{
|
||||
|
@ -372,7 +372,7 @@ ureg_imm1f( struct ureg_program *ureg,
|
|||
return ureg_DECL_immediate( ureg, v, 1 );
|
||||
}
|
||||
|
||||
static INLINE struct ureg_src
|
||||
static inline struct ureg_src
|
||||
ureg_imm4u( struct ureg_program *ureg,
|
||||
unsigned a, unsigned b,
|
||||
unsigned c, unsigned d)
|
||||
|
@ -385,7 +385,7 @@ ureg_imm4u( struct ureg_program *ureg,
|
|||
return ureg_DECL_immediate_uint( ureg, v, 4 );
|
||||
}
|
||||
|
||||
static INLINE struct ureg_src
|
||||
static inline struct ureg_src
|
||||
ureg_imm3u( struct ureg_program *ureg,
|
||||
unsigned a, unsigned b,
|
||||
unsigned c)
|
||||
|
@ -397,7 +397,7 @@ ureg_imm3u( struct ureg_program *ureg,
|
|||
return ureg_DECL_immediate_uint( ureg, v, 3 );
|
||||
}
|
||||
|
||||
static INLINE struct ureg_src
|
||||
static inline struct ureg_src
|
||||
ureg_imm2u( struct ureg_program *ureg,
|
||||
unsigned a, unsigned b)
|
||||
{
|
||||
|
@ -407,14 +407,14 @@ ureg_imm2u( struct ureg_program *ureg,
|
|||
return ureg_DECL_immediate_uint( ureg, v, 2 );
|
||||
}
|
||||
|
||||
static INLINE struct ureg_src
|
||||
static inline struct ureg_src
|
||||
ureg_imm1u( struct ureg_program *ureg,
|
||||
unsigned a)
|
||||
{
|
||||
return ureg_DECL_immediate_uint( ureg, &a, 1 );
|
||||
}
|
||||
|
||||
static INLINE struct ureg_src
|
||||
static inline struct ureg_src
|
||||
ureg_imm4i( struct ureg_program *ureg,
|
||||
int a, int b,
|
||||
int c, int d)
|
||||
|
@ -427,7 +427,7 @@ ureg_imm4i( struct ureg_program *ureg,
|
|||
return ureg_DECL_immediate_int( ureg, v, 4 );
|
||||
}
|
||||
|
||||
static INLINE struct ureg_src
|
||||
static inline struct ureg_src
|
||||
ureg_imm3i( struct ureg_program *ureg,
|
||||
int a, int b,
|
||||
int c)
|
||||
|
@ -439,7 +439,7 @@ ureg_imm3i( struct ureg_program *ureg,
|
|||
return ureg_DECL_immediate_int( ureg, v, 3 );
|
||||
}
|
||||
|
||||
static INLINE struct ureg_src
|
||||
static inline struct ureg_src
|
||||
ureg_imm2i( struct ureg_program *ureg,
|
||||
int a, int b)
|
||||
{
|
||||
|
@ -449,7 +449,7 @@ ureg_imm2i( struct ureg_program *ureg,
|
|||
return ureg_DECL_immediate_int( ureg, v, 2 );
|
||||
}
|
||||
|
||||
static INLINE struct ureg_src
|
||||
static inline struct ureg_src
|
||||
ureg_imm1i( struct ureg_program *ureg,
|
||||
int a)
|
||||
{
|
||||
|
@ -459,7 +459,7 @@ ureg_imm1i( struct ureg_program *ureg,
|
|||
/* Where the destination register has a valid file, but an empty
|
||||
* writemask.
|
||||
*/
|
||||
static INLINE boolean
|
||||
static inline boolean
|
||||
ureg_dst_is_empty( struct ureg_dst dst )
|
||||
{
|
||||
return dst.File != TGSI_FILE_NULL &&
|
||||
|
@ -573,7 +573,7 @@ ureg_fixup_insn_size(struct ureg_program *ureg,
|
|||
|
||||
|
||||
#define OP00( op ) \
|
||||
static INLINE void ureg_##op( struct ureg_program *ureg ) \
|
||||
static inline void ureg_##op( struct ureg_program *ureg ) \
|
||||
{ \
|
||||
unsigned opcode = TGSI_OPCODE_##op; \
|
||||
struct ureg_emit_insn_result insn; \
|
||||
|
@ -592,7 +592,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg ) \
|
|||
}
|
||||
|
||||
#define OP01( op ) \
|
||||
static INLINE void ureg_##op( struct ureg_program *ureg, \
|
||||
static inline void ureg_##op( struct ureg_program *ureg, \
|
||||
struct ureg_src src ) \
|
||||
{ \
|
||||
unsigned opcode = TGSI_OPCODE_##op; \
|
||||
|
@ -613,7 +613,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \
|
|||
}
|
||||
|
||||
#define OP00_LBL( op ) \
|
||||
static INLINE void ureg_##op( struct ureg_program *ureg, \
|
||||
static inline void ureg_##op( struct ureg_program *ureg, \
|
||||
unsigned *label_token ) \
|
||||
{ \
|
||||
unsigned opcode = TGSI_OPCODE_##op; \
|
||||
|
@ -634,7 +634,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \
|
|||
}
|
||||
|
||||
#define OP01_LBL( op ) \
|
||||
static INLINE void ureg_##op( struct ureg_program *ureg, \
|
||||
static inline void ureg_##op( struct ureg_program *ureg, \
|
||||
struct ureg_src src, \
|
||||
unsigned *label_token ) \
|
||||
{ \
|
||||
|
@ -657,7 +657,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \
|
|||
}
|
||||
|
||||
#define OP10( op ) \
|
||||
static INLINE void ureg_##op( struct ureg_program *ureg, \
|
||||
static inline void ureg_##op( struct ureg_program *ureg, \
|
||||
struct ureg_dst dst ) \
|
||||
{ \
|
||||
unsigned opcode = TGSI_OPCODE_##op; \
|
||||
|
@ -681,7 +681,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \
|
|||
|
||||
|
||||
#define OP11( op ) \
|
||||
static INLINE void ureg_##op( struct ureg_program *ureg, \
|
||||
static inline void ureg_##op( struct ureg_program *ureg, \
|
||||
struct ureg_dst dst, \
|
||||
struct ureg_src src ) \
|
||||
{ \
|
||||
|
@ -706,7 +706,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \
|
|||
}
|
||||
|
||||
#define OP12( op ) \
|
||||
static INLINE void ureg_##op( struct ureg_program *ureg, \
|
||||
static inline void ureg_##op( struct ureg_program *ureg, \
|
||||
struct ureg_dst dst, \
|
||||
struct ureg_src src0, \
|
||||
struct ureg_src src1 ) \
|
||||
|
@ -733,7 +733,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \
|
|||
}
|
||||
|
||||
#define OP12_TEX( op ) \
|
||||
static INLINE void ureg_##op( struct ureg_program *ureg, \
|
||||
static inline void ureg_##op( struct ureg_program *ureg, \
|
||||
struct ureg_dst dst, \
|
||||
unsigned target, \
|
||||
struct ureg_src src0, \
|
||||
|
@ -762,7 +762,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \
|
|||
}
|
||||
|
||||
#define OP12_SAMPLE( op ) \
|
||||
static INLINE void ureg_##op( struct ureg_program *ureg, \
|
||||
static inline void ureg_##op( struct ureg_program *ureg, \
|
||||
struct ureg_dst dst, \
|
||||
struct ureg_src src0, \
|
||||
struct ureg_src src1 ) \
|
||||
|
@ -791,7 +791,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \
|
|||
}
|
||||
|
||||
#define OP13( op ) \
|
||||
static INLINE void ureg_##op( struct ureg_program *ureg, \
|
||||
static inline void ureg_##op( struct ureg_program *ureg, \
|
||||
struct ureg_dst dst, \
|
||||
struct ureg_src src0, \
|
||||
struct ureg_src src1, \
|
||||
|
@ -820,7 +820,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \
|
|||
}
|
||||
|
||||
#define OP13_SAMPLE( op ) \
|
||||
static INLINE void ureg_##op( struct ureg_program *ureg, \
|
||||
static inline void ureg_##op( struct ureg_program *ureg, \
|
||||
struct ureg_dst dst, \
|
||||
struct ureg_src src0, \
|
||||
struct ureg_src src1, \
|
||||
|
@ -851,7 +851,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \
|
|||
}
|
||||
|
||||
#define OP14_TEX( op ) \
|
||||
static INLINE void ureg_##op( struct ureg_program *ureg, \
|
||||
static inline void ureg_##op( struct ureg_program *ureg, \
|
||||
struct ureg_dst dst, \
|
||||
unsigned target, \
|
||||
struct ureg_src src0, \
|
||||
|
@ -884,7 +884,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \
|
|||
}
|
||||
|
||||
#define OP14_SAMPLE( op ) \
|
||||
static INLINE void ureg_##op( struct ureg_program *ureg, \
|
||||
static inline void ureg_##op( struct ureg_program *ureg, \
|
||||
struct ureg_dst dst, \
|
||||
struct ureg_src src0, \
|
||||
struct ureg_src src1, \
|
||||
|
@ -918,7 +918,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \
|
|||
|
||||
|
||||
#define OP14( op ) \
|
||||
static INLINE void ureg_##op( struct ureg_program *ureg, \
|
||||
static inline void ureg_##op( struct ureg_program *ureg, \
|
||||
struct ureg_dst dst, \
|
||||
struct ureg_src src0, \
|
||||
struct ureg_src src1, \
|
||||
|
@ -950,7 +950,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \
|
|||
|
||||
|
||||
#define OP15( op ) \
|
||||
static INLINE void ureg_##op( struct ureg_program *ureg, \
|
||||
static inline void ureg_##op( struct ureg_program *ureg, \
|
||||
struct ureg_dst dst, \
|
||||
struct ureg_src src0, \
|
||||
struct ureg_src src1, \
|
||||
|
@ -983,7 +983,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \
|
|||
}
|
||||
|
||||
#define OP15_SAMPLE( op ) \
|
||||
static INLINE void ureg_##op( struct ureg_program *ureg, \
|
||||
static inline void ureg_##op( struct ureg_program *ureg, \
|
||||
struct ureg_dst dst, \
|
||||
struct ureg_src src0, \
|
||||
struct ureg_src src1, \
|
||||
|
@ -1026,7 +1026,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \
|
|||
/***********************************************************************
|
||||
* Inline helpers for manipulating register structs:
|
||||
*/
|
||||
static INLINE struct ureg_src
|
||||
static inline struct ureg_src
|
||||
ureg_negate( struct ureg_src reg )
|
||||
{
|
||||
assert(reg.File != TGSI_FILE_NULL);
|
||||
|
@ -1034,7 +1034,7 @@ ureg_negate( struct ureg_src reg )
|
|||
return reg;
|
||||
}
|
||||
|
||||
static INLINE struct ureg_src
|
||||
static inline struct ureg_src
|
||||
ureg_abs( struct ureg_src reg )
|
||||
{
|
||||
assert(reg.File != TGSI_FILE_NULL);
|
||||
|
@ -1043,7 +1043,7 @@ ureg_abs( struct ureg_src reg )
|
|||
return reg;
|
||||
}
|
||||
|
||||
static INLINE struct ureg_src
|
||||
static inline struct ureg_src
|
||||
ureg_swizzle( struct ureg_src reg,
|
||||
int x, int y, int z, int w )
|
||||
{
|
||||
|
@ -1065,13 +1065,13 @@ ureg_swizzle( struct ureg_src reg,
|
|||
return reg;
|
||||
}
|
||||
|
||||
static INLINE struct ureg_src
|
||||
static inline struct ureg_src
|
||||
ureg_scalar( struct ureg_src reg, int x )
|
||||
{
|
||||
return ureg_swizzle(reg, x, x, x, x);
|
||||
}
|
||||
|
||||
static INLINE struct ureg_dst
|
||||
static inline struct ureg_dst
|
||||
ureg_writemask( struct ureg_dst reg,
|
||||
unsigned writemask )
|
||||
{
|
||||
|
@ -1080,7 +1080,7 @@ ureg_writemask( struct ureg_dst reg,
|
|||
return reg;
|
||||
}
|
||||
|
||||
static INLINE struct ureg_dst
|
||||
static inline struct ureg_dst
|
||||
ureg_saturate( struct ureg_dst reg )
|
||||
{
|
||||
assert(reg.File != TGSI_FILE_NULL);
|
||||
|
@ -1088,7 +1088,7 @@ ureg_saturate( struct ureg_dst reg )
|
|||
return reg;
|
||||
}
|
||||
|
||||
static INLINE struct ureg_dst
|
||||
static inline struct ureg_dst
|
||||
ureg_predicate(struct ureg_dst reg,
|
||||
boolean negate,
|
||||
unsigned swizzle_x,
|
||||
|
@ -1106,7 +1106,7 @@ ureg_predicate(struct ureg_dst reg,
|
|||
return reg;
|
||||
}
|
||||
|
||||
static INLINE struct ureg_dst
|
||||
static inline struct ureg_dst
|
||||
ureg_dst_indirect( struct ureg_dst reg, struct ureg_src addr )
|
||||
{
|
||||
assert(reg.File != TGSI_FILE_NULL);
|
||||
|
@ -1118,7 +1118,7 @@ ureg_dst_indirect( struct ureg_dst reg, struct ureg_src addr )
|
|||
return reg;
|
||||
}
|
||||
|
||||
static INLINE struct ureg_src
|
||||
static inline struct ureg_src
|
||||
ureg_src_indirect( struct ureg_src reg, struct ureg_src addr )
|
||||
{
|
||||
assert(reg.File != TGSI_FILE_NULL);
|
||||
|
@ -1130,7 +1130,7 @@ ureg_src_indirect( struct ureg_src reg, struct ureg_src addr )
|
|||
return reg;
|
||||
}
|
||||
|
||||
static INLINE struct ureg_dst
|
||||
static inline struct ureg_dst
|
||||
ureg_dst_dimension( struct ureg_dst reg, int index )
|
||||
{
|
||||
assert(reg.File != TGSI_FILE_NULL);
|
||||
|
@ -1140,7 +1140,7 @@ ureg_dst_dimension( struct ureg_dst reg, int index )
|
|||
return reg;
|
||||
}
|
||||
|
||||
static INLINE struct ureg_src
|
||||
static inline struct ureg_src
|
||||
ureg_src_dimension( struct ureg_src reg, int index )
|
||||
{
|
||||
assert(reg.File != TGSI_FILE_NULL);
|
||||
|
@ -1150,7 +1150,7 @@ ureg_src_dimension( struct ureg_src reg, int index )
|
|||
return reg;
|
||||
}
|
||||
|
||||
static INLINE struct ureg_dst
|
||||
static inline struct ureg_dst
|
||||
ureg_dst_dimension_indirect( struct ureg_dst reg, struct ureg_src addr,
|
||||
int index )
|
||||
{
|
||||
|
@ -1164,7 +1164,7 @@ ureg_dst_dimension_indirect( struct ureg_dst reg, struct ureg_src addr,
|
|||
return reg;
|
||||
}
|
||||
|
||||
static INLINE struct ureg_src
|
||||
static inline struct ureg_src
|
||||
ureg_src_dimension_indirect( struct ureg_src reg, struct ureg_src addr,
|
||||
int index )
|
||||
{
|
||||
|
@ -1178,21 +1178,21 @@ ureg_src_dimension_indirect( struct ureg_src reg, struct ureg_src addr,
|
|||
return reg;
|
||||
}
|
||||
|
||||
static INLINE struct ureg_src
|
||||
static inline struct ureg_src
|
||||
ureg_src_array_offset(struct ureg_src reg, int offset)
|
||||
{
|
||||
reg.Index += offset;
|
||||
return reg;
|
||||
}
|
||||
|
||||
static INLINE struct ureg_dst
|
||||
static inline struct ureg_dst
|
||||
ureg_dst_array_offset( struct ureg_dst reg, int offset )
|
||||
{
|
||||
reg.Index += offset;
|
||||
return reg;
|
||||
}
|
||||
|
||||
static INLINE struct ureg_dst
|
||||
static inline struct ureg_dst
|
||||
ureg_dst_array_register(unsigned file,
|
||||
unsigned index,
|
||||
unsigned array_id)
|
||||
|
@ -1224,14 +1224,14 @@ ureg_dst_array_register(unsigned file,
|
|||
return dst;
|
||||
}
|
||||
|
||||
static INLINE struct ureg_dst
|
||||
static inline struct ureg_dst
|
||||
ureg_dst_register(unsigned file,
|
||||
unsigned index)
|
||||
{
|
||||
return ureg_dst_array_register(file, index, 0);
|
||||
}
|
||||
|
||||
static INLINE struct ureg_dst
|
||||
static inline struct ureg_dst
|
||||
ureg_dst( struct ureg_src src )
|
||||
{
|
||||
struct ureg_dst dst;
|
||||
|
@ -1265,7 +1265,7 @@ ureg_dst( struct ureg_src src )
|
|||
return dst;
|
||||
}
|
||||
|
||||
static INLINE struct ureg_src
|
||||
static inline struct ureg_src
|
||||
ureg_src_array_register(unsigned file,
|
||||
unsigned index,
|
||||
unsigned array_id)
|
||||
|
@ -1295,14 +1295,14 @@ ureg_src_array_register(unsigned file,
|
|||
return src;
|
||||
}
|
||||
|
||||
static INLINE struct ureg_src
|
||||
static inline struct ureg_src
|
||||
ureg_src_register(unsigned file,
|
||||
unsigned index)
|
||||
{
|
||||
return ureg_src_array_register(file, index, 0);
|
||||
}
|
||||
|
||||
static INLINE struct ureg_src
|
||||
static inline struct ureg_src
|
||||
ureg_src( struct ureg_dst dst )
|
||||
{
|
||||
struct ureg_src src;
|
||||
|
@ -1332,7 +1332,7 @@ ureg_src( struct ureg_dst dst )
|
|||
|
||||
|
||||
|
||||
static INLINE struct ureg_dst
|
||||
static inline struct ureg_dst
|
||||
ureg_dst_undef( void )
|
||||
{
|
||||
struct ureg_dst dst;
|
||||
|
@ -1362,7 +1362,7 @@ ureg_dst_undef( void )
|
|||
return dst;
|
||||
}
|
||||
|
||||
static INLINE struct ureg_src
|
||||
static inline struct ureg_src
|
||||
ureg_src_undef( void )
|
||||
{
|
||||
struct ureg_src src;
|
||||
|
@ -1390,13 +1390,13 @@ ureg_src_undef( void )
|
|||
return src;
|
||||
}
|
||||
|
||||
static INLINE boolean
|
||||
static inline boolean
|
||||
ureg_src_is_undef( struct ureg_src src )
|
||||
{
|
||||
return src.File == TGSI_FILE_NULL;
|
||||
}
|
||||
|
||||
static INLINE boolean
|
||||
static inline boolean
|
||||
ureg_dst_is_undef( struct ureg_dst dst )
|
||||
{
|
||||
return dst.File == TGSI_FILE_NULL;
|
||||
|
|
|
@ -130,12 +130,12 @@ struct translate *translate_create( const struct translate_key *key );
|
|||
|
||||
boolean translate_is_output_format_supported(enum pipe_format format);
|
||||
|
||||
static INLINE int translate_keysize( const struct translate_key *key )
|
||||
static inline int translate_keysize( const struct translate_key *key )
|
||||
{
|
||||
return 2 * sizeof(int) + key->nr_elements * sizeof(struct translate_element);
|
||||
}
|
||||
|
||||
static INLINE int translate_key_compare( const struct translate_key *a,
|
||||
static inline int translate_key_compare( const struct translate_key *a,
|
||||
const struct translate_key *b )
|
||||
{
|
||||
int keysize_a = translate_keysize(a);
|
||||
|
@ -148,7 +148,7 @@ static INLINE int translate_key_compare( const struct translate_key *a,
|
|||
}
|
||||
|
||||
|
||||
static INLINE void translate_key_sanitize( struct translate_key *a )
|
||||
static inline void translate_key_sanitize( struct translate_key *a )
|
||||
{
|
||||
int keysize = translate_keysize(a);
|
||||
char *ptr = (char *)a;
|
||||
|
|
|
@ -49,7 +49,7 @@ struct translate_cache * translate_cache_create( void )
|
|||
}
|
||||
|
||||
|
||||
static INLINE void delete_translates(struct translate_cache *cache)
|
||||
static inline void delete_translates(struct translate_cache *cache)
|
||||
{
|
||||
struct cso_hash *hash = cache->hash;
|
||||
struct cso_hash_iter iter = cso_hash_first_node(hash);
|
||||
|
@ -70,14 +70,14 @@ void translate_cache_destroy(struct translate_cache *cache)
|
|||
}
|
||||
|
||||
|
||||
static INLINE unsigned translate_hash_key_size(struct translate_key *key)
|
||||
static inline unsigned translate_hash_key_size(struct translate_key *key)
|
||||
{
|
||||
unsigned size = sizeof(struct translate_key) -
|
||||
sizeof(struct translate_element) * (TRANSLATE_MAX_ATTRIBS - key->nr_elements);
|
||||
return size;
|
||||
}
|
||||
|
||||
static INLINE unsigned create_key(struct translate_key *key)
|
||||
static inline unsigned create_key(struct translate_key *key)
|
||||
{
|
||||
unsigned hash_key;
|
||||
unsigned size = translate_hash_key_size(key);
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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) ||
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
* Dump primitives
|
||||
*/
|
||||
|
||||
static INLINE void
|
||||
static inline void
|
||||
util_stream_writef(FILE *stream, const char *format, ...)
|
||||
{
|
||||
static char buf[1024];
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 '{'
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue