#include "main/compiler.h"
-static INLINE void
+static inline void
_mesa_ClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha )
{
/* this is used in _mesa_PopAttrib */
ASSERT_NO_FEATURE();
}
-static INLINE void
+static inline void
_mesa_init_accum_dispatch(struct _glapi_table *disp)
{
}
#define _MESA_INIT_ARRAYELT_VTXFMT(vfmt, impl) do { } while (0)
-static INLINE GLboolean
+static inline GLboolean
_ae_create_context( struct gl_context *ctx )
{
return GL_TRUE;
}
-static INLINE void
+static inline void
_ae_destroy_context( struct gl_context *ctx )
{
}
-static INLINE void
+static inline void
_ae_invalidate_state( struct gl_context *ctx, GLuint new_state )
{
}
-static INLINE void
+static inline void
_mesa_install_arrayelt_vtxfmt(struct _glapi_table *disp,
const GLvertexformat *vfmt)
{
#else /* FEATURE_beginend */
-static INLINE void
+static inline void
_mesa_loopback_init_api_table( struct _glapi_table *dest )
{
}
* non-existent.
*/
-static INLINE struct gl_array_object *
+static inline struct gl_array_object *
lookup_arrayobj(struct gl_context *ctx, GLuint id)
{
if (id == 0)
#else /* FEATURE_ATI_fragment_shader */
-static INLINE void
+static inline void
_mesa_init_ati_fragment_shader_dispatch(struct _glapi_table *disp)
{
}
-static INLINE struct ati_fragment_shader *
+static inline struct ati_fragment_shader *
_mesa_new_ati_fragment_shader(struct gl_context *ctx, GLuint id)
{
return NULL;
}
-static INLINE void
+static inline void
_mesa_delete_ati_fragment_shader(struct gl_context *ctx,
struct ati_fragment_shader *s)
{
#else /* FEATURE_attrib_stack */
-static INLINE void
+static inline void
_mesa_PushClientAttrib( GLbitfield mask )
{
ASSERT_NO_FEATURE();
}
-static INLINE void
+static inline void
_mesa_PopClientAttrib( void )
{
ASSERT_NO_FEATURE();
}
-static INLINE void
+static inline void
_mesa_init_attrib_dispatch(struct _glapi_table *disp)
{
}
/* Get first bit set in a bitset.
*/
-static INLINE int
+static inline int
__bitset_ffs(const BITSET_WORD *x, int n)
{
int i;
* \return pointer to pointer to the buffer object bound to \c target in the
* specified context or \c NULL if \c target is invalid.
*/
-static INLINE struct gl_buffer_object **
+static inline struct gl_buffer_object **
get_buffer_target(struct gl_context *ctx, GLenum target)
{
switch (target) {
* \return pointer to the buffer object bound to \c target in the
* specified context or \c NULL if \c target is invalid.
*/
-static INLINE struct gl_buffer_object *
+static inline struct gl_buffer_object *
get_buffer(struct gl_context *ctx, GLenum target)
{
struct gl_buffer_object **bufObj = get_buffer_target(ctx, target);
/** Is the given buffer object currently mapped? */
-static INLINE GLboolean
+static inline GLboolean
_mesa_bufferobj_mapped(const struct gl_buffer_object *obj)
{
return obj->Pointer != NULL;
* Mesa uses default buffer objects in several places. Default buffers
* always have Name==0. User created buffers have Name!=0.
*/
-static INLINE GLboolean
+static inline GLboolean
_mesa_is_bufferobj(const struct gl_buffer_object *obj)
{
return obj->Name != 0;
struct gl_buffer_object **ptr,
struct gl_buffer_object *bufObj);
-static INLINE void
+static inline void
_mesa_reference_buffer_object(struct gl_context *ctx,
struct gl_buffer_object **ptr,
struct gl_buffer_object *bufObj)
#else /* FEATURE_colortable */
-static INLINE void GLAPIENTRY
+static inline void GLAPIENTRY
_mesa_ColorTable( GLenum target, GLenum internalformat,
GLsizei width, GLenum format, GLenum type,
const GLvoid *table )
ASSERT_NO_FEATURE();
}
-static INLINE void GLAPIENTRY
+static inline void GLAPIENTRY
_mesa_ColorSubTable( GLenum target, GLsizei start,
GLsizei count, GLenum format, GLenum type,
const GLvoid *table )
ASSERT_NO_FEATURE();
}
-static INLINE void
+static inline void
_mesa_init_colortable_dispatch(struct _glapi_table *disp)
{
}
#else /* FEATURE_convolve */
-static INLINE void
+static inline void
_mesa_init_convolve_dispatch(struct _glapi_table *disp)
{
}
/**
* Lookup function to just encapsulate casting.
*/
-static INLINE struct gl_display_list *
+static inline struct gl_display_list *
lookup_list(struct gl_context *ctx, GLuint list)
{
return (struct gl_display_list *)
/** Is the given opcode an extension code? */
-static INLINE GLboolean
+static inline GLboolean
is_ext_opcode(OpCode opcode)
{
return (opcode >= OPCODE_EXT_0);
* \param nparams number of function parameters
* \return pointer to start of instruction space
*/
-static INLINE Node *
+static inline Node *
alloc_instruction(struct gl_context *ctx, OpCode opcode, GLuint nparams)
{
return dlist_alloc(ctx, opcode, nparams * sizeof(Node));
save_Attr1fNV(VERT_ATTRIB_EDGEFLAG, x ? (GLfloat)1.0 : (GLfloat)0.0);
}
-static INLINE GLboolean compare4fv( const GLfloat *a,
+static inline GLboolean compare4fv( const GLfloat *a,
const GLfloat *b,
GLuint count )
{
#define _MESA_INIT_DLIST_VTXFMT(vfmt, impl) do { } while (0)
-static INLINE void
+static inline void
_mesa_delete_list(struct gl_context *ctx, struct gl_display_list *dlist)
{
/* there should be no list to delete */
ASSERT_NO_FEATURE();
}
-static INLINE void
+static inline void
_mesa_install_dlist_vtxfmt(struct _glapi_table *disp,
const GLvertexformat *vfmt)
{
}
-static INLINE void
+static inline void
_mesa_init_dlist_dispatch(struct _glapi_table *disp)
{
}
#else /* FEATURE_drawpix */
-static INLINE void
+static inline void
_mesa_init_drawpix_dispatch(struct _glapi_table *disp)
{
}
#define _MESA_INIT_EVAL_VTXFMT(vfmt, impl) do { } while (0)
-static INLINE void
+static inline void
_mesa_install_eval_vtxfmt(struct _glapi_table *disp,
const GLvertexformat *vfmt)
{
}
-static INLINE void
+static inline void
_mesa_init_eval_dispatch(struct _glapi_table *disp)
{
}
static struct gl_framebuffer IncompleteFramebuffer;
-static INLINE GLboolean
+static inline GLboolean
is_cube_face(GLenum target)
{
return (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X &&
/**
* Is the given FBO a user-created FBO?
*/
-static INLINE GLboolean
+static inline GLboolean
is_user_fbo(const struct gl_framebuffer *fb)
{
return fb->Name != 0;
/**
* Is the given FBO a window system FBO (like an X window)?
*/
-static INLINE GLboolean
+static inline GLboolean
is_winsys_fbo(const struct gl_framebuffer *fb)
{
return fb->Name == 0;
/** Return the texture image for a renderbuffer attachment */
-static INLINE struct gl_texture_image *
+static inline struct gl_texture_image *
_mesa_get_attachment_teximage(struct gl_renderbuffer_attachment *att)
{
assert(att->Type == GL_TEXTURE);
/** Return the (const) texture image for a renderbuffer attachment */
-static INLINE const struct gl_texture_image *
+static inline const struct gl_texture_image *
_mesa_get_attachment_teximage_const(const struct gl_renderbuffer_attachment *att)
{
assert(att->Type == GL_TEXTURE);
* Verifies there is free space in the buffer to write the value and
* increments the pointer.
*/
-static INLINE void
+static inline void
write_record(struct gl_context *ctx, GLuint value)
{
if (ctx->Select.BufferCount < ctx->Select.BufferSize) {
const GLfloat texcoord[4] );
-static INLINE void
+static inline void
_mesa_feedback_token( struct gl_context *ctx, GLfloat token )
{
if (ctx->Feedback.Count < ctx->Feedback.BufferSize) {
#include "main/compiler.h"
-static INLINE void
+static inline void
_mesa_feedback_vertex( struct gl_context *ctx,
const GLfloat win[4],
const GLfloat color[4],
}
-static INLINE void
+static inline void
_mesa_feedback_token( struct gl_context *ctx, GLfloat token )
{
/* render mode is always GL_RENDER */
ASSERT_NO_FEATURE();
}
-static INLINE void
+static inline void
_mesa_update_hitflag( struct gl_context *ctx, GLfloat z )
{
/* render mode is always GL_RENDER */
ASSERT_NO_FEATURE();
}
-static INLINE void
+static inline void
_mesa_init_feedback_dispatch(struct _glapi_table *disp)
{
}
* linear RGB value in [0, 1].
* Implemented with a 256-entry lookup table.
*/
-static INLINE GLfloat
+static inline GLfloat
nonlinear_to_linear(GLubyte cs8)
{
static GLfloat table[256];
_mesa_reference_framebuffer_(struct gl_framebuffer **ptr,
struct gl_framebuffer *fb);
-static INLINE void
+static inline void
_mesa_reference_framebuffer(struct gl_framebuffer **ptr,
struct gl_framebuffer *fb)
{
* Lookup an entry in the hash table, without locking.
* \sa _mesa_HashLookup
*/
-static INLINE void *
+static inline void *
_mesa_HashLookup_unlocked(struct _mesa_HashTable *table, GLuint key)
{
GLuint pos;
#else /* FEATURE_histogram */
-static INLINE void
+static inline void
_mesa_init_histogram_dispatch(struct _glapi_table *disp)
{
}
/**
* Clip dst coords against Xmax (or Ymax).
*/
-static INLINE void
+static inline void
clip_right_or_top(GLint *srcX0, GLint *srcX1,
GLint *dstX0, GLint *dstX1,
GLint maxValue)
/**
* Clip dst coords against Xmin (or Ymin).
*/
-static INLINE void
+static inline void
clip_left_or_bottom(GLint *srcX0, GLint *srcX1,
GLint *dstX0, GLint *dstX1,
GLint minValue)
#endif
#if defined(_MSC_VER)
-static INLINE float truncf(float x) { return x < 0.0f ? ceilf(x) : floorf(x); }
-static INLINE float exp2f(float x) { return powf(2.0f, x); }
-static INLINE float log2f(float x) { return logf(x) * 1.442695041f; }
-static INLINE float asinhf(float x) { return logf(x + sqrtf(x * x + 1.0f)); }
-static INLINE float acoshf(float x) { return logf(x + sqrtf(x * x - 1.0f)); }
-static INLINE float atanhf(float x) { return (logf(1.0f + x) - logf(1.0f - x)) / 2.0f; }
-static INLINE int isblank(int ch) { return ch == ' ' || ch == '\t'; }
+static inline float truncf(float x) { return x < 0.0f ? ceilf(x) : floorf(x); }
+static inline float exp2f(float x) { return powf(2.0f, x); }
+static inline float log2f(float x) { return logf(x) * 1.442695041f; }
+static inline float asinhf(float x) { return logf(x + sqrtf(x * x + 1.0f)); }
+static inline float acoshf(float x) { return logf(x + sqrtf(x * x - 1.0f)); }
+static inline float atanhf(float x) { return (logf(1.0f + x) - logf(1.0f - x)) / 2.0f; }
+static inline int isblank(int ch) { return ch == ' ' || ch == '\t'; }
#define strtoll(p, e, b) _strtoi64(p, e, b)
#endif
/*@}*/
/* This is pretty fast, but not accurate enough (only 2 fractional bits).
* Based on code from http://www.stereopsis.com/log2.html
*/
-static INLINE GLfloat LOG2(GLfloat x)
+static inline GLfloat LOG2(GLfloat x)
{
const GLfloat y = x * x * x * x;
const GLuint ix = *((GLuint *) &y);
/* Pretty fast, and accurate.
* Based on code from http://www.flipcode.com/totd/
*/
-static INLINE GLfloat LOG2(GLfloat val)
+static inline GLfloat LOG2(GLfloat val)
{
fi_type num;
GLint log_2;
*** IS_INF_OR_NAN: test if float is infinite or NaN
***/
#ifdef USE_IEEE
-static INLINE int IS_INF_OR_NAN( float x )
+static inline int IS_INF_OR_NAN( float x )
{
fi_type tmp;
tmp.f = x;
*** IS_NEGATIVE: test if float is negative
***/
#if defined(USE_IEEE)
-static INLINE int GET_FLOAT_BITS( float x )
+static inline int GET_FLOAT_BITS( float x )
{
fi_type fi;
fi.f = x;
*** IROUND: return (as an integer) float rounded to nearest integer
***/
#if defined(USE_X86_ASM) && defined(__GNUC__) && defined(__i386__)
-static INLINE int iround(float f)
+static inline int iround(float f)
{
int r;
__asm__ ("fistpl %0" : "=m" (r) : "t" (f) : "st");
}
#define IROUND(x) iround(x)
#elif defined(USE_X86_ASM) && defined(_MSC_VER)
-static INLINE int iround(float f)
+static inline int iround(float f)
{
int r;
_asm {
* but uses some IEEE specific tricks for better speed.
* Contributed by Josh Vanderhoof
*/
-static INLINE int ifloor(float f)
+static inline int ifloor(float f)
{
int ai, bi;
double af, bf;
}
#define IFLOOR(x) ifloor(x)
#elif defined(USE_IEEE)
-static INLINE int ifloor(float f)
+static inline int ifloor(float f)
{
int ai, bi;
double af, bf;
}
#define IFLOOR(x) ifloor(x)
#else
-static INLINE int ifloor(float f)
+static inline int ifloor(float f)
{
int i = IROUND(f);
return (i > f) ? i - 1 : i;
* but uses some IEEE specific tricks for better speed.
* Contributed by Josh Vanderhoof
*/
-static INLINE int iceil(float f)
+static inline int iceil(float f)
{
int ai, bi;
double af, bf;
}
#define ICEIL(x) iceil(x)
#elif defined(USE_IEEE)
-static INLINE int iceil(float f)
+static inline int iceil(float f)
{
int ai, bi;
double af, bf;
}
#define ICEIL(x) iceil(x)
#else
-static INLINE int iceil(float f)
+static inline int iceil(float f)
{
int i = IROUND(f);
return (i < f) ? i + 1 : i;
/**
* Is x a power of two?
*/
-static INLINE int
+static inline int
_mesa_is_pow_two(int x)
{
return !(x & (x - 1));
* results would be different depending on optimization
* level used for build.
*/
-static INLINE int32_t
+static inline int32_t
_mesa_next_pow_two_32(uint32_t x)
{
#if defined(__GNUC__) && \
#endif
}
-static INLINE int64_t
+static inline int64_t
_mesa_next_pow_two_64(uint64_t x)
{
#if defined(__GNUC__) && \
/*
* Returns the floor form of binary logarithm for a 32-bit integer.
*/
-static INLINE GLuint
+static inline GLuint
_mesa_logbase2(GLuint n)
{
#if defined(__GNUC__) && \
/**
* Return 1 if this is a little endian machine, 0 if big endian.
*/
-static INLINE GLboolean
+static inline GLboolean
_mesa_little_endian(void)
{
const GLuint ui = 1; /* intentionally not static */
}
-static INLINE int
+static inline int
Join2Blocks(struct mem_block *p)
{
/* XXX there should be some assertions here */
* (VERT_RESULT_PSIZ, VERT_RESULT_BFC0, VERT_RESULT_BFC1, and
* VERT_RESULT_EDGE) are converted to a value of -1.
*/
-static INLINE int
+static inline int
_mesa_vert_result_to_frag_attrib(gl_vert_result vert_result)
{
if (vert_result >= VERT_RESULT_CLIP_DIST0)
* gl_frag_attrib values which have no corresponding gl_vert_result
* (FRAG_ATTRIB_FACE and FRAG_ATTRIB_PNTC) are converted to a value of -1.
*/
-static INLINE int
+static inline int
_mesa_frag_attrib_to_vert_result(gl_frag_attrib frag_attrib)
{
if (frag_attrib <= FRAG_ATTRIB_TEX7)
}
-static INLINE GLuint
+static inline GLuint
clamp_byte_to_uint(GLbyte b)
{
return b < 0 ? 0 : b;
}
-static INLINE GLuint
+static inline GLuint
clamp_short_to_uint(GLshort s)
{
return s < 0 ? 0 : s;
}
-static INLINE GLuint
+static inline GLuint
clamp_int_to_uint(GLint i)
{
return i < 0 ? 0 : i;
}
-static INLINE GLuint
+static inline GLuint
clamp_float_to_uint(GLfloat f)
{
return f < 0.0F ? 0 : IROUND(f);
}
-static INLINE GLuint
+static inline GLuint
clamp_half_to_uint(GLhalfARB h)
{
GLfloat f = _mesa_half_to_float(h);
}
-static INLINE void
+static inline void
_mesa_update_pixel(struct gl_context *ctx, GLuint newstate)
{
}
-static INLINE void
+static inline void
_mesa_init_pixel_dispatch(struct _glapi_table *disp)
{
}
#if FEATURE_queryobj
-static INLINE struct gl_query_object *
+static inline struct gl_query_object *
_mesa_lookup_query_object(struct gl_context *ctx, GLuint id)
{
return (struct gl_query_object *)
#else /* FEATURE_queryobj */
-static INLINE struct gl_query_object *
+static inline struct gl_query_object *
_mesa_lookup_query_object(struct gl_context *ctx, GLuint id)
{
return NULL;
}
-static INLINE void
+static inline void
_mesa_init_query_object_functions(struct dd_function_table *driver)
{
}
-static INLINE void
+static inline void
_mesa_init_queryobj_dispatch(struct _glapi_table *disp)
{
}
#else /* FEATURE_rastpos */
-static INLINE void
+static inline void
_mesa_init_rastpos_dispatch(struct _glapi_table *disp)
{
}
#else /* FEATURE_remap_table */
-static INLINE const char *
+static inline const char *
_mesa_get_function_spec(int func_index)
{
return NULL;
}
-static INLINE int
+static inline int
_mesa_map_function_spec(const char *spec)
{
return -1;
}
-static INLINE void
+static inline void
_mesa_map_function_array(const struct gl_function_remap *func_array)
{
}
-static INLINE void
+static inline void
_mesa_map_static_functions(void)
{
}
-static INLINE void
+static inline void
_mesa_init_remap_table(void)
{
}
_mesa_reference_renderbuffer_(struct gl_renderbuffer **ptr,
struct gl_renderbuffer *rb);
-static INLINE void
+static inline void
_mesa_reference_renderbuffer(struct gl_renderbuffer **ptr,
struct gl_renderbuffer *rb)
{
/**
* This is called just prior to changing any sampler object state.
*/
-static INLINE void
+static inline void
flush(struct gl_context *ctx)
{
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
struct dd_function_table;
-static INLINE struct gl_sampler_object *
+static inline struct gl_sampler_object *
_mesa_get_samplerobj(struct gl_context *ctx, GLuint unit)
{
if (ctx->Texture.Unit[unit].Sampler)
_mesa_free_shader_state(struct gl_context *ctx);
-static INLINE gl_shader_type
+static inline gl_shader_type
_mesa_shader_type_to_index(GLenum v)
{
switch (v) {
}
-static INLINE GLenum
+static inline GLenum
_mesa_shader_index_to_type(GLuint i)
{
static const GLenum enums[MESA_SHADER_TYPES] = {
/**
* Is the secondary color needed?
*/
-static INLINE GLboolean
+static inline GLboolean
_mesa_need_secondary_color(const struct gl_context *ctx)
{
if (ctx->Light.Enabled &&
#include "main/compiler.h"
-static INLINE void
+static inline void
_mesa_init_sync_object_functions(struct dd_function_table *driver)
{
}
-static INLINE void
+static inline void
_mesa_init_sync_dispatch(struct _glapi_table *disp)
{
}
-static INLINE void
+static inline void
_mesa_init_sync(struct gl_context *ctx)
{
}
-static INLINE void
+static inline void
_mesa_free_sync_data(struct gl_context *ctx)
{
}
-static INLINE void
+static inline void
_mesa_ref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj)
{
ASSERT_NO_FEATURE();
}
-static INLINE void
+static inline void
_mesa_unref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj)
{
ASSERT_NO_FEATURE();
* linear RGB value in [0, 1].
* Implemented with a 256-entry lookup table.
*/
-static INLINE GLfloat
+static inline GLfloat
nonlinear_to_linear(GLubyte cs8)
{
static GLfloat table[256];
#define _mesa_fetch_texel_2d_f_srgba_dxt3 NULL
#define _mesa_fetch_texel_2d_f_srgba_dxt5 NULL
-static INLINE void
+static inline void
_mesa_init_texture_s3tc(struct gl_context *ctx)
{
}
{
}
-static void INLINE
+static void inline
_mesa_TexGeni( GLenum coord, GLenum pname, GLint param )
{
}
-static INLINE void
+static inline void
_mesa_init_texgen_dispatch(struct _glapi_table *disp)
{
}
/**
* Can the given type represent negative values?
*/
-static INLINE GLboolean
+static inline GLboolean
type_with_negative_values(GLenum type)
{
switch (type) {
* changed the texture base level image, regenerate the rest of the
* mipmap levels now.
*/
-static INLINE void
+static inline void
check_gen_mipmap(struct gl_context *ctx, GLenum target,
struct gl_texture_object *texObj, GLint level)
{
/**
* Lock a texture for updating. See also _mesa_lock_context_textures().
*/
-static INLINE void
+static inline void
_mesa_lock_texture(struct gl_context *ctx, struct gl_texture_object *texObj)
{
_glthread_LOCK_MUTEX(ctx->Shared->TexMutex);
(void) texObj;
}
-static INLINE void
+static inline void
_mesa_unlock_texture(struct gl_context *ctx, struct gl_texture_object *texObj)
{
(void) texObj;
_mesa_reference_texobj_(struct gl_texture_object **ptr,
struct gl_texture_object *tex);
-static INLINE void
+static inline void
_mesa_reference_texobj(struct gl_texture_object **ptr,
struct gl_texture_object *tex)
{
* This is called just prior to changing any texture object state which
* will not effect texture completeness.
*/
-static INLINE void
+static inline void
flush(struct gl_context *ctx)
{
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
* state flag and then mark the texture object as 'incomplete' so that any
* per-texture derived state gets recomputed.
*/
-static INLINE void
+static inline void
incomplete(struct gl_context *ctx, struct gl_texture_object *texObj)
{
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
* Return pointer to current texture unit.
* This the texture unit set by glActiveTexture(), not glClientActiveTexture().
*/
-static INLINE struct gl_texture_unit *
+static inline struct gl_texture_unit *
_mesa_get_current_tex_unit(struct gl_context *ctx)
{
ASSERT(ctx->Texture.CurrentUnit < Elements(ctx->Texture.Unit));
#else /* FEATURE_EXT_transform_feedback */
-static INLINE GLboolean
+static inline GLboolean
_mesa_validate_primitive_mode(struct gl_context *ctx, GLenum mode)
{
return GL_TRUE;
}
-static INLINE GLboolean
+static inline GLboolean
_mesa_validate_transform_feedback_buffers(struct gl_context *ctx)
{
return GL_TRUE;
}
-static INLINE void
+static inline void
_mesa_init_transform_feedback_functions(struct dd_function_table *driver)
{
}
-static INLINE void
+static inline void
_mesa_init_transform_feedback_dispatch(struct _glapi_table *disp)
{
}
* The array->_MaxElement field will be updated.
* Later in glDrawArrays/Elements/etc we can do some bounds checking.
*/
-static INLINE void
+static inline void
_mesa_update_array_max_element(struct gl_client_array *array)
{
assert(array->Enabled);
#else /* FEATURE_beginend */
-static INLINE void
+static inline void
_mesa_install_exec_vtxfmt( struct gl_context *ctx, const GLvertexformat *vfmt )
{
}
-static INLINE void
+static inline void
_mesa_install_save_vtxfmt( struct gl_context *ctx, const GLvertexformat *vfmt )
{
}
* Return TRUE for +0 and other positive values, FALSE otherwise.
* Used for RCC opcode.
*/
-static INLINE GLboolean
+static inline GLboolean
positive(float x)
{
fi_type fi;
* Return a pointer to the 4-element float vector specified by the given
* source register.
*/
-static INLINE const GLfloat *
+static inline const GLfloat *
get_src_register_pointer(const struct prog_src_register *source,
const struct gl_program_machine *machine)
{
* Return a pointer to the 4-element float vector specified by the given
* destination register.
*/
-static INLINE GLfloat *
+static inline GLfloat *
get_dst_register_pointer(const struct prog_dst_register *dest,
struct gl_program_machine *machine)
{
/**
* Fetch texel from texture. Use partial derivatives when possible.
*/
-static INLINE void
+static inline void
fetch_texel(struct gl_context *ctx,
const struct gl_program_machine *machine,
const struct prog_instruction *inst,
/**
* Test value against zero and return GT, LT, EQ or UN if NaN.
*/
-static INLINE GLuint
+static inline GLuint
generate_cc(float value)
{
if (value != value)
* Test if the ccMaskRule is satisfied by the given condition code.
* Used to mask destination writes according to the current condition code.
*/
-static INLINE GLboolean
+static inline GLboolean
test_cc(GLuint condCode, GLuint ccMaskRule)
{
switch (ccMaskRule) {
* Evaluate the 4 condition codes against a predicate and return GL_TRUE
* or GL_FALSE to indicate result.
*/
-static INLINE GLboolean
+static inline GLboolean
eval_condition(const struct gl_program_machine *machine,
const struct prog_instruction *inst)
{
_mesa_combine_parameter_lists(const struct gl_program_parameter_list *a,
const struct gl_program_parameter_list *b);
-static INLINE GLuint
+static inline GLuint
_mesa_num_parameters(const struct gl_program_parameter_list *list)
{
return list ? list->NumParameters : 0;
struct gl_program **ptr,
struct gl_program *prog);
-static INLINE void
+static inline void
_mesa_reference_program(struct gl_context *ctx,
struct gl_program **ptr,
struct gl_program *prog)
_mesa_reference_program_(ctx, ptr, prog);
}
-static INLINE void
+static inline void
_mesa_reference_vertprog(struct gl_context *ctx,
struct gl_vertex_program **ptr,
struct gl_vertex_program *prog)
(struct gl_program *) prog);
}
-static INLINE void
+static inline void
_mesa_reference_fragprog(struct gl_context *ctx,
struct gl_fragment_program **ptr,
struct gl_fragment_program *prog)
(struct gl_program *) prog);
}
-static INLINE void
+static inline void
_mesa_reference_geomprog(struct gl_context *ctx,
struct gl_geometry_program **ptr,
struct gl_geometry_program *prog)
extern struct gl_program *
_mesa_clone_program(struct gl_context *ctx, const struct gl_program *prog);
-static INLINE struct gl_vertex_program *
+static inline struct gl_vertex_program *
_mesa_clone_vertex_program(struct gl_context *ctx,
const struct gl_vertex_program *prog)
{
return (struct gl_vertex_program *) _mesa_clone_program(ctx, &prog->Base);
}
-static INLINE struct gl_geometry_program *
+static inline struct gl_geometry_program *
_mesa_clone_geometry_program(struct gl_context *ctx,
const struct gl_geometry_program *prog)
{
return (struct gl_geometry_program *) _mesa_clone_program(ctx, &prog->Base);
}
-static INLINE struct gl_fragment_program *
+static inline struct gl_fragment_program *
_mesa_clone_fragment_program(struct gl_context *ctx,
const struct gl_fragment_program *prog)
{
/* keep these in the same order as TGSI_PROCESSOR_* */
-static INLINE GLuint
+static inline GLuint
_mesa_program_target_to_index(GLenum v)
{
switch(v)
}
}
-static INLINE GLenum
+static inline GLenum
_mesa_program_index_to_target(GLuint i)
{
GLenum enums[MESA_SHADER_TYPES] = {
}
-static INLINE void
+static inline void
constant_plane(GLfloat value, GLfloat plane[4])
{
plane[0] = 0.0;
}
-static INLINE GLfloat
+static inline GLfloat
solve_plane(GLfloat x, GLfloat y, const GLfloat plane[4])
{
const GLfloat z = (plane[3] + plane[0] * x + plane[1] * y) / -plane[2];
/*
* Return 1 / solve_plane().
*/
-static INLINE GLfloat
+static inline GLfloat
solve_plane_recip(GLfloat x, GLfloat y, const GLfloat plane[4])
{
const GLfloat denom = plane[3] + plane[0] * x + plane[1] * y;
/*
* Solve plane and return clamped GLchan value.
*/
-static INLINE GLchan
+static inline GLchan
solve_plane_chan(GLfloat x, GLfloat y, const GLfloat plane[4])
{
const GLfloat z = (plane[3] + plane[0] * x + plane[1] * y) / -plane[2];
/*
* Compute mipmap level of detail.
*/
-static INLINE GLfloat
+static inline GLfloat
compute_lambda(const GLfloat sPlane[4], const GLfloat tPlane[4],
GLfloat invQ, GLfloat width, GLfloat height)
{
* vertices and the given Z values.
* A point (x,y,z) lies on plane iff a*x+b*y+c*z+d = 0.
*/
-static INLINE void
+static inline void
compute_plane(const GLfloat v0[], const GLfloat v1[], const GLfloat v2[],
GLfloat z0, GLfloat z1, GLfloat z2, GLfloat plane[4])
{
/*
* Compute coefficients of a plane with a constant Z value.
*/
-static INLINE void
+static inline void
constant_plane(GLfloat value, GLfloat plane[4])
{
plane[0] = 0.0;
/*
* Solve plane equation for Z at (X,Y).
*/
-static INLINE GLfloat
+static inline GLfloat
solve_plane(GLfloat x, GLfloat y, const GLfloat plane[4])
{
ASSERT(plane[2] != 0.0F);
/*
* Return 1 / solve_plane().
*/
-static INLINE GLfloat
+static inline GLfloat
solve_plane_recip(GLfloat x, GLfloat y, const GLfloat plane[4])
{
const GLfloat denom = plane[3] + plane[0] * x + plane[1] * y;
/*
* Solve plane and return clamped GLchan value.
*/
-static INLINE GLchan
+static inline GLchan
solve_plane_chan(GLfloat x, GLfloat y, const GLfloat plane[4])
{
const GLfloat z = (plane[3] + plane[0] * x + plane[1] * y) / -plane[2];
}
-static INLINE GLfloat
+static inline GLfloat
plane_dx(const GLfloat plane[4])
{
return -plane[0] / plane[2];
}
-static INLINE GLfloat
+static inline GLfloat
plane_dy(const GLfloat plane[4])
{
return -plane[1] / plane[2];
#define LERP(T, A, B) ( (A) + (T) * ((B) - (A)) )
-static INLINE GLfloat
+static inline GLfloat
lerp_2d(GLfloat a, GLfloat b,
GLfloat v00, GLfloat v10, GLfloat v01, GLfloat v11)
{
/** cast wrapper */
-static INLINE struct swrast_texture_image *
+static inline struct swrast_texture_image *
swrast_texture_image(struct gl_texture_image *img)
{
return (struct swrast_texture_image *) img;
}
/** cast wrapper */
-static INLINE const struct swrast_texture_image *
+static inline const struct swrast_texture_image *
swrast_texture_image_const(const struct gl_texture_image *img)
{
return (const struct swrast_texture_image *) img;
/** Return SWcontext for the given struct gl_context */
-static INLINE SWcontext *
+static inline SWcontext *
SWRAST_CONTEXT(struct gl_context *ctx)
{
return (SWcontext *) ctx->swrast_context;
}
/** const version of above */
-static INLINE const SWcontext *
+static inline const SWcontext *
CONST_SWRAST_CONTEXT(const struct gl_context *ctx)
{
return (const SWcontext *) ctx->swrast_context;
* For drivers that rely on swrast for fallback rendering, this is the
* driver's opportunity to map renderbuffers and textures.
*/
-static INLINE void
+static inline void
swrast_render_start(struct gl_context *ctx)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
/** Called after framebuffer reading/writing */
-static INLINE void
+static inline void
swrast_render_finish(struct gl_context *ctx)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
* Apply texture object's swizzle (X/Y/Z/W/0/1) to incoming 'texel'
* and return results in 'colorOut'.
*/
-static INLINE void
+static inline void
swizzle_texel(const GLfloat texel[4], GLfloat colorOut[4], GLuint swizzle)
{
if (swizzle == SWIZZLE_NOOP) {
-static INLINE void
+static inline void
logicop_uint1(struct gl_context *ctx, GLuint n, GLuint src[], const GLuint dest[],
const GLubyte mask[])
{
}
-static INLINE void
+static inline void
logicop_uint2(struct gl_context *ctx, GLuint n, GLuint src[], const GLuint dest[],
const GLubyte mask[])
{
}
-static INLINE void
+static inline void
logicop_uint4(struct gl_context *ctx, GLuint n, GLuint src[], const GLuint dest[],
const GLubyte mask[])
{
* or just the glPointSize value.
* Must also clamp to user-defined range and implmentation limits.
*/
-static INLINE GLfloat
+static inline GLfloat
get_size(const struct gl_context *ctx, const SWvertex *vert, GLboolean smoothed)
{
GLfloat size;
* Perspective correction will be done. The point/line/triangle function
* should have computed attrStart/Step values for FRAG_ATTRIB_WPOS[3]!
*/
-static INLINE void
+static inline void
interpolate_active_attribs(struct gl_context *ctx, SWspan *span, GLbitfield attrMask)
{
const SWcontext *swrast = SWRAST_CONTEXT(ctx);
* Interpolate primary colors to fill in the span->array->rgba8 (or rgb16)
* color array.
*/
-static INLINE void
+static inline void
interpolate_int_colors(struct gl_context *ctx, SWspan *span)
{
#if CHAN_BITS != 32
/**
* Populate the FRAG_ATTRIB_COL0 array.
*/
-static INLINE void
+static inline void
interpolate_float_colors(SWspan *span)
{
GLfloat (*col0)[4] = span->array->attribs[FRAG_ATTRIB_COL0];
/**
* Fill in the arrays->attribs[FRAG_ATTRIB_WPOS] array.
*/
-static INLINE void
+static inline void
interpolate_wpos(struct gl_context *ctx, SWspan *span)
{
GLfloat (*wpos)[4] = span->array->attribs[FRAG_ATTRIB_WPOS];
/**
* Apply the current polygon stipple pattern to a span of pixels.
*/
-static INLINE void
+static inline void
stipple_polygon_span(struct gl_context *ctx, SWspan *span)
{
GLubyte *mask = span->array->mask;
* Return: GL_TRUE some pixels still visible
* GL_FALSE nothing visible
*/
-static INLINE GLuint
+static inline GLuint
clip_span( struct gl_context *ctx, SWspan *span )
{
const GLint xmin = ctx->DrawBuffer->_Xmin;
* Only called during fixed-function operation.
* Result is float color array (FRAG_ATTRIB_COL0).
*/
-static INLINE void
+static inline void
add_specular(struct gl_context *ctx, SWspan *span)
{
const SWcontext *swrast = SWRAST_CONTEXT(ctx);
/**
* Apply antialiasing coverage value to alpha values.
*/
-static INLINE void
+static inline void
apply_aa_coverage(SWspan *span)
{
const GLfloat *coverage = span->array->coverage;
/**
* Clamp span's float colors to [0,1]
*/
-static INLINE void
+static inline void
clamp_colors(SWspan *span)
{
GLfloat (*rgba)[4] = span->array->attribs[FRAG_ATTRIB_COL0];
* program that writes to gl_FragData[1] or higher.
* \param output which fragment program color output is being processed
*/
-static INLINE void
+static inline void
convert_color_type(SWspan *span, GLenum newType, GLuint output)
{
GLvoid *src, *dst;
/**
* Apply fragment shader, fragment program or normal texturing to span.
*/
-static INLINE void
+static inline void
shade_texture_span(struct gl_context *ctx, SWspan *span)
{
if (ctx->FragmentProgram._Current ||
* Compute the zpass/zfail masks by comparing the pre- and post-depth test
* masks.
*/
-static INLINE void
+static inline void
compute_pass_fail_masks(GLuint n, const GLubyte origMask[],
const GLubyte newMask[],
GLubyte passMask[], GLubyte failMask[])
/**
* Return array of texels for given unit.
*/
-static INLINE float4_array
+static inline float4_array
get_texel_array(SWcontext *swrast, GLuint unit)
{
#ifdef _OPENMP
* linear RGB value in [0, 1].
* Implemented with a 256-entry lookup table.
*/
-static INLINE GLfloat
+static inline GLfloat
nonlinear_to_linear(GLubyte cs8)
{
static GLfloat table[256];
* optimization! If we find that's not true on some systems, convert
* to a macro.
*/
-static INLINE GLfloat
+static inline GLfloat
lerp_2d(GLfloat a, GLfloat b,
GLfloat v00, GLfloat v10, GLfloat v01, GLfloat v11)
{
* Do 3D/trilinear interpolation of float values.
* \sa lerp_2d
*/
-static INLINE GLfloat
+static inline GLfloat
lerp_3d(GLfloat a, GLfloat b, GLfloat c,
GLfloat v000, GLfloat v100, GLfloat v010, GLfloat v110,
GLfloat v001, GLfloat v101, GLfloat v011, GLfloat v111)
/**
* Do linear interpolation of colors.
*/
-static INLINE void
+static inline void
lerp_rgba(GLfloat result[4], GLfloat t, const GLfloat a[4], const GLfloat b[4])
{
result[0] = LERP(t, a[0], b[0]);
/**
* Do bilinear interpolation of colors.
*/
-static INLINE void
+static inline void
lerp_rgba_2d(GLfloat result[4], GLfloat a, GLfloat b,
const GLfloat t00[4], const GLfloat t10[4],
const GLfloat t01[4], const GLfloat t11[4])
/**
* Do trilinear interpolation of colors.
*/
-static INLINE void
+static inline void
lerp_rgba_3d(GLfloat result[4], GLfloat a, GLfloat b, GLfloat c,
const GLfloat t000[4], const GLfloat t100[4],
const GLfloat t010[4], const GLfloat t110[4],
* i0, i1 = returns two nearest texel indexes
* weight = returns blend factor between texels
*/
-static INLINE void
+static inline void
linear_texel_locations(GLenum wrapMode,
const struct gl_texture_image *img,
GLint size, GLfloat s,
/**
* Used to compute texel location for nearest sampling.
*/
-static INLINE GLint
+static inline GLint
nearest_texel_location(GLenum wrapMode,
const struct gl_texture_image *img,
GLint size, GLfloat s)
/* Power of two image sizes only */
-static INLINE void
+static inline void
linear_repeat_texel_location(GLuint size, GLfloat s,
GLint *i0, GLint *i1, GLfloat *weight)
{
/**
* Do clamp/wrap for a texture rectangle coord, GL_NEAREST filter mode.
*/
-static INLINE GLint
+static inline GLint
clamp_rect_coord_nearest(GLenum wrapMode, GLfloat coord, GLint max)
{
switch (wrapMode) {
/**
* As above, but GL_LINEAR filtering.
*/
-static INLINE void
+static inline void
clamp_rect_coord_linear(GLenum wrapMode, GLfloat coord, GLint max,
GLint *i0out, GLint *i1out, GLfloat *weight)
{
/**
* Compute slice/image to use for 1D or 2D array texture.
*/
-static INLINE GLint
+static inline GLint
tex_array_slice(GLfloat coord, GLsizei size)
{
GLint slice = IFLOOR(coord + 0.5f);
* Compute nearest integer texcoords for given texobj and coordinate.
* NOTE: only used for depth texture sampling.
*/
-static INLINE void
+static inline void
nearest_texcoord(const struct gl_texture_object *texObj,
GLuint level,
const GLfloat texcoord[4],
* Compute linear integer texcoords for given texobj and coordinate.
* NOTE: only used for depth texture sampling.
*/
-static INLINE void
+static inline void
linear_texcoord(const struct gl_texture_object *texObj,
GLuint level,
const GLfloat texcoord[4],
* For linear interpolation between mipmap levels N and N+1, this function
* computes N.
*/
-static INLINE GLint
+static inline GLint
linear_mipmap_level(const struct gl_texture_object *tObj, GLfloat lambda)
{
if (lambda < 0.0F)
/**
* Compute the nearest mipmap level to take texels from.
*/
-static INLINE GLint
+static inline GLint
nearest_mipmap_level(const struct gl_texture_object *tObj, GLfloat lambda)
{
GLfloat l;
* will be minified, magnified, or split between the two. This function
* determines the subranges in [0, n-1] that are to be minified or magnified.
*/
-static INLINE void
+static inline void
compute_min_mag_ranges(const struct gl_texture_object *tObj,
GLuint n, const GLfloat lambda[],
GLuint *minStart, GLuint *minEnd,
* the base texture format. Ex: if the texture base format it GL_ALPHA,
* we return (0,0,0,BorderAlpha).
*/
-static INLINE void
+static inline void
get_border_color(const struct gl_texture_object *tObj,
const struct gl_texture_image *img,
GLfloat rgba[4])
/**
* Return the texture sample for coordinate (s) using GL_NEAREST filter.
*/
-static INLINE void
+static inline void
sample_1d_nearest(struct gl_context *ctx,
const struct gl_texture_object *tObj,
const struct gl_texture_image *img,
/**
* Return the texture sample for coordinate (s) using GL_LINEAR filter.
*/
-static INLINE void
+static inline void
sample_1d_linear(struct gl_context *ctx,
const struct gl_texture_object *tObj,
const struct gl_texture_image *img,
/**
* Return the texture sample for coordinate (s,t) using GL_NEAREST filter.
*/
-static INLINE void
+static inline void
sample_2d_nearest(struct gl_context *ctx,
const struct gl_texture_object *tObj,
const struct gl_texture_image *img,
* Return the texture sample for coordinate (s,t) using GL_LINEAR filter.
* New sampling code contributed by Lynn Quam <quam@ai.sri.com>.
*/
-static INLINE void
+static inline void
sample_2d_linear(struct gl_context *ctx,
const struct gl_texture_object *tObj,
const struct gl_texture_image *img,
* As above, but we know WRAP_S == REPEAT and WRAP_T == REPEAT.
* We don't have to worry about the texture border.
*/
-static INLINE void
+static inline void
sample_2d_linear_repeat(struct gl_context *ctx,
const struct gl_texture_object *tObj,
const struct gl_texture_image *img,
* Returns the index of the specified texture object in the
* gl_context texture unit array.
*/
-static INLINE GLuint
+static inline GLuint
texture_unit_index(const struct gl_context *ctx,
const struct gl_texture_object *tObj)
{
/**
* Return the texture sample for coordinate (s,t,r) using GL_NEAREST filter.
*/
-static INLINE void
+static inline void
sample_3d_nearest(struct gl_context *ctx,
const struct gl_texture_object *tObj,
const struct gl_texture_image *img,
/**
* Compare texcoord against depth sample. Return 1.0 or the ambient value.
*/
-static INLINE GLfloat
+static inline GLfloat
shadow_compare(GLenum function, GLfloat coord, GLfloat depthSample,
GLfloat ambient)
{
/**
* Compare texcoord against four depth samples.
*/
-static INLINE GLfloat
+static inline GLfloat
shadow_compare4(GLenum function, GLfloat coord,
GLfloat depth00, GLfloat depth01,
GLfloat depth10, GLfloat depth11,
};
-static INLINE GLint
+static inline GLint
ilerp(GLint t, GLint a, GLint b)
{
return a + ((t * (b - a)) >> FIXED_SHIFT);
}
-static INLINE GLint
+static inline GLint
ilerp_2d(GLint ia, GLint ib, GLint v00, GLint v10, GLint v01, GLint v11)
{
const GLint temp0 = ilerp(ia, v00, v10);
* textures with GL_REPLACE, GL_MODULATE, GL_BLEND, GL_DECAL or GL_ADD
* texture env modes.
*/
-static INLINE void
+static inline void
affine_span(struct gl_context *ctx, SWspan *span,
struct affine_info *info)
{
};
-static INLINE void
+static inline void
fast_persp_span(struct gl_context *ctx, SWspan *span,
struct persp_info *info)
{
* return corresponding x coord in the original, unzoomed image.
* This can use this for unzooming X or Y values.
*/
-static INLINE GLint
+static inline GLint
unzoom_x(GLfloat zoomX, GLint imageX, GLint zx)
{
/*
#ifdef NAN_CHECK
/** Check for NaNs and very large values */
-static INLINE void
+static inline void
check_float(float x)
{
assert(!IS_INF_OR_NAN(x));
* NDC->Viewport mapping and store the results at 'v'.
*/
-static INLINE void insert_4f_viewport_4( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_4f_viewport_4( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
GLfloat *out = (GLfloat *)v;
out[3] = in[3];
}
-static INLINE void insert_4f_viewport_3( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_4f_viewport_3( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
GLfloat *out = (GLfloat *)v;
out[3] = 1;
}
-static INLINE void insert_4f_viewport_2( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_4f_viewport_2( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
GLfloat *out = (GLfloat *)v;
out[3] = 1;
}
-static INLINE void insert_4f_viewport_1( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_4f_viewport_1( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
GLfloat *out = (GLfloat *)v;
out[3] = 1;
}
-static INLINE void insert_3f_viewport_3( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_3f_viewport_3( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
GLfloat *out = (GLfloat *)v;
out[2] = vp[10] * in[2] + vp[14];
}
-static INLINE void insert_3f_viewport_2( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_3f_viewport_2( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
GLfloat *out = (GLfloat *)v;
out[2] = vp[14];
}
-static INLINE void insert_3f_viewport_1( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_3f_viewport_1( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
GLfloat *out = (GLfloat *)v;
out[2] = vp[14];
}
-static INLINE void insert_2f_viewport_2( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_2f_viewport_2( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
GLfloat *out = (GLfloat *)v;
out[1] = vp[5] * in[1] + vp[13];
}
-static INLINE void insert_2f_viewport_1( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_2f_viewport_1( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
GLfloat *out = (GLfloat *)v;
* These functions do the same as above, except for the viewport mapping.
*/
-static INLINE void insert_4f_4( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
+static inline void insert_4f_4( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
(void) a;
out[3] = in[3];
}
-static INLINE void insert_4f_3( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
+static inline void insert_4f_3( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
(void) a;
out[3] = 1;
}
-static INLINE void insert_4f_2( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
+static inline void insert_4f_2( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
(void) a;
out[3] = 1;
}
-static INLINE void insert_4f_1( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
+static inline void insert_4f_1( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
(void) a;
out[3] = 1;
}
-static INLINE void insert_3f_xyw_4( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
+static inline void insert_3f_xyw_4( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
(void) a;
out[2] = in[3];
}
-static INLINE void insert_3f_xyw_err( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
+static inline void insert_3f_xyw_err( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
(void) a; (void) v; (void) in;
DEBUG_INSERT;
exit(1);
}
-static INLINE void insert_3f_3( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
+static inline void insert_3f_3( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
(void) a;
out[2] = in[2];
}
-static INLINE void insert_3f_2( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
+static inline void insert_3f_2( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
(void) a;
out[2] = 0;
}
-static INLINE void insert_3f_1( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
+static inline void insert_3f_1( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
(void) a;
}
-static INLINE void insert_2f_2( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
+static inline void insert_2f_2( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
(void) a;
out[1] = in[1];
}
-static INLINE void insert_2f_1( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
+static inline void insert_2f_1( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
(void) a;
out[1] = 0;
}
-static INLINE void insert_1f_1( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
+static inline void insert_1f_1( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
(void) a;
out[0] = in[0];
}
-static INLINE void insert_null( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
+static inline void insert_null( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
DEBUG_INSERT;
(void) a; (void) v; (void) in;
}
-static INLINE void insert_4chan_4f_rgba_4( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_4chan_4f_rgba_4( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
GLchan *c = (GLchan *)v;
UNCLAMPED_FLOAT_TO_CHAN(c[3], in[3]);
}
-static INLINE void insert_4chan_4f_rgba_3( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_4chan_4f_rgba_3( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
GLchan *c = (GLchan *)v;
c[3] = CHAN_MAX;
}
-static INLINE void insert_4chan_4f_rgba_2( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_4chan_4f_rgba_2( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
GLchan *c = (GLchan *)v;
c[3] = CHAN_MAX;
}
-static INLINE void insert_4chan_4f_rgba_1( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_4chan_4f_rgba_1( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
GLchan *c = (GLchan *)v;
c[3] = CHAN_MAX;
}
-static INLINE void insert_4ub_4f_rgba_4( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_4ub_4f_rgba_4( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
UNCLAMPED_FLOAT_TO_UBYTE(v[3], in[3]);
}
-static INLINE void insert_4ub_4f_rgba_3( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_4ub_4f_rgba_3( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
v[3] = 0xff;
}
-static INLINE void insert_4ub_4f_rgba_2( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_4ub_4f_rgba_2( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
v[3] = 0xff;
}
-static INLINE void insert_4ub_4f_rgba_1( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_4ub_4f_rgba_1( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
v[3] = 0xff;
}
-static INLINE void insert_4ub_4f_bgra_4( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_4ub_4f_bgra_4( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
UNCLAMPED_FLOAT_TO_UBYTE(v[3], in[3]);
}
-static INLINE void insert_4ub_4f_bgra_3( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_4ub_4f_bgra_3( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
v[3] = 0xff;
}
-static INLINE void insert_4ub_4f_bgra_2( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_4ub_4f_bgra_2( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
v[3] = 0xff;
}
-static INLINE void insert_4ub_4f_bgra_1( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_4ub_4f_bgra_1( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
v[3] = 0xff;
}
-static INLINE void insert_4ub_4f_argb_4( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_4ub_4f_argb_4( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[3]);
}
-static INLINE void insert_4ub_4f_argb_3( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_4ub_4f_argb_3( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
v[0] = 0xff;
}
-static INLINE void insert_4ub_4f_argb_2( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_4ub_4f_argb_2( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
v[0] = 0xff;
}
-static INLINE void insert_4ub_4f_argb_1( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_4ub_4f_argb_1( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
v[0] = 0xff;
}
-static INLINE void insert_4ub_4f_abgr_4( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_4ub_4f_abgr_4( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[3]);
}
-static INLINE void insert_4ub_4f_abgr_3( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_4ub_4f_abgr_3( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
v[0] = 0xff;
}
-static INLINE void insert_4ub_4f_abgr_2( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_4ub_4f_abgr_2( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
v[0] = 0xff;
}
-static INLINE void insert_4ub_4f_abgr_1( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_4ub_4f_abgr_1( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
v[0] = 0xff;
}
-static INLINE void insert_3ub_3f_rgb_3( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_3ub_3f_rgb_3( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[2]);
}
-static INLINE void insert_3ub_3f_rgb_2( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_3ub_3f_rgb_2( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
v[2] = 0;
}
-static INLINE void insert_3ub_3f_rgb_1( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_3ub_3f_rgb_1( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
v[2] = 0;
}
-static INLINE void insert_3ub_3f_bgr_3( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_3ub_3f_bgr_3( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[2]);
}
-static INLINE void insert_3ub_3f_bgr_2( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_3ub_3f_bgr_2( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
v[0] = 0;
}
-static INLINE void insert_3ub_3f_bgr_1( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_3ub_3f_bgr_1( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
}
-static INLINE void insert_1ub_1f_1( const struct tnl_clipspace_attr *a, GLubyte *v,
+static inline void insert_1ub_1f_1( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
#define MAT_ATTR( A, N, V ) ATTR( A, N, (V)[0], (V)[1], (V)[2], (V)[3] )
-static INLINE float conv_ui10_to_norm_float(unsigned ui10)
+static inline float conv_ui10_to_norm_float(unsigned ui10)
{
return (float)(ui10) / 1023.0;
}
-static INLINE float conv_ui2_to_norm_float(unsigned ui2)
+static inline float conv_ui2_to_norm_float(unsigned ui2)
{
return (float)(ui2) / 3.0;
}
struct attr_bits_10 {signed int x:10;};
struct attr_bits_2 {signed int x:2;};
-static INLINE float conv_i10_to_i(int i10)
+static inline float conv_i10_to_i(int i10)
{
struct attr_bits_10 val;
val.x = i10;
return (float)val.x;
}
-static INLINE float conv_i2_to_i(int i2)
+static inline float conv_i2_to_i(int i2)
{
struct attr_bits_2 val;
val.x = i2;
return (float)val.x;
}
-static INLINE float conv_i10_to_norm_float(int i10)
+static inline float conv_i10_to_norm_float(int i10)
{
struct attr_bits_10 val;
val.x = i10;
return (2.0F * (float)val.x + 1.0F) * (1.0F / 511.0F);
}
-static INLINE float conv_i2_to_norm_float(int i2)
+static inline float conv_i2_to_norm_float(int i2)
{
struct attr_bits_2 val;
val.x = i2;
};
-static INLINE struct vbo_context *vbo_context(struct gl_context *ctx)
+static inline struct vbo_context *vbo_context(struct gl_context *ctx)
{
return (struct vbo_context *)(ctx->swtnl_im);
}
* Return VP_x token to indicate whether we're running fixed-function
* vertex transformation, an NV vertex program or ARB vertex program/shader.
*/
-static INLINE enum vp_mode
+static inline enum vp_mode
get_program_mode( struct gl_context *ctx )
{
if (!ctx->VertexProgram._Current)
#else /* FEATURE_beginend */
-static INLINE void
+static inline void
vbo_exec_vtx_flush( struct vbo_exec_context *exec, GLboolean unmap )
{
}
-static INLINE void
+static inline void
vbo_exec_vtx_map( struct vbo_exec_context *exec )
{
}
#else /* FEATURE_dlist */
-static INLINE void
+static inline void
vbo_save_init( struct gl_context *ctx )
{
}
-static INLINE void
+static inline void
vbo_save_destroy( struct gl_context *ctx )
{
}