int (*GetLoopIncrement) (nvsFunc *);
};
-static inline nvsRegister
+static INLINE nvsRegister
nvsNegate(nvsRegister reg)
{
reg.negate = !reg.negate;
return reg;
}
-static inline nvsRegister
+static INLINE nvsRegister
nvsAbs(nvsRegister reg)
{
reg.abs = 1;
return reg;
}
-static inline nvsRegister
+static INLINE nvsRegister
nvsSwizzle(nvsRegister reg, nvsSwzComp x, nvsSwzComp y,
nvsSwzComp z, nvsSwzComp w)
{
static void nv04ResetLineStipple( GLcontext *ctx );
-static inline void nv04_2triangles(struct nouveau_context *nmesa,nouveauVertex* v0,nouveauVertex* v1,nouveauVertex* v2,nouveauVertex* v3,nouveauVertex* v4,nouveauVertex* v5)
+static INLINE void nv04_2triangles(struct nouveau_context *nmesa,nouveauVertex* v0,nouveauVertex* v1,nouveauVertex* v2,nouveauVertex* v3,nouveauVertex* v4,nouveauVertex* v5)
{
BEGIN_RING_SIZE(NvSub3D,NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_SX(0xA),49);
OUT_RINGp(v0,8);
OUT_RING(0xFEDCBA);
}
-static inline void nv04_1triangle(struct nouveau_context *nmesa,nouveauVertex* v0,nouveauVertex* v1,nouveauVertex* v2)
+static INLINE void nv04_1triangle(struct nouveau_context *nmesa,nouveauVertex* v0,nouveauVertex* v1,nouveauVertex* v2)
{
BEGIN_RING_SIZE(NvSub3D,NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_SX(0xD),25);
OUT_RINGp(v0,8);
OUT_RING(0xFED);
}
-static inline void nv04_1quad(struct nouveau_context *nmesa,nouveauVertex* v0,nouveauVertex* v1,nouveauVertex* v2,nouveauVertex* v3)
+static INLINE void nv04_1quad(struct nouveau_context *nmesa,nouveauVertex* v0,nouveauVertex* v1,nouveauVertex* v2,nouveauVertex* v3)
{
BEGIN_RING_SIZE(NvSub3D,NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_SX(0xC),33);
OUT_RINGp(v0,8);
OUT_RING(0xFECEDC);
}
-static inline void nv04_render_points(GLcontext *ctx,GLuint first,GLuint last)
+static INLINE void nv04_render_points(GLcontext *ctx,GLuint first,GLuint last)
{
WARN_ONCE("Unimplemented\n");
}
-static inline void nv04_render_line(GLcontext *ctx,GLuint v1,GLuint v2)
+static INLINE void nv04_render_line(GLcontext *ctx,GLuint v1,GLuint v2)
{
WARN_ONCE("Unimplemented\n");
}
-static inline void nv04_render_triangle(GLcontext *ctx,GLuint v1,GLuint v2,GLuint v3)
+static INLINE void nv04_render_triangle(GLcontext *ctx,GLuint v1,GLuint v2,GLuint v3)
{
struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx);
GLubyte *vertptr = (GLubyte *)nmesa->verts;
);
}
-static inline void nv04_render_quad(GLcontext *ctx,GLuint v1,GLuint v2,GLuint v3,GLuint v4)
+static INLINE void nv04_render_quad(GLcontext *ctx,GLuint v1,GLuint v2,GLuint v3,GLuint v4)
{
struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx);
GLubyte *vertptr = (GLubyte *)nmesa->verts;
-static inline void nv04OutputVertexFormat(struct nouveau_context* nmesa)
+static INLINE void nv04OutputVertexFormat(struct nouveau_context* nmesa)
{
GLcontext* ctx=nmesa->glCtx;
DECLARE_RENDERINPUTS(index);
#endif
-static inline void nv10StartPrimitive(struct nouveau_context* nmesa,GLuint primitive,GLuint size)
+static INLINE void nv10StartPrimitive(struct nouveau_context* nmesa,GLuint primitive,GLuint size)
{
if ((nmesa->screen->card->type>=NV_10) && (nmesa->screen->card->type<=NV_17))
BEGIN_RING_SIZE(NvSub3D,NV10_TCL_PRIMITIVE_3D_BEGIN_END,1);
}
-static inline void nv10ExtendPrimitive(struct nouveau_context* nmesa, int size)
+static INLINE void nv10ExtendPrimitive(struct nouveau_context* nmesa, int size)
{
/* make sure there's enough room. if not, wait */
if (RING_AVAILABLE()<size)
/* Render unclipped begin/end objects */
/**********************************************************************/
-static inline void nv10_render_generic_primitive_verts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags,GLuint prim)
+static INLINE void nv10_render_generic_primitive_verts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags,GLuint prim)
{
struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx);
GLfloat *vertptr = (GLfloat *)nmesa->verts;
};
-static inline void nv10_render_generic_primitive_elts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags,GLuint prim)
+static INLINE void nv10_render_generic_primitive_elts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags,GLuint prim)
{
struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx);
GLfloat *vertptr = (GLfloat *)nmesa->verts;
nmesa->vertex_attr_count++; \
} while (0)
-static inline void nv10_render_point(GLcontext *ctx, GLfloat *vertptr)
+static INLINE void nv10_render_point(GLcontext *ctx, GLfloat *vertptr)
{
struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx);
GLuint vertsize = nmesa->vertex_size;
nv10FinishPrimitive(nmesa);
}
-static inline void nv10_render_points(GLcontext *ctx,GLuint first,GLuint last)
+static INLINE void nv10_render_points(GLcontext *ctx,GLuint first,GLuint last)
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx);
}
}
-static inline void nv10_render_line(GLcontext *ctx,GLuint v1,GLuint v2)
+static INLINE void nv10_render_line(GLcontext *ctx,GLuint v1,GLuint v2)
{
struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx);
GLfloat *vertptr = (GLfloat *)nmesa->verts;
nv10FinishPrimitive(nmesa);
}
-static inline void nv10_render_triangle(GLcontext *ctx,GLuint v1,GLuint v2,GLuint v3)
+static INLINE void nv10_render_triangle(GLcontext *ctx,GLuint v1,GLuint v2,GLuint v3)
{
struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx);
GLfloat *vertptr = (GLfloat *)nmesa->verts;
nv10FinishPrimitive(nmesa);
}
-static inline void nv10_render_quad(GLcontext *ctx,GLuint v1,GLuint v2,GLuint v3,GLuint v4)
+static INLINE void nv10_render_quad(GLcontext *ctx,GLuint v1,GLuint v2,GLuint v3,GLuint v4)
{
struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx);
GLfloat *vertptr = (GLfloat *)nmesa->verts;
-static inline void nv10OutputVertexFormat(struct nouveau_context* nmesa)
+static INLINE void nv10OutputVertexFormat(struct nouveau_context* nmesa)
{
GLcontext* ctx=nmesa->glCtx;
TNLcontext *tnl = TNL_CONTEXT(ctx);
* The caller must have ensured that there is enough space in the command
* buffer.
*/
-static inline void r300EmitAtoms(r300ContextPtr r300, GLboolean dirty)
+static INLINE void r300EmitAtoms(r300ContextPtr r300, GLboolean dirty)
{
struct r300_state_atom *atom;
uint32_t *dest;
*
* \param dwords The number of dwords we need to be free on the command buffer
*/
-static inline void r300EnsureCmdBufSpace(r300ContextPtr r300,
+static INLINE void r300EnsureCmdBufSpace(r300ContextPtr r300,
int dwords, const char *caller)
{
assert(dwords < r300->cmdbuf.size);
* causes state reemission after a flush. This is necessary to ensure
* correct hardware state after an unlock.
*/
-static inline uint32_t *r300RawAllocCmdBuf(r300ContextPtr r300,
+static INLINE uint32_t *r300RawAllocCmdBuf(r300ContextPtr r300,
int dwords, const char *caller)
{
uint32_t *ptr;
return ptr;
}
-static inline uint32_t *r300AllocCmdBuf(r300ContextPtr r300,
+static INLINE uint32_t *r300AllocCmdBuf(r300ContextPtr r300,
int dwords, const char *caller)
{
uint32_t *ptr;
/**
* This function takes a float and packs it into a uint32_t
*/
-static inline uint32_t r300PackFloat32(float fl)
+static INLINE uint32_t r300PackFloat32(float fl)
{
union {
float fl;
* But it works for most things. I'll fix it later if someone
* else with a better clue doesn't
*/
-static inline uint32_t r300PackFloat24(float f)
+static INLINE uint32_t r300PackFloat24(float f)
{
float mantissa;
int exponent;
#define CP_PACKET3( pkt, n ) \
(RADEON_CP_PACKET3 | (pkt) | ((n) << 16))
-static inline uint32_t cmdpacket0(int reg, int count)
+static INLINE uint32_t cmdpacket0(int reg, int count)
{
drm_r300_cmd_header_t cmd;
return cmd.u;
}
-static inline uint32_t cmdvpu(int addr, int count)
+static INLINE uint32_t cmdvpu(int addr, int count)
{
drm_r300_cmd_header_t cmd;
return cmd.u;
}
-static inline uint32_t cmdr500fp(int addr, int count, int type, int clamp)
+static INLINE uint32_t cmdr500fp(int addr, int count, int type, int clamp)
{
drm_r300_cmd_header_t cmd;
return cmd.u;
}
-static inline uint32_t cmdpacket3(int packet)
+static INLINE uint32_t cmdpacket3(int packet)
{
drm_r300_cmd_header_t cmd;
return cmd.u;
}
-static inline uint32_t cmdcpdelay(unsigned short count)
+static INLINE uint32_t cmdcpdelay(unsigned short count)
{
drm_r300_cmd_header_t cmd;
return cmd.u;
}
-static inline uint32_t cmdwait(unsigned char flags)
+static INLINE uint32_t cmdwait(unsigned char flags)
{
drm_r300_cmd_header_t cmd;
return cmd.u;
}
-static inline uint32_t cmdpacify(void)
+static INLINE uint32_t cmdpacify(void)
{
drm_r300_cmd_header_t cmd;
/**
* Must be sent to switch to 2d commands
*/
-void static inline end_3d(r300ContextPtr rmesa)
+void static INLINE end_3d(r300ContextPtr rmesa)
{
drm_radeon_cmd_header_t *cmd = NULL;
cmd[0].header.cmd_type = R300_CMD_END3D;
}
-void static inline cp_delay(r300ContextPtr rmesa, unsigned short count)
+void static INLINE cp_delay(r300ContextPtr rmesa, unsigned short count)
{
drm_radeon_cmd_header_t *cmd = NULL;
cmd[0].i = cmdcpdelay(count);
}
-void static inline cp_wait(r300ContextPtr rmesa, unsigned char flags)
+void static INLINE cp_wait(r300ContextPtr rmesa, unsigned char flags)
{
drm_radeon_cmd_header_t *cmd = NULL;
return reg;
}
-static inline GLuint negate(GLuint r)
+static INLINE GLuint negate(GLuint r)
{
REG_NEGS(r);
REG_NEGV(r);
/* Hack, to prevent clobbering sources used multiple times when
* emulating non-native instructions
*/
-static inline GLuint keep(GLuint r)
+static INLINE GLuint keep(GLuint r)
{
REG_SET_NO_USE(r, GL_TRUE);
return r;
}
-static inline GLuint absolute(GLuint r)
+static INLINE GLuint absolute(GLuint r)
{
REG_ABS(r);
return r;
if(_nc>_p->vpu.count)_p->vpu.count=_nc;\
}while(0)
-static inline void r300SetupVertexProgramFragment(r300ContextPtr r300, int dest, struct r300_vertex_shader_fragment *vsf)
+static INLINE void r300SetupVertexProgramFragment(r300ContextPtr r300, int dest, struct r300_vertex_shader_fragment *vsf)
{
int i;
}
}
-static inline unsigned long t_swizzle(GLubyte swizzle)
+static INLINE unsigned long t_swizzle(GLubyte swizzle)
{
/* this is in fact a NOP as the Mesa SWIZZLE_* are all identical to VSF_IN_COMPONENT_* */
return swizzle;
127.999999,
-127.999999};
-static inline GLuint make_rgb_swizzle(struct prog_src_register src) {
+static INLINE GLuint make_rgb_swizzle(struct prog_src_register src) {
GLuint swiz = 0x0;
GLuint temp;
/* This could be optimized, but it should be plenty fast already. */
return swiz;
}
-static inline GLuint make_rgba_swizzle(GLuint src) {
+static INLINE GLuint make_rgba_swizzle(GLuint src) {
GLuint swiz = 0x0;
GLuint temp;
int i;
return swiz;
}
-static inline GLuint make_alpha_swizzle(struct prog_src_register src) {
+static INLINE GLuint make_alpha_swizzle(struct prog_src_register src) {
GLuint swiz = GET_SWZ(src.Swizzle, 3);
if (swiz == 5) swiz++;
return swiz;
}
-static inline GLuint make_sop_swizzle(struct prog_src_register src) {
+static INLINE GLuint make_sop_swizzle(struct prog_src_register src) {
GLuint swiz = GET_SWZ(src.Swizzle, 0);
if (swiz == 5) swiz++;
return swiz;
}
-static inline GLuint make_strq_swizzle(struct prog_src_register src) {
+static INLINE GLuint make_strq_swizzle(struct prog_src_register src) {
GLuint swiz = 0x0, temp = 0x0;
int i;
for (i = 0; i < 4; i++) {
GLuint pitch;
};
-static inline __DRIcontext *
+static INLINE __DRIcontext *
swrast_context(GLcontext *ctx)
{
return (__DRIcontext *) ctx;
}
-static inline __DRIdrawable *
+static INLINE __DRIdrawable *
swrast_drawable(GLframebuffer *fb)
{
return (__DRIdrawable *) fb;
}
-static inline struct swrast_renderbuffer *
+static INLINE struct swrast_renderbuffer *
swrast_renderbuffer(struct gl_renderbuffer *rb)
{
return (struct swrast_renderbuffer *) rb;
#ifndef _SWRAST_SPANTEMP_ONCE
#define _SWRAST_SPANTEMP_ONCE
-static inline void
+static INLINE void
PUT_PIXEL( GLcontext *glCtx, GLint x, GLint y, GLubyte *p )
{
__DRIcontext *ctx = swrast_context(glCtx);
}
-static inline void
+static INLINE void
GET_PIXEL( GLcontext *glCtx, GLint x, GLint y, GLubyte *p )
{
__DRIcontext *ctx = swrast_context(glCtx);
read->loaderPrivate);
}
-static inline void
+static INLINE void
PUT_ROW( GLcontext *glCtx, GLint x, GLint y, GLuint n, char *row )
{
__DRIcontext *ctx = swrast_context(glCtx);
draw->loaderPrivate);
}
-static inline void
+static INLINE void
GET_ROW( GLcontext *glCtx, GLint x, GLint y, GLuint n, char *row )
{
__DRIcontext *ctx = swrast_context(glCtx);
#undef TAG
/* these require that base be dword-aligned */
-static inline void MMIO_OUT32(unsigned char *base, unsigned int offset,
+static INLINE void MMIO_OUT32(unsigned char *base, unsigned int offset,
unsigned int val)
{
unsigned int *addr = (unsigned int *)(base + offset);
*addr = val;
}
-static inline unsigned int MMIO_IN32(unsigned char *base, unsigned int offset)
+static INLINE unsigned int MMIO_IN32(unsigned char *base, unsigned int offset)
{
unsigned int *addr = (unsigned int *)(base + offset);
return *addr;