summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/savage
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/savage')
-rw-r--r--src/mesa/drivers/dri/savage/savage_xmesa.c190
-rw-r--r--src/mesa/drivers/dri/savage/savageioctl.h14
-rw-r--r--src/mesa/drivers/dri/savage/savagerender.c2
-rw-r--r--src/mesa/drivers/dri/savage/savagespan.c8
-rw-r--r--src/mesa/drivers/dri/savage/savagespan.h8
-rw-r--r--src/mesa/drivers/dri/savage/savagestate.c16
-rw-r--r--src/mesa/drivers/dri/savage/savagetex.c6
-rw-r--r--src/mesa/drivers/dri/savage/savagetris.c18
8 files changed, 105 insertions, 157 deletions
diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c
index 0017125329..04c1bd6a34 100644
--- a/src/mesa/drivers/dri/savage/savage_xmesa.c
+++ b/src/mesa/drivers/dri/savage/savage_xmesa.c
@@ -168,16 +168,17 @@ static const struct tnl_pipeline_stage *savage_pipeline[] = {
};
-/* this is first function called in dirver*/
+PUBLIC const __DRIextension *savageScreenExtensions[] = {
+ &driCoreExtension.base,
+ &driLegacyExtension.base,
+ &driReadDrawableExtension,
+};
static GLboolean
savageInitDriver(__DRIscreenPrivate *sPriv)
{
savageScreenPrivate *savageScreen;
SAVAGEDRIPtr gDRIPriv = (SAVAGEDRIPtr)sPriv->pDevPriv;
- PFNGLXSCRENABLEEXTENSIONPROC glx_enable_extension =
- (PFNGLXSCRENABLEEXTENSIONPROC) (*dri_interface->getProcAddress("glxEnableExtension"));
-
if (sPriv->devPrivSize != sizeof(SAVAGEDRIRec)) {
fprintf(stderr,"\nERROR! sizeof(SAVAGEDRIRec) does not match passed size from device driver\n");
@@ -265,10 +266,7 @@ savageInitDriver(__DRIscreenPrivate *sPriv)
driParseOptionInfo (&savageScreen->optionCache,
__driConfigOptions, __driNConfigOptions);
- if (glx_enable_extension != NULL) {
- (*glx_enable_extension)(sPriv->psc->screenConfigs,
- "GLX_SGI_make_current_read");
- }
+ sPriv->extensions = savageScreenExtensions;
#if 0
savageDDFastPathInit();
@@ -295,34 +293,6 @@ savageDestroyScreen(__DRIscreenPrivate *sPriv)
sPriv->private = NULL;
}
-#if 0
-GLvisual *XMesaCreateVisual(Display *dpy,
- __DRIscreenPrivate *driScrnPriv,
- const XVisualInfo *visinfo,
- const __GLXvisualConfig *config)
-{
- /* Drivers may change the args to _mesa_create_visual() in order to
- * setup special visuals.
- */
- return _mesa_create_visual( config->rgba,
- config->doubleBuffer,
- config->stereo,
- _mesa_bitcount(visinfo->red_mask),
- _mesa_bitcount(visinfo->green_mask),
- _mesa_bitcount(visinfo->blue_mask),
- config->alphaSize,
- 0, /* index bits */
- config->depthSize,
- config->stencilSize,
- config->accumRedSize,
- config->accumGreenSize,
- config->accumBlueSize,
- config->accumAlphaSize,
- 0 /* num samples */ );
-}
-#endif
-
-
static GLboolean
savageCreateContext( const __GLcontextModes *mesaVis,
__DRIcontextPrivate *driContextPriv,
@@ -525,7 +495,7 @@ savageCreateContext( const __GLcontextModes *mesaVis,
"enable_fastpath");
/* DRM versions before 2.1.3 would only render triangle lists. ELTS
* support was added in 2.2.0. */
- if (imesa->enable_fastpath && sPriv->drmMinor < 2) {
+ if (imesa->enable_fastpath && sPriv->drm_version.minor < 2) {
fprintf (stderr,
"*** Disabling fast path because your DRM version is buggy "
"or doesn't\n*** support ELTS. You need at least Savage DRM "
@@ -732,7 +702,7 @@ void savageXMesaSetClipRects(savageContextPtr imesa)
__DRIdrawablePrivate *dPriv = imesa->driDrawable;
if ((dPriv->numBackClipRects == 0)
- || (imesa->glCtx->DrawBuffer->_ColorDrawBufferMask[0] == BUFFER_BIT_FRONT_LEFT)) {
+ || (imesa->glCtx->DrawBuffer->_ColorDrawBufferIndexes[0] == BUFFER_FRONT_LEFT)) {
imesa->numClipRects = dPriv->numClipRects;
imesa->pClipRects = dPriv->pClipRects;
imesa->drawX = dPriv->x;
@@ -917,32 +887,18 @@ void savageGetLock( savageContextPtr imesa, GLuint flags )
}
}
-
-
-static const struct __DriverAPIRec savageAPI = {
- savageInitDriver,
- savageDestroyScreen,
- savageCreateContext,
- savageDestroyContext,
- savageCreateBuffer,
- savageDestroyBuffer,
- savageSwapBuffers,
- savageMakeCurrent,
- savageUnbindContext
-};
-
-
-static __GLcontextModes *
-savageFillInModes( unsigned pixel_bits, unsigned depth_bits,
+static const __DRIconfig **
+savageFillInModes( __DRIscreenPrivate *psp,
+ unsigned pixel_bits, unsigned depth_bits,
unsigned stencil_bits, GLboolean have_back_buffer )
{
- __GLcontextModes * modes;
+ __DRIconfig **configs;
__GLcontextModes * m;
- unsigned num_modes;
unsigned depth_buffer_factor;
unsigned back_buffer_factor;
GLenum fb_format;
GLenum fb_type;
+ int i;
/* Right now GLX_SWAP_COPY_OML isn't supported, but it would be easy
* enough to add support. Basically, if a context is created with an
@@ -973,8 +929,6 @@ savageFillInModes( unsigned pixel_bits, unsigned depth_bits,
depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 2 : 1;
back_buffer_factor = (have_back_buffer) ? 2 : 1;
- num_modes = depth_buffer_factor * back_buffer_factor * 4;
-
if ( pixel_bits == 16 ) {
fb_format = GL_RGB;
fb_type = GL_UNSIGNED_SHORT_5_6_5;
@@ -984,21 +938,11 @@ savageFillInModes( unsigned pixel_bits, unsigned depth_bits,
fb_type = GL_UNSIGNED_INT_8_8_8_8_REV;
}
- modes = (*dri_interface->createContextModes)( num_modes, sizeof( __GLcontextModes ) );
- m = modes;
- if ( ! driFillInModes( & m, fb_format, fb_type,
- depth_bits_array, stencil_bits_array, depth_buffer_factor,
- back_buffer_modes, back_buffer_factor,
- GLX_TRUE_COLOR ) ) {
- fprintf( stderr, "[%s:%u] Error creating FBConfig!\n",
- __func__, __LINE__ );
- return NULL;
- }
-
- if ( ! driFillInModes( & m, fb_format, fb_type,
- depth_bits_array, stencil_bits_array, depth_buffer_factor,
- back_buffer_modes, back_buffer_factor,
- GLX_DIRECT_COLOR ) ) {
+ configs = driCreateConfigs(fb_format, fb_type,
+ depth_bits_array, stencil_bits_array,
+ depth_buffer_factor,
+ back_buffer_modes, back_buffer_factor);
+ if (configs == NULL) {
fprintf( stderr, "[%s:%u] Error creating FBConfig!\n",
__func__, __LINE__ );
return NULL;
@@ -1006,74 +950,68 @@ savageFillInModes( unsigned pixel_bits, unsigned depth_bits,
/* Mark the visual as slow if there are "fake" stencil bits.
*/
- for ( m = modes ; m != NULL ; m = m->next ) {
- if ( (m->stencilBits != 0) && (m->stencilBits != stencil_bits) ) {
+ for (i = 0; configs[i]; i++) {
+ m = &configs[i]->modes;
+ if ((m->stencilBits != 0) && (m->stencilBits != stencil_bits)) {
m->visualRating = GLX_SLOW_CONFIG;
}
}
- return modes;
+ return (const __DRIconfig **) configs;
}
/**
- * This is the bootstrap function for the driver. libGL supplies all of the
- * requisite information about the system, and the driver initializes itself.
- * This routine also fills in the linked list pointed to by \c driver_modes
- * with the \c __GLcontextModes that the driver can support for windows or
- * pbuffers.
+ * This is the driver specific part of the createNewScreen entry point.
*
- * \return A pointer to a \c __DRIscreenPrivate on success, or \c NULL on
- * failure.
+ * \todo maybe fold this into intelInitDriver
+ *
+ * \return the __GLcontextModes supported by this driver
*/
-PUBLIC
-void * __driCreateNewScreen_20050727( __DRInativeDisplay *dpy, int scrn, __DRIscreen *psc,
- const __GLcontextModes * modes,
- const __DRIversion * ddx_version,
- const __DRIversion * dri_version,
- const __DRIversion * drm_version,
- const __DRIframebuffer * frame_buffer,
- drmAddress pSAREA, int fd,
- int internal_api_version,
- const __DRIinterfaceMethods * interface,
- __GLcontextModes ** driver_modes )
-
+static const __DRIconfig **
+savageInitScreen(__DRIscreenPrivate *psp)
{
- __DRIscreenPrivate *psp;
static const __DRIversion ddx_expected = { 2, 0, 0 };
static const __DRIversion dri_expected = { 4, 0, 0 };
static const __DRIversion drm_expected = { 2, 1, 0 };
-
- dri_interface = interface;
+ SAVAGEDRIPtr dri_priv = (SAVAGEDRIPtr)psp->pDevPriv;
if ( ! driCheckDriDdxDrmVersions2( "Savage",
- dri_version, & dri_expected,
- ddx_version, & ddx_expected,
- drm_version, & drm_expected ) ) {
+ &psp->dri_version, & dri_expected,
+ &psp->ddx_version, & ddx_expected,
+ &psp->drm_version, & drm_expected ) )
return NULL;
- }
-
- psp = __driUtilCreateNewScreen(dpy, scrn, psc, NULL,
- ddx_version, dri_version, drm_version,
- frame_buffer, pSAREA, fd,
- internal_api_version, &savageAPI);
- if ( psp != NULL ) {
- SAVAGEDRIPtr dri_priv = (SAVAGEDRIPtr)psp->pDevPriv;
- *driver_modes = savageFillInModes( dri_priv->cpp*8,
- (dri_priv->cpp == 2) ? 16 : 24,
- (dri_priv->cpp == 2) ? 0 : 8,
- (dri_priv->backOffset != dri_priv->depthOffset) );
-
- /* Calling driInitExtensions here, with a NULL context pointer, does not actually
- * enable the extensions. It just makes sure that all the dispatch offsets for all
- * the extensions that *might* be enables are known. This is needed because the
- * dispatch offsets need to be known when _mesa_context_create is called, but we can't
- * enable the extensions until we have a context pointer.
- *
- * Hello chicken. Hello egg. How are you two today?
- */
- driInitExtensions( NULL, card_extensions, GL_FALSE );
- }
- return (void *) psp;
+ /* Calling driInitExtensions here, with a NULL context pointer,
+ * does not actually enable the extensions. It just makes sure
+ * that all the dispatch offsets for all the extensions that
+ * *might* be enables are known. This is needed because the
+ * dispatch offsets need to be known when _mesa_context_create is
+ * called, but we can't enable the extensions until we have a
+ * context pointer.
+ *
+ * Hello chicken. Hello egg. How are you two today?
+ */
+ driInitExtensions( NULL, card_extensions, GL_FALSE );
+
+ if (!savageInitDriver(psp))
+ return NULL;
+
+ return savageFillInModes( psp,
+ dri_priv->cpp*8,
+ (dri_priv->cpp == 2) ? 16 : 24,
+ (dri_priv->cpp == 2) ? 0 : 8,
+ (dri_priv->backOffset != dri_priv->depthOffset) );
}
+
+const struct __DriverAPIRec driDriverAPI = {
+ savageInitScreen,
+ savageDestroyScreen,
+ savageCreateContext,
+ savageDestroyContext,
+ savageCreateBuffer,
+ savageDestroyBuffer,
+ savageSwapBuffers,
+ savageMakeCurrent,
+ savageUnbindContext
+};
diff --git a/src/mesa/drivers/dri/savage/savageioctl.h b/src/mesa/drivers/dri/savage/savageioctl.h
index 98629048ae..639605cc51 100644
--- a/src/mesa/drivers/dri/savage/savageioctl.h
+++ b/src/mesa/drivers/dri/savage/savageioctl.h
@@ -64,19 +64,19 @@ void savageSwapBuffers( __DRIdrawablePrivate *dPriv );
extern void savageGetDMABuffer( savageContextPtr imesa );
-static __inline
+static INLINE
void savageReleaseIndexedVerts( savageContextPtr imesa )
{
imesa->firstElt = -1;
}
-static __inline
+static INLINE
GLboolean savageHaveIndexedVerts( savageContextPtr imesa )
{
return (imesa->firstElt != -1);
}
-static __inline
+static INLINE
uint32_t *savageAllocVtxBuf( savageContextPtr imesa, GLuint words )
{
struct savage_vtxbuf_t *buffer = imesa->vtxBuf;
@@ -115,7 +115,7 @@ uint32_t *savageAllocVtxBuf( savageContextPtr imesa, GLuint words )
return head;
}
-static __inline
+static INLINE
uint32_t *savageAllocIndexedVerts( savageContextPtr imesa, GLuint n )
{
uint32_t *ret;
@@ -131,7 +131,7 @@ uint32_t *savageAllocIndexedVerts( savageContextPtr imesa, GLuint n )
* - Actually allocate entries for the indices in the command buffer.
* (This allocation must succeed without wrapping the cmd buffer!)
*/
-static __inline
+static INLINE
void savageFlushElts( savageContextPtr imesa )
{
if (imesa->elts.cmd) {
@@ -148,7 +148,7 @@ void savageFlushElts( savageContextPtr imesa )
/* Allocate a command buffer entry with <bytes> bytes of arguments:
* - implies savageFlushElts
*/
-static __inline
+static INLINE
drm_savage_cmd_header_t *savageAllocCmdBuf( savageContextPtr imesa, GLuint bytes )
{
drm_savage_cmd_header_t *ret;
@@ -171,7 +171,7 @@ drm_savage_cmd_header_t *savageAllocCmdBuf( savageContextPtr imesa, GLuint bytes
* incomplete indexed drawing command yet
* - increments the number of elts. Final allocation is done in savageFlushElts
*/
-static __inline
+static INLINE
uint16_t *savageAllocElts( savageContextPtr imesa, GLuint n )
{
uint16_t *ret;
diff --git a/src/mesa/drivers/dri/savage/savagerender.c b/src/mesa/drivers/dri/savage/savagerender.c
index 514434c427..f2f19984b1 100644
--- a/src/mesa/drivers/dri/savage/savagerender.c
+++ b/src/mesa/drivers/dri/savage/savagerender.c
@@ -198,7 +198,7 @@ static GLboolean savage_run_render( GLcontext *ctx,
for (i = 0 ; i < VB->PrimitiveCount ; i++)
{
- GLuint prim = VB->Primitive[i].mode;
+ GLuint prim = _tnl_translate_prim(&VB->Primitive[i]);
GLuint start = VB->Primitive[i].start;
GLuint length = VB->Primitive[i].count;
diff --git a/src/mesa/drivers/dri/savage/savagespan.c b/src/mesa/drivers/dri/savage/savagespan.c
index 61ab9e6d64..00fd1259fd 100644
--- a/src/mesa/drivers/dri/savage/savagespan.c
+++ b/src/mesa/drivers/dri/savage/savagespan.c
@@ -93,6 +93,8 @@
/* 16 bit integer depthbuffer functions
* Depth range is reversed. See also savageCalcViewport.
*/
+#define VALUE_TYPE GLushort
+
#define WRITE_DEPTH( _x, _y, d ) \
*(GLushort *)(buf + ((_x)<<1) + (_y)*pitch) = 0xFFFF - d
@@ -107,6 +109,8 @@
/* 16 bit float depthbuffer functions
*/
+#define VALUE_TYPE GLushort
+
#define WRITE_DEPTH( _x, _y, d ) \
*(GLushort *)(buf + ((_x)<<1) + (_y)*pitch) = \
savageEncodeFloat16( 1.0 - (GLfloat)d/65535.0 )
@@ -125,6 +129,8 @@
/* 8-bit stencil /24-bit integer depth depthbuffer functions.
* Depth range is reversed. See also savageCalcViewport.
*/
+#define VALUE_TYPE GLuint
+
#define WRITE_DEPTH( _x, _y, d ) do { \
GLuint tmp = *(GLuint *)(buf + ((_x)<<2) + (_y)*pitch); \
tmp &= 0xFF000000; \
@@ -143,6 +149,8 @@
/* 24 bit float depthbuffer functions
*/
+#define VALUE_TYPE GLuint
+
#define WRITE_DEPTH( _x, _y, d ) do { \
GLuint tmp = *(GLuint *)(buf + ((_x)<<2) + (_y)*pitch); \
tmp &= 0xFF000000; \
diff --git a/src/mesa/drivers/dri/savage/savagespan.h b/src/mesa/drivers/dri/savage/savagespan.h
index f6a312e820..53a7f8b97c 100644
--- a/src/mesa/drivers/dri/savage/savagespan.h
+++ b/src/mesa/drivers/dri/savage/savagespan.h
@@ -55,7 +55,7 @@ savageSetSpanFunctions(driRenderbuffer *rb, const GLvisual *vis,
*
* Note that there is no encoding for numbers < 2^-16.
*/
-static __inline GLuint savageEncodeFloat16( GLdouble x )
+static INLINE GLuint savageEncodeFloat16( GLdouble x )
{
GLint r = (GLint)(x * 0x10000000);
GLint exp = 0;
@@ -67,7 +67,7 @@ static __inline GLuint savageEncodeFloat16( GLdouble x )
}
return exp > 0xf ? 0xffff : (r - 0x1000) | (exp << 12);
}
-static __inline GLdouble savageDecodeFloat16( GLuint x )
+static INLINE GLdouble savageDecodeFloat16( GLuint x )
{
static const GLdouble pow2[16] = {
1.0/(1<<28), 1.0/(1<<27), 1.0/(1<<26), 1.0/(1<<25),
@@ -92,7 +92,7 @@ static __inline GLdouble savageDecodeFloat16( GLuint x )
*
* Details analogous to the 16-bit format.
*/
-static __inline GLuint savageEncodeFloat24( GLdouble x )
+static INLINE GLuint savageEncodeFloat24( GLdouble x )
{
int64_t r = (int64_t)(x * ((int64_t)1 << (19+32)));
GLint exp = 0;
@@ -105,7 +105,7 @@ static __inline GLuint savageEncodeFloat24( GLdouble x )
return exp > 0x1f ? 0xffffff : (r - 0x80000) | (exp << 19);
}
#define _1 (int64_t)1
-static __inline GLdouble savageDecodeFloat24( GLuint x )
+static INLINE GLdouble savageDecodeFloat24( GLuint x )
{
static const GLdouble pow2[32] = {
1.0/(_1<<51), 1.0/(_1<<50), 1.0/(_1<<49), 1.0/(_1<<48),
diff --git a/src/mesa/drivers/dri/savage/savagestate.c b/src/mesa/drivers/dri/savage/savagestate.c
index 84fd3157ed..ceef34c03e 100644
--- a/src/mesa/drivers/dri/savage/savagestate.c
+++ b/src/mesa/drivers/dri/savage/savagestate.c
@@ -76,7 +76,7 @@
static void savageBlendFunc_s4(GLcontext *);
static void savageBlendFunc_s3d(GLcontext *);
-static __inline__ GLuint savagePackColor(GLuint format,
+static INLINE GLuint savagePackColor(GLuint format,
GLubyte r, GLubyte g,
GLubyte b, GLubyte a)
{
@@ -640,15 +640,17 @@ static void savageDDDrawBuffer(GLcontext *ctx, GLenum mode )
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
uint32_t destCtrl = imesa->regs.s4.destCtrl.ui;
- /*
- * _DrawDestMask is easier to cope with than <mode>.
- */
- switch ( ctx->DrawBuffer->_ColorDrawBufferMask[0] ) {
- case BUFFER_BIT_FRONT_LEFT:
+ if (ctx->DrawBuffer->_NumColorDrawBuffers != 1) {
+ FALLBACK( ctx, SAVAGE_FALLBACK_DRAW_BUFFER, GL_TRUE );
+ return;
+ }
+
+ switch ( ctx->DrawBuffer->_ColorDrawBufferIndexes[0] ) {
+ case BUFFER_FRONT_LEFT:
imesa->IsDouble = GL_FALSE;
imesa->regs.s4.destCtrl.ni.offset = imesa->savageScreen->frontOffset>>11;
break;
- case BUFFER_BIT_BACK_LEFT:
+ case BUFFER_BACK_LEFT:
imesa->IsDouble = GL_TRUE;
imesa->regs.s4.destCtrl.ni.offset = imesa->savageScreen->backOffset>>11;
break;
diff --git a/src/mesa/drivers/dri/savage/savagetex.c b/src/mesa/drivers/dri/savage/savagetex.c
index dbe30d4c94..1d4bfa53ca 100644
--- a/src/mesa/drivers/dri/savage/savagetex.c
+++ b/src/mesa/drivers/dri/savage/savagetex.c
@@ -101,7 +101,7 @@ static const savageTileInfo tileInfo_s3d_s4[5] = {
* \param w width in bytes
*/
#define SUBTILE_FUNC(w,h) \
-static __inline GLubyte *savageUploadSubtile_##w##x##h \
+static INLINE GLubyte *savageUploadSubtile_##w##x##h \
(GLubyte *dest, GLubyte *src, GLuint srcStride) \
{ \
GLuint y; \
@@ -1016,7 +1016,7 @@ static void savageUploadTexImages( savageContextPtr imesa, savageTexObjPtr t )
/* Heap timestamps are only reliable with Savage DRM 2.3.x or
* later. Earlier versions had only 16 bit time stamps which
* would wrap too frequently. */
- if (imesa->savageScreen->driScrnPriv->drmMinor >= 3) {
+ if (imesa->savageScreen->driScrnPriv->drm_version.minor >= 3) {
unsigned int heap = t->base.heap->heapId;
LOCK_HARDWARE(imesa);
savageWaitEvent (imesa, imesa->textureHeaps[heap]->timestamp);
@@ -1713,7 +1713,7 @@ static void savageTimestampTextures( savageContextPtr imesa )
* Only useful with long-lived 32-bit event tags available
* with Savage DRM 2.3.x or later. */
if ((imesa->CurrentTexObj[0] || imesa->CurrentTexObj[1]) &&
- imesa->savageScreen->driScrnPriv->drmMinor >= 3) {
+ imesa->savageScreen->driScrnPriv->drm_version.minor >= 3) {
unsigned int e;
FLUSH_BATCH(imesa);
e = savageEmitEvent(imesa, SAVAGE_WAIT_3D);
diff --git a/src/mesa/drivers/dri/savage/savagetris.c b/src/mesa/drivers/dri/savage/savagetris.c
index a1c7bb167e..39b74285f1 100644
--- a/src/mesa/drivers/dri/savage/savagetris.c
+++ b/src/mesa/drivers/dri/savage/savagetris.c
@@ -95,7 +95,7 @@ do { \
} while (0)
#endif
-static void __inline__ savage_draw_triangle (savageContextPtr imesa,
+static void INLINE savage_draw_triangle (savageContextPtr imesa,
savageVertexPtr v0,
savageVertexPtr v1,
savageVertexPtr v2) {
@@ -108,7 +108,7 @@ static void __inline__ savage_draw_triangle (savageContextPtr imesa,
EMIT_VERT (j, vb, vertsize, 0, v2);
}
-static void __inline__ savage_draw_quad (savageContextPtr imesa,
+static void INLINE savage_draw_quad (savageContextPtr imesa,
savageVertexPtr v0,
savageVertexPtr v1,
savageVertexPtr v2,
@@ -125,7 +125,7 @@ static void __inline__ savage_draw_quad (savageContextPtr imesa,
EMIT_VERT (j, vb, vertsize, 0, v3);
}
-static __inline__ void savage_draw_point (savageContextPtr imesa,
+static INLINE void savage_draw_point (savageContextPtr imesa,
savageVertexPtr tmp) {
GLuint vertsize = imesa->HwVertexSize;
uint32_t *vb = savageAllocVtxBuf (imesa, 6*vertsize);
@@ -161,7 +161,7 @@ static __inline__ void savage_draw_point (savageContextPtr imesa,
EMIT_VERT (j, vb, vertsize, 2, tmp);
}
-static __inline__ void savage_draw_line (savageContextPtr imesa,
+static INLINE void savage_draw_line (savageContextPtr imesa,
savageVertexPtr v0,
savageVertexPtr v1 ) {
GLuint vertsize = imesa->HwVertexSize;
@@ -219,7 +219,7 @@ do { \
tmp.f[vertex_size-1] *= rhw; \
} while (0)
-static void __inline__ savage_ptex_tri (savageContextPtr imesa,
+static void INLINE savage_ptex_tri (savageContextPtr imesa,
savageVertexPtr v0,
savageVertexPtr v1,
savageVertexPtr v2) {
@@ -233,7 +233,7 @@ static void __inline__ savage_ptex_tri (savageContextPtr imesa,
PTEX_VERTEX (j, tmp, vertsize, 0, v2); EMIT_VERT (j, vb, vertsize, 0, &tmp);
}
-static __inline__ void savage_ptex_line (savageContextPtr imesa,
+static INLINE void savage_ptex_line (savageContextPtr imesa,
savageVertexPtr v0,
savageVertexPtr v1 ) {
GLuint vertsize = imesa->HwVertexSize;
@@ -281,7 +281,7 @@ static __inline__ void savage_ptex_line (savageContextPtr imesa,
EMIT_VERT (j, vb, vertsize, 2, &tmp1);
}
-static __inline__ void savage_ptex_point (savageContextPtr imesa,
+static INLINE void savage_ptex_point (savageContextPtr imesa,
savageVertexPtr v0) {
GLuint vertsize = imesa->HwVertexSize;
uint32_t *vb = savageAllocVtxBuf (imesa, 6*vertsize);
@@ -934,7 +934,7 @@ do { \
#define SAVAGE_EMIT_ST1 0x0300
-static __inline__ GLuint savageChooseVertexFormat_s3d( GLcontext *ctx )
+static INLINE GLuint savageChooseVertexFormat_s3d( GLcontext *ctx )
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -997,7 +997,7 @@ static __inline__ GLuint savageChooseVertexFormat_s3d( GLcontext *ctx )
}
-static __inline__ GLuint savageChooseVertexFormat_s4( GLcontext *ctx )
+static INLINE GLuint savageChooseVertexFormat_s4( GLcontext *ctx )
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);