summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/common/texmem.c2
-rw-r--r--src/mesa/drivers/dri/common/utils.c3
-rw-r--r--src/mesa/drivers/dri/common/vblank.h4
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_vbtmp.h2
-rw-r--r--src/mesa/drivers/dri/i810/i810texmem.c5
-rw-r--r--src/mesa/drivers/dri/i830/i830_texmem.c6
-rw-r--r--src/mesa/drivers/dri/mga/mgacontext.h1
-rw-r--r--src/mesa/drivers/dri/mga/mgavb.c4
-rw-r--r--src/mesa/drivers/dri/r128/r128_ioctl.c5
-rw-r--r--src/mesa/drivers/dri/r200/r200_context.h1
-rw-r--r--src/mesa/drivers/dri/r200/r200_screen.c3
-rw-r--r--src/mesa/drivers/dri/r200/r200_vtxtmp_x86.S2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_context.h1
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_ioctl.c5
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_screen.c1
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_tex.c6
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texmem.c6
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texstate.c2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_vtxfmt.c2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_vtxtmp_x86.S2
-rw-r--r--src/mesa/drivers/dri/sis/sis_alloc.c4
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_screen.c4
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_span.c21
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_texman.c2
-rw-r--r--src/mesa/drivers/x11/xm_api.c2
-rw-r--r--src/mesa/main/imports.h7
-rw-r--r--src/mesa/main/texstore.c4
-rw-r--r--src/mesa/math/m_debug_clip.c5
-rw-r--r--src/mesa/math/m_debug_norm.c5
-rw-r--r--src/mesa/math/m_debug_xform.c5
-rw-r--r--src/mesa/math/m_xform.c2
-rw-r--r--src/mesa/sparc/clip.S7
-rw-r--r--src/mesa/sparc/norm.S8
-rw-r--r--src/mesa/sparc/xform.S8
-rw-r--r--src/mesa/tnl/t_save_api.c3
-rw-r--r--src/mesa/tnl/t_vb_lighttmp.h46
-rw-r--r--src/mesa/x86/3dnow_normal.S6
-rw-r--r--src/mesa/x86/3dnow_xform1.S5
-rw-r--r--src/mesa/x86/3dnow_xform2.S4
-rw-r--r--src/mesa/x86/3dnow_xform3.S4
-rw-r--r--src/mesa/x86/3dnow_xform4.S4
-rw-r--r--src/mesa/x86/assyntax.h24
-rw-r--r--src/mesa/x86/common_x86.c2
-rw-r--r--src/mesa/x86/common_x86_asm.h4
-rw-r--r--src/mesa/x86/mmx_blend.S5
-rw-r--r--src/mesa/x86/sse_normal.S4
-rw-r--r--src/mesa/x86/sse_xform1.S4
-rw-r--r--src/mesa/x86/sse_xform2.S4
-rw-r--r--src/mesa/x86/sse_xform3.S4
-rw-r--r--src/mesa/x86/sse_xform4.S4
50 files changed, 189 insertions, 85 deletions
diff --git a/src/mesa/drivers/dri/common/texmem.c b/src/mesa/drivers/dri/common/texmem.c
index a40d33f1e9..c76d371682 100644
--- a/src/mesa/drivers/dri/common/texmem.c
+++ b/src/mesa/drivers/dri/common/texmem.c
@@ -1083,7 +1083,7 @@ driValidateTextureHeaps( driTexHeap * const * texture_heaps,
* the correct heap.
*
* Check the texobj base address corresponds to the MemBlock
- * range. Check the texobj size (recalculate???) fits within
+ * range. Check the texobj size (recalculate?) fits within
* the MemBlock.
*
* Count the number of texobj's using this heap.
diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c
index 81429c167e..d337cb6b94 100644
--- a/src/mesa/drivers/dri/common/utils.c
+++ b/src/mesa/drivers/dri/common/utils.c
@@ -46,7 +46,8 @@ driParseDebugString( const char * debug,
flag = 0;
if ( debug != NULL ) {
while( control->string != NULL ) {
- if ( strstr( debug, control->string ) != NULL ) {
+ if ( !strcmp( debug, "all" ) ||
+ strstr( debug, control->string ) != NULL ) {
flag |= control->flag;
}
diff --git a/src/mesa/drivers/dri/common/vblank.h b/src/mesa/drivers/dri/common/vblank.h
index 718ecd7b1f..3dc965def1 100644
--- a/src/mesa/drivers/dri/common/vblank.h
+++ b/src/mesa/drivers/dri/common/vblank.h
@@ -55,6 +55,10 @@ extern int driWaitForVBlank( const __DRIdrawablePrivate *priv,
#include <unistd.h> /* for usleep() */
#include <sched.h> /* for sched_yield() */
+#ifdef linux
+#include <sched.h> /* for sched_yield() */
+#endif
+
#define DO_USLEEP(nr) \
do { \
if (0) fprintf(stderr, "%s: usleep for %u\n", __FUNCTION__, nr ); \
diff --git a/src/mesa/drivers/dri/ffb/ffb_vbtmp.h b/src/mesa/drivers/dri/ffb/ffb_vbtmp.h
index 5baa4eb03e..a1d1254d97 100644
--- a/src/mesa/drivers/dri/ffb/ffb_vbtmp.h
+++ b/src/mesa/drivers/dri/ffb/ffb_vbtmp.h
@@ -3,7 +3,9 @@
static void TAG(emit)(GLcontext *ctx, GLuint start, GLuint end)
{
ffbContextPtr fmesa = FFB_CONTEXT(ctx);
+#if defined(VB_DEBUG) || (IND & (FFB_VB_XYZ_BIT | FFB_VB_RGBA_BIT))
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
+#endif
#if (IND & (FFB_VB_RGBA_BIT))
GLfloat (*col0)[4];
GLuint col0_stride;
diff --git a/src/mesa/drivers/dri/i810/i810texmem.c b/src/mesa/drivers/dri/i810/i810texmem.c
index 87f535dc23..08900cc67d 100644
--- a/src/mesa/drivers/dri/i810/i810texmem.c
+++ b/src/mesa/drivers/dri/i810/i810texmem.c
@@ -60,6 +60,7 @@ void i810DestroyTexObj(i810ContextPtr imesa, i810TextureObjectPtr t)
+#if defined(i386) || defined(__i386__)
/* From linux kernel i386 header files, copes with odd sizes better
* than COPY_DWORDS would:
*/
@@ -80,6 +81,10 @@ __asm__ __volatile__(
: "memory");
return (to);
}
+#else
+/* Allow compilation on other architectures */
+#define __memcpy memcpy
+#endif
/* Upload an image from mesa's internal copy.
*/
diff --git a/src/mesa/drivers/dri/i830/i830_texmem.c b/src/mesa/drivers/dri/i830/i830_texmem.c
index 6cb5531349..b61ce6f867 100644
--- a/src/mesa/drivers/dri/i830/i830_texmem.c
+++ b/src/mesa/drivers/dri/i830/i830_texmem.c
@@ -68,6 +68,7 @@ void i830DestroyTexObj(i830ContextPtr imesa, i830TextureObjectPtr t)
}
}
+#if defined(i386) || defined(__i386__)
/* From linux kernel i386 header files, copes with odd sizes better
* than COPY_DWORDS would:
*/
@@ -88,7 +89,10 @@ __asm__ __volatile__(
: "memory");
return (to);
}
-
+#else
+/* Allow compilation on other architectures */
+#define __memcpy memcpy
+#endif
/* Upload an image from mesa's internal copy.
*/
diff --git a/src/mesa/drivers/dri/mga/mgacontext.h b/src/mesa/drivers/dri/mga/mgacontext.h
index 83aaa27bdf..2009634b13 100644
--- a/src/mesa/drivers/dri/mga/mgacontext.h
+++ b/src/mesa/drivers/dri/mga/mgacontext.h
@@ -29,7 +29,6 @@
#ifndef MGALIB_INC
#define MGALIB_INC
-#include <inttypes.h>
#include "drm.h"
#include "mga_drm.h"
#include "dri_util.h"
diff --git a/src/mesa/drivers/dri/mga/mgavb.c b/src/mesa/drivers/dri/mga/mgavb.c
index 2d5d6825f3..dacb38dd9f 100644
--- a/src/mesa/drivers/dri/mga/mgavb.c
+++ b/src/mesa/drivers/dri/mga/mgavb.c
@@ -115,8 +115,8 @@ static struct {
#define PTEX_FALLBACK() FALLBACK(ctx, MGA_FALLBACK_TEXTURE, 1)
-#define INTERP_VERTEX setup_tab[MGA_CONTEXT(ctx)->SetupIndex].interp
-#define COPY_PV_VERTEX setup_tab[MGA_CONTEXT(ctx)->SetupIndex].copy_pv
+#define INTERP_VERTEX setup_tab[mmesa->SetupIndex].interp
+#define COPY_PV_VERTEX setup_tab[mmesa->SetupIndex].copy_pv
/***********************************************************************
diff --git a/src/mesa/drivers/dri/r128/r128_ioctl.c b/src/mesa/drivers/dri/r128/r128_ioctl.c
index b0073eb74e..6ea8d52965 100644
--- a/src/mesa/drivers/dri/r128/r128_ioctl.c
+++ b/src/mesa/drivers/dri/r128/r128_ioctl.c
@@ -33,6 +33,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <errno.h>
+#define STANDALONE_MMIO
#include "r128_context.h"
#include "r128_state.h"
#include "r128_ioctl.h"
@@ -266,7 +267,7 @@ void r128CopyBuffer( const __DRIdrawablePrivate *dPriv )
if ( R128_DEBUG & DEBUG_VERBOSE_API ) {
fprintf( stderr, "\n********************************\n" );
fprintf( stderr, "\n%s( %p )\n\n",
- __FUNCTION__, rmesa->glCtx );
+ __FUNCTION__, (void *)rmesa->glCtx );
fflush( stderr );
}
@@ -344,7 +345,7 @@ void r128PageFlip( const __DRIdrawablePrivate *dPriv )
if ( R128_DEBUG & DEBUG_VERBOSE_API ) {
fprintf( stderr, "\n%s( %p ): page=%d\n\n",
- __FUNCTION__, rmesa->glCtx, rmesa->sarea->pfCurrentPage );
+ __FUNCTION__, (void *)rmesa->glCtx, rmesa->sarea->pfCurrentPage );
}
FLUSH_BATCH( rmesa );
diff --git a/src/mesa/drivers/dri/r200/r200_context.h b/src/mesa/drivers/dri/r200/r200_context.h
index ae7d2f47bd..69ac92b1f1 100644
--- a/src/mesa/drivers/dri/r200/r200_context.h
+++ b/src/mesa/drivers/dri/r200/r200_context.h
@@ -38,7 +38,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifdef GLX_DIRECT_RENDERING
-#include <inttypes.h>
#include "tnl/t_vertex.h"
#include "drm.h"
#include "radeon_drm.h"
diff --git a/src/mesa/drivers/dri/r200/r200_screen.c b/src/mesa/drivers/dri/r200/r200_screen.c
index e356309ae1..d115ef20fc 100644
--- a/src/mesa/drivers/dri/r200/r200_screen.c
+++ b/src/mesa/drivers/dri/r200/r200_screen.c
@@ -41,6 +41,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "imports.h"
#include "context.h"
+#define STANDALONE_MMIO
#include "r200_screen.h"
#include "r200_context.h"
#include "r200_ioctl.h"
@@ -364,6 +365,8 @@ r200CreateScreen( __DRIscreenPrivate *sPriv )
return NULL;
}
+ RADEONMMIO = screen->mmio.map;
+
screen->status.handle = dri_priv->statusHandle;
screen->status.size = dri_priv->statusSize;
if ( drmMap( sPriv->fd,
diff --git a/src/mesa/drivers/dri/r200/r200_vtxtmp_x86.S b/src/mesa/drivers/dri/r200/r200_vtxtmp_x86.S
index 56a4144e8e..4ad2b6f1f0 100644
--- a/src/mesa/drivers/dri/r200/r200_vtxtmp_x86.S
+++ b/src/mesa/drivers/dri/r200/r200_vtxtmp_x86.S
@@ -391,6 +391,7 @@ GLOBL( _x86_MultiTexCoord2f_2 )
ret
GLOBL( _x86_MultiTexCoord2f_2_end )
+#if defined(USE_SSE_ASM)
/**
* This can be used as a template for either Color3fv (when the color
* target is also a 3f) or Normal3fv.
@@ -490,3 +491,4 @@ GLOBL( _sse_MultiTexCoord2f_2 )
movlps %xmm0, (%eax)
ret
GLOBL( _sse_MultiTexCoord2f_2_end )
+#endif
diff --git a/src/mesa/drivers/dri/radeon/radeon_context.h b/src/mesa/drivers/dri/radeon/radeon_context.h
index 42b768dc84..30346150db 100644
--- a/src/mesa/drivers/dri/radeon/radeon_context.h
+++ b/src/mesa/drivers/dri/radeon/radeon_context.h
@@ -40,7 +40,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifdef GLX_DIRECT_RENDERING
-#include <inttypes.h>
#include "dri_util.h"
#include "drm.h"
#include "radeon_drm.h"
diff --git a/src/mesa/drivers/dri/radeon/radeon_ioctl.c b/src/mesa/drivers/dri/radeon/radeon_ioctl.c
index 6d51b886d8..c5707a0280 100644
--- a/src/mesa/drivers/dri/radeon/radeon_ioctl.c
+++ b/src/mesa/drivers/dri/radeon/radeon_ioctl.c
@@ -49,6 +49,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "radeon_tcl.h"
#include "radeon_sanity.h"
+#define STANDALONE_MMIO
#include "radeon_macros.h" /* for INREG() */
#include "vblank.h"
@@ -750,12 +751,10 @@ static uint32_t radeonGetLastFrame (radeonContextPtr rmesa)
else
ret = -EINVAL;
-#ifndef __alpha__
if ( ret == -EINVAL ) {
frame = INREG( RADEON_LAST_FRAME_REG );
ret = 0;
}
-#endif
if ( ret ) {
fprintf( stderr, "%s: drm_radeon_getparam_t: %d\n", __FUNCTION__, ret );
exit(1);
@@ -1043,12 +1042,10 @@ static void radeonClear( GLcontext *ctx, GLbitfield mask, GLboolean all,
} else
ret = -EINVAL;
-#ifndef __alpha__
if ( ret == -EINVAL ) {
clear = INREG( RADEON_LAST_CLEAR_REG );
ret = 0;
}
-#endif
if ( ret ) {
fprintf( stderr, "%s: drm_radeon_getparam_t: %d\n", __FUNCTION__, ret );
exit(1);
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c
index 8d26935e6b..14ea13648c 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.c
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.c
@@ -39,6 +39,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "glheader.h"
#include "imports.h"
+#define STANDALONE_MMIO
#include "radeon_context.h"
#include "radeon_screen.h"
#include "radeon_macros.h"
diff --git a/src/mesa/drivers/dri/radeon/radeon_tex.c b/src/mesa/drivers/dri/radeon/radeon_tex.c
index 87c26f8978..3de407df3b 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tex.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tex.c
@@ -244,7 +244,7 @@ static radeonTexObjPtr radeonAllocTexObj( struct gl_texture_object *texObj )
texObj->DriverData = t;
if ( t != NULL ) {
if ( RADEON_DEBUG & DEBUG_TEXTURE ) {
- fprintf( stderr, "%s( %p, %p )\n", __FUNCTION__, texObj, t );
+ fprintf( stderr, "%s( %p, %p )\n", __FUNCTION__, (void *)texObj, (void *)t );
}
/* Initialize non-image-dependent parts of the state:
@@ -666,7 +666,7 @@ static void radeonBindTexture( GLcontext *ctx, GLenum target,
struct gl_texture_object *texObj )
{
if ( RADEON_DEBUG & (DEBUG_STATE|DEBUG_TEXTURE) ) {
- fprintf( stderr, "%s( %p ) unit=%d\n", __FUNCTION__, texObj,
+ fprintf( stderr, "%s( %p ) unit=%d\n", __FUNCTION__, (void *)texObj,
ctx->Texture.CurrentUnit );
}
@@ -683,7 +683,7 @@ static void radeonDeleteTexture( GLcontext *ctx,
driTextureObject * t = (driTextureObject *) texObj->DriverData;
if ( RADEON_DEBUG & (DEBUG_STATE|DEBUG_TEXTURE) ) {
- fprintf( stderr, "%s( %p (target = %s) )\n", __FUNCTION__, texObj,
+ fprintf( stderr, "%s( %p (target = %s) )\n", __FUNCTION__, (void *)texObj,
_mesa_lookup_enum_by_nr( texObj->Target ) );
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_texmem.c b/src/mesa/drivers/dri/radeon/radeon_texmem.c
index 61f187762c..235df8dcd1 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texmem.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texmem.c
@@ -56,7 +56,7 @@ void
radeonDestroyTexObj( radeonContextPtr rmesa, radeonTexObjPtr t )
{
if ( RADEON_DEBUG & DEBUG_TEXTURE ) {
- fprintf( stderr, "%s( %p, %p )\n", __FUNCTION__, t, t->base.tObj );
+ fprintf( stderr, "%s( %p, %p )\n", __FUNCTION__, (void *)t, (void *)t->base.tObj );
}
if ( rmesa != NULL ) {
@@ -189,7 +189,7 @@ static void uploadSubImage( radeonContextPtr rmesa, radeonTexObjPtr t,
if ( RADEON_DEBUG & DEBUG_TEXTURE ) {
fprintf( stderr, "%s( %p, %p ) level/width/height/face = %d/%d/%d/%u\n",
- __FUNCTION__, t, t->base.tObj, level, width, height, face );
+ __FUNCTION__, (void *)t, (void *)t->base.tObj, level, width, height, face );
}
ASSERT(face < 6);
@@ -306,7 +306,7 @@ int radeonUploadTexImages( radeonContextPtr rmesa, radeonTexObjPtr t, GLuint fac
if ( RADEON_DEBUG & (DEBUG_TEXTURE|DEBUG_IOCTL) ) {
fprintf( stderr, "%s( %p, %p ) sz=%d lvls=%d-%d\n", __FUNCTION__,
- rmesa->glCtx, t->base.tObj, t->base.totalSize,
+ (void *)rmesa->glCtx, (void *)t->base.tObj, t->base.totalSize,
t->base.firstLevel, t->base.lastLevel );
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_texstate.c b/src/mesa/drivers/dri/radeon/radeon_texstate.c
index 16682b1f64..a3be9280c8 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texstate.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texstate.c
@@ -391,7 +391,7 @@ static GLboolean radeonUpdateTextureEnv( GLcontext *ctx, int unit )
|| (texUnit->_Current != NULL) );
if ( RADEON_DEBUG & DEBUG_TEXTURE ) {
- fprintf( stderr, "%s( %p, %d )\n", __FUNCTION__, ctx, unit );
+ fprintf( stderr, "%s( %p, %d )\n", __FUNCTION__, (void *)ctx, unit );
}
/* Set the texture environment state. Isn't this nice and clean?
diff --git a/src/mesa/drivers/dri/radeon/radeon_vtxfmt.c b/src/mesa/drivers/dri/radeon/radeon_vtxfmt.c
index 9fb699e3d6..7a0ff51dd4 100644
--- a/src/mesa/drivers/dri/radeon/radeon_vtxfmt.c
+++ b/src/mesa/drivers/dri/radeon/radeon_vtxfmt.c
@@ -527,7 +527,7 @@ static void wrap_buffer( void )
for (i = 0 ; i < nrverts; i++) {
if (RADEON_DEBUG & DEBUG_VERTS) {
int j;
- fprintf(stderr, "re-emit vertex %d to %p\n", i, rmesa->vb.dmaptr);
+ fprintf(stderr, "re-emit vertex %d to %p\n", i, (void *)rmesa->vb.dmaptr);
if (RADEON_DEBUG & DEBUG_VERBOSE)
for (j = 0 ; j < rmesa->vb.vertex_size; j++)
fprintf(stderr, "\t%08x/%f\n", *(int*)&tmp[i][j], tmp[i][j]);
diff --git a/src/mesa/drivers/dri/radeon/radeon_vtxtmp_x86.S b/src/mesa/drivers/dri/radeon/radeon_vtxtmp_x86.S
index c77b41059e..569d3b9b48 100644
--- a/src/mesa/drivers/dri/radeon/radeon_vtxtmp_x86.S
+++ b/src/mesa/drivers/dri/radeon/radeon_vtxtmp_x86.S
@@ -391,6 +391,7 @@ GLOBL( _x86_MultiTexCoord2f_2 )
ret
GLOBL( _x86_MultiTexCoord2f_2_end )
+#if defined(USE_SSE_ASM)
/**
* This can be used as a template for either Color3fv (when the color
* target is also a 3f) or Normal3fv.
@@ -490,3 +491,4 @@ GLOBL( _sse_MultiTexCoord2f_2 )
movlps %xmm0, (%eax)
ret
GLOBL( _sse_MultiTexCoord2f_2_end )
+#endif
diff --git a/src/mesa/drivers/dri/sis/sis_alloc.c b/src/mesa/drivers/dri/sis/sis_alloc.c
index 1789fbb5ff..0e85e6faff 100644
--- a/src/mesa/drivers/dri/sis/sis_alloc.c
+++ b/src/mesa/drivers/dri/sis/sis_alloc.c
@@ -170,7 +170,7 @@ sisAllocZStencilBuffer( sisContextPtr smesa )
memset( &smesa->zClearPacket, 0, sizeof(ENGPACKET) );
smesa->zClearPacket.dwSrcPitch = (z_depth == 2) ? 0x80000000 : 0xf0000000;
- smesa->zClearPacket.dwDestBaseAddr = (GLint)(addr -
+ smesa->zClearPacket.dwDestBaseAddr = (unsigned long)(addr -
(unsigned long)smesa->FbBase);
smesa->zClearPacket.wDestPitch = width2;
smesa->zClearPacket.stdwDestPos.wY = 0;
@@ -218,7 +218,7 @@ sisAllocBackbuffer( sisContextPtr smesa )
addr = (char *)ALIGNMENT( (unsigned long)addr, DRAW_BUFFER_HW_ALIGNMENT );
smesa->backbuffer = addr;
- smesa->backOffset = (GLint)(addr - (unsigned long)smesa->FbBase);
+ smesa->backOffset = (unsigned long)(addr - (unsigned long)smesa->FbBase);
smesa->backPitch = width2 * depth;
memset ( &smesa->cbClearPacket, 0, sizeof(ENGPACKET) );
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_screen.c b/src/mesa/drivers/dri/tdfx/tdfx_screen.c
index 48cff3f02c..679c2d7560 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_screen.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_screen.c
@@ -118,7 +118,7 @@ static GLboolean
tdfxInitDriver( __DRIscreenPrivate *sPriv )
{
if ( TDFX_DEBUG & DEBUG_VERBOSE_DRI ) {
- fprintf( stderr, "%s( %p )\n", __FUNCTION__, sPriv );
+ fprintf( stderr, "%s( %p )\n", __FUNCTION__, (void *)sPriv );
}
/* Check the DRI externsion version */
@@ -195,7 +195,7 @@ tdfxSwapBuffers( __DRIdrawablePrivate *driDrawPriv )
GLframebuffer *mesaBuffer;
if ( TDFX_DEBUG & DEBUG_VERBOSE_DRI ) {
- fprintf( stderr, "%s( %p )\n", __FUNCTION__, driDrawPriv );
+ fprintf( stderr, "%s( %p )\n", __FUNCTION__, (void *)driDrawPriv );
}
mesaBuffer = (GLframebuffer *) driDrawPriv->driverPrivate;
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_span.c b/src/mesa/drivers/dri/tdfx/tdfx_span.c
index 43fcb90fd2..0d2bc811e0 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_span.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_span.c
@@ -572,14 +572,6 @@ GetFbParams(tdfxContextPtr fxMesa,
*
* Recall that x and y are screen coordinates.
*/
-#define GET_FB_DATA(ReadParamsp, type, x, y) \
- (((x) < (ReadParamsp)->firstWrappedX) \
- ? (((type *)((ReadParamsp)->lfbPtr)) \
- [(y) * ((ReadParamsp)->LFBStrideInElts) \
- + (x)]) \
- : (((type *)((ReadParamsp)->lfbWrapPtr)) \
- [((y)) * ((ReadParamsp)->LFBStrideInElts) \
- + ((x) - (ReadParamsp)->firstWrappedX)]))
#define GET_ORDINARY_FB_DATA(ReadParamsp, type, x, y) \
(((type *)((ReadParamsp)->lfbPtr)) \
[(y) * ((ReadParamsp)->LFBStrideInElts) \
@@ -588,12 +580,21 @@ GetFbParams(tdfxContextPtr fxMesa,
(((type *)((ReadParamsp)->lfbWrapPtr)) \
[((y)) * ((ReadParamsp)->LFBStrideInElts) \
+ ((x) - (ReadParamsp)->firstWrappedX)])
-#define PUT_FB_DATA(ReadParamsp, type, x, y, value) \
- (GET_FB_DATA(ReadParamsp, type, x, y) = (type)(value))
+#define GET_FB_DATA(ReadParamsp, type, x, y) \
+ (((x) < (ReadParamsp)->firstWrappedX) \
+ ? GET_ORDINARY_FB_DATA(ReadParamsp, type, x, y) \
+ : GET_WRAPPED_FB_DATA(ReadParamsp, type, x, y))
#define PUT_ORDINARY_FB_DATA(ReadParamsp, type, x, y, value) \
(GET_ORDINARY_FB_DATA(ReadParamsp, type, x, y) = (type)(value))
#define PUT_WRAPPED_FB_DATA(ReadParamsp, type, x, y, value) \
(GET_WRAPPED_FB_DATA(ReadParamsp, type, x, y) = (type)(value))
+#define PUT_FB_DATA(ReadParamsp, type, x, y, value) \
+ do { \
+ if ((x) < (ReadParamsp)->firstWrappedX) \
+ PUT_ORDINARY_FB_DATA(ReadParamsp, type, x, y, value); \
+ else \
+ PUT_WRAPPED_FB_DATA(ReadParamsp, type, x, y, value); \
+ } while (0)
static void
tdfxDDWriteDepthSpan(GLcontext * ctx,
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_texman.c b/src/mesa/drivers/dri/tdfx/tdfx_texman.c
index 9bfd5de5f9..6f303aee66 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_texman.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_texman.c
@@ -880,7 +880,7 @@ tdfxTMMoveOutTM_NoLock( tdfxContextPtr fxMesa, struct gl_texture_object *tObj )
tdfxTexInfo *ti = TDFX_TEXTURE_DATA(tObj);
if (MESA_VERBOSE & VERBOSE_DRIVER) {
- fprintf(stderr, "fxmesa: %s(%p (%d))\n", __FUNCTION__, tObj, tObj->Name);
+ fprintf(stderr, "fxmesa: %s(%p (%d))\n", __FUNCTION__, (void *)tObj, tObj->Name);
}
/*
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c
index bdf6f1d428..1a784c5fd8 100644
--- a/src/mesa/drivers/x11/xm_api.c
+++ b/src/mesa/drivers/x11/xm_api.c
@@ -794,6 +794,8 @@ noFaultXAllocColor( int client,
static GLboolean setup_grayscale( int client, XMesaVisual v,
XMesaBuffer buffer, XMesaColormap cmap )
{
+ (void) DitherValues; /* Muffle compiler */
+
if (GET_VISUAL_DEPTH(v)<4 || GET_VISUAL_DEPTH(v)>16) {
return GL_FALSE;
}
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index f26907eeb7..d4df749f50 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -223,9 +223,10 @@ extern void _ext_mesa_free_pixelbuffer( void *pb );
*** USE_IEEE: Determine if we're using IEEE floating point
***/
#if defined(__i386__) || defined(__386__) || defined(__sparc__) || \
- defined(__s390x__) || defined(__powerpc__) || defined(__AMD64__) || \
- defined(__ia64__) || \
- ( defined(__alpha__) && ( defined(__IEEE_FLOAT) || !defined(VMS) ) )
+ defined(__s390x__) || defined(__powerpc__) || \
+ defined(__AMD64__) || defined(__amd64__) || \
+ defined(ia64) || defined(__ia64__) || \
+ (defined(__alpha__) && (defined(__IEEE_FLOAT) || !defined(VMS)))
#define USE_IEEE
#define IEEE_ONE 0x3f800000
#endif
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index cd23f3c77d..ef81dd654a 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -3553,9 +3553,7 @@ make_2d_mipmap(const struct gl_texture_format *format, GLint border,
const GLint dstRowStride = bpt * dstWidth;
const GLubyte *srcA, *srcB;
GLubyte *dst;
- GLint row, colStride;
-
- colStride = (srcWidth == dstWidth) ? 1 : 2;
+ GLint row;
/* Compute src and dst pointers, skipping any border */
srcA = srcPtr + border * ((srcWidth + 1) * bpt);
diff --git a/src/mesa/math/m_debug_clip.c b/src/mesa/math/m_debug_clip.c
index 867850c613..c74ca5f7e4 100644
--- a/src/mesa/math/m_debug_clip.c
+++ b/src/mesa/math/m_debug_clip.c
@@ -37,6 +37,11 @@
#include "m_debug.h"
#include "m_debug_util.h"
+#ifdef __UNIXOS2__
+/* The linker doesn't like empty files */
+static char dummy;
+#endif
+
#ifdef DEBUG /* This code only used for debugging */
static clip_func *clip_tab[2] = {
diff --git a/src/mesa/math/m_debug_norm.c b/src/mesa/math/m_debug_norm.c
index 4eac6f6dc6..e403998550 100644
--- a/src/mesa/math/m_debug_norm.c
+++ b/src/mesa/math/m_debug_norm.c
@@ -38,6 +38,11 @@
#include "m_debug_util.h"
+#ifdef __UNIXOS2__
+/* The linker doesn't like empty files */
+static char dummy;
+#endif
+
#ifdef DEBUG /* This code only used for debugging */
diff --git a/src/mesa/math/m_debug_xform.c b/src/mesa/math/m_debug_xform.c
index e173d14bd5..728ee2f1ef 100644
--- a/src/mesa/math/m_debug_xform.c
+++ b/src/mesa/math/m_debug_xform.c
@@ -38,6 +38,11 @@
#include "m_debug.h"
#include "m_debug_util.h"
+#ifdef __UNIXOS2__
+/* The linker doesn't like empty files */
+static char dummy;
+#endif
+
#ifdef DEBUG /* This code only used for debugging */
diff --git a/src/mesa/math/m_xform.c b/src/mesa/math/m_xform.c
index 8bb5e623c6..c1d543b07e 100644
--- a/src/mesa/math/m_xform.c
+++ b/src/mesa/math/m_xform.c
@@ -185,7 +185,7 @@ void _mesa_transform_point_sz( GLfloat Q[4], const GLfloat M[16],
/*
* This is called only once. It initializes several tables with pointers
* to optimized transformation functions. This is where we can test for
- * AMD 3Dnow! capability, Intel Katmai, etc. and hook in the right code.
+ * AMD 3Dnow! capability, Intel SSE, etc. and hook in the right code.
*/
void
_math_init_transformation( void )
diff --git a/src/mesa/sparc/clip.S b/src/mesa/sparc/clip.S
index fc5c677ee4..4243cae453 100644
--- a/src/mesa/sparc/clip.S
+++ b/src/mesa/sparc/clip.S
@@ -25,6 +25,13 @@
#define VEC_SIZE_3 7
#define VEC_SIZE_4 15
+#ifdef SVR4
+ /* Solaris requires this for 64-bit. */
+ .register %g2, #scratch
+ .register %g3, #scratch
+ .register %g7, #scratch
+#endif
+
.text
.align 64
diff --git a/src/mesa/sparc/norm.S b/src/mesa/sparc/norm.S
index 02f0f0d4c3..6f7356b948 100644
--- a/src/mesa/sparc/norm.S
+++ b/src/mesa/sparc/norm.S
@@ -1,7 +1,13 @@
-/* $Id: norm.S,v 1.2 2003/12/01 22:40:51 brianp Exp $ */
+/* $Id: norm.S,v 1.3 2004/04/26 10:10:25 alanh Exp $ */
#include "sparc_matrix.h"
+#ifdef SVR4
+ /* Solaris requires this for 64-bit. */
+ .register %g2, #scratch
+ .register %g3, #scratch
+#endif
+
.text
#if defined(__sparc_v9__) && !defined(__linux__)
diff --git a/src/mesa/sparc/xform.S b/src/mesa/sparc/xform.S
index a57d35720e..769a9c16fa 100644
--- a/src/mesa/sparc/xform.S
+++ b/src/mesa/sparc/xform.S
@@ -1,4 +1,4 @@
-/* $Id: xform.S,v 1.2 2001/06/05 23:54:01 davem69 Exp $ */
+/* $Id: xform.S,v 1.3 2004/04/26 10:10:25 alanh Exp $ */
/* TODO
*
@@ -18,6 +18,12 @@
#include "sparc_matrix.h"
+#ifdef SVR4
+ /* Solaris requires this for 64-bit. */
+ .register %g2, #scratch
+ .register %g3, #scratch
+#endif
+
.text
.align 64
diff --git a/src/mesa/tnl/t_save_api.c b/src/mesa/tnl/t_save_api.c
index f0f573c090..1f332c7a9a 100644
--- a/src/mesa/tnl/t_save_api.c
+++ b/src/mesa/tnl/t_save_api.c
@@ -1481,8 +1481,7 @@ void _tnl_NewList( GLcontext *ctx, GLuint list, GLenum mode )
void _tnl_EndList( GLcontext *ctx )
{
- TNLcontext *tnl = TNL_CONTEXT(ctx);
- assert(tnl->save.vertex_size == 0);
+ assert(TNL_CONTEXT(ctx)->save.vertex_size == 0);
}
void _tnl_BeginCallList( GLcontext *ctx, GLuint list )
diff --git a/src/mesa/tnl/t_vb_lighttmp.h b/src/mesa/tnl/t_vb_lighttmp.h
index cd7988518b..2eaf61ff4d 100644
--- a/src/mesa/tnl/t_vb_lighttmp.h
+++ b/src/mesa/tnl/t_vb_lighttmp.h
@@ -28,7 +28,7 @@
*/
-#if (IDX & LIGHT_TWOSIDE)
+#if IDX & LIGHT_TWOSIDE
# define NR_SIDES 2
#else
# define NR_SIDES 1
@@ -283,18 +283,19 @@ static void TAG(light_rgba)( GLcontext *ctx,
GLfloat sum[2][3];
struct gl_light *light;
- if ( IDX & LIGHT_MATERIAL ) {
- update_materials( ctx, store );
- sumA[0] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE][3];
+#if IDX & LIGHT_MATERIAL
+ update_materials( ctx, store );
+ sumA[0] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE][3];
#if IDX & LIGHT_TWOSIDE
- sumA[1] = ctx->Light.Material.Attrib[MAT_ATTRIB_BACK_DIFFUSE][3];
+ sumA[1] = ctx->Light.Material.Attrib[MAT_ATTRIB_BACK_DIFFUSE][3];
+#endif
#endif
- }
COPY_3V(sum[0], base[0]);
- if ( IDX & LIGHT_TWOSIDE )
- COPY_3V(sum[1], base[1]);
+#if IDX & LIGHT_TWOSIDE
+ COPY_3V(sum[1], base[1]);
+#endif
/* Add contribution from each enabled light source */
foreach (light, &ctx->Light.EnabledList) {
@@ -467,12 +468,16 @@ static void TAG(light_fast_rgba_single)( GLcontext *ctx,
GLfloat n_dot_VP;
- if ( IDX & LIGHT_MATERIAL )
- update_materials( ctx, store );
+#if IDX & LIGHT_MATERIAL
+ update_materials( ctx, store );
+#endif
/* No attenuation, so incoporate _MatAmbient into base color.
*/
- if ( j == 0 || (IDX & LIGHT_MATERIAL) ) {
+#if !(IDX & LIGHT_MATERIAL)
+ if ( j == 0 )
+#endif
+ {
COPY_3V(base[0], light->_MatAmbient[0]);
ACC_3V(base[0], ctx->Light._BaseColor[0] );
base[0][3] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE][3];
@@ -565,14 +570,14 @@ static void TAG(light_fast_rgba)( GLcontext *ctx,
GLfloat sum[2][3];
- if ( IDX & LIGHT_MATERIAL ) {
- update_materials( ctx, store );
+#if IDX & LIGHT_MATERIAL
+ update_materials( ctx, store );
- sumA[0] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE][3];
+ sumA[0] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE][3];
#if IDX & LIGHT_TWOSIDE
- sumA[1] = ctx->Light.Material.Attrib[MAT_ATTRIB_BACK_DIFFUSE][3];
+ sumA[1] = ctx->Light.Material.Attrib[MAT_ATTRIB_BACK_DIFFUSE][3];
+#endif
#endif
- }
COPY_3V(sum[0], ctx->Light._BaseColor[0]);
@@ -675,14 +680,15 @@ static void TAG(light_ci)( GLcontext *ctx,
GLuint side = 0;
struct gl_light *light;
- if ( IDX & LIGHT_MATERIAL )
- update_materials( ctx, store );
+#if IDX & LIGHT_MATERIAL
+ update_materials( ctx, store );
+#endif
diffuse[0] = specular[0] = 0.0F;
- if ( IDX & LIGHT_TWOSIDE ) {
+#if IDX & LIGHT_TWOSIDE
diffuse[1] = specular[1] = 0.0F;
- }
+#endif
/* Accumulate diffuse and specular from each light source */
foreach (light, &ctx->Light.EnabledList) {
diff --git a/src/mesa/x86/3dnow_normal.S b/src/mesa/x86/3dnow_normal.S
index 4c7740a025..4c1aca29cf 100644
--- a/src/mesa/x86/3dnow_normal.S
+++ b/src/mesa/x86/3dnow_normal.S
@@ -1,4 +1,4 @@
-/* $Id: 3dnow_normal.S,v 1.7 2004/04/08 08:10:37 alanh Exp $ */
+/* $Id: 3dnow_normal.S,v 1.8 2004/04/26 10:10:25 alanh Exp $ */
/*
* Mesa 3-D graphics library
@@ -28,6 +28,8 @@
* 3Dnow assembly code by Holger Waechtler
*/
+#ifdef USE_3DNOW_ASM
+
#include "matypes.h"
#include "norm_args.h"
@@ -834,3 +836,5 @@ LLBL (G3R_end):
POP_L ( ESI )
POP_L ( EDI )
RET
+
+#endif
diff --git a/src/mesa/x86/3dnow_xform1.S b/src/mesa/x86/3dnow_xform1.S
index 9957676ee9..f551f56626 100644
--- a/src/mesa/x86/3dnow_xform1.S
+++ b/src/mesa/x86/3dnow_xform1.S
@@ -1,4 +1,4 @@
-/* $Id: 3dnow_xform1.S,v 1.1 2001/03/29 06:46:16 gareth Exp $ */
+/* $Id: 3dnow_xform1.S,v 1.2 2004/04/26 10:10:25 alanh Exp $ */
/*
* Mesa 3-D graphics library
@@ -24,6 +24,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+#ifdef USE_3DNOW_ASM
#include "matypes.h"
#include "xform_args.h"
@@ -421,3 +422,5 @@ LLBL( G3TP3R_3 ):
POP_L ( EDI )
POP_L ( ESI )
RET
+
+#endif
diff --git a/src/mesa/x86/3dnow_xform2.S b/src/mesa/x86/3dnow_xform2.S
index cb3a8531df..cbe3a19bfa 100644
--- a/src/mesa/x86/3dnow_xform2.S
+++ b/src/mesa/x86/3dnow_xform2.S
@@ -1,4 +1,4 @@
-/* $Id: 3dnow_xform2.S,v 1.1 2001/03/29 06:46:16 gareth Exp $ */
+/* $Id: 3dnow_xform2.S,v 1.2 2004/04/26 10:10:25 alanh Exp $ */
/*
* Mesa 3-D graphics library
@@ -24,6 +24,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+#ifdef USE_3DNOW_ASM
#include "matypes.h"
#include "xform_args.h"
@@ -462,3 +463,4 @@ LLBL( G3TPIR_4 ):
POP_L ( EDI )
POP_L ( ESI )
RET
+#endif
diff --git a/src/mesa/x86/3dnow_xform3.S b/src/mesa/x86/3dnow_xform3.S
index c1e3bf99d3..2822794fb2 100644
--- a/src/mesa/x86/3dnow_xform3.S
+++ b/src/mesa/x86/3dnow_xform3.S
@@ -1,4 +1,4 @@
-/* $Id: 3dnow_xform3.S,v 1.2 2001/10/22 01:21:16 brianp Exp $ */
+/* $Id: 3dnow_xform3.S,v 1.3 2004/04/26 10:10:25 alanh Exp $ */
/*
* Mesa 3-D graphics library
@@ -24,6 +24,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+#ifdef USE_3DNOW_ASM
#include "matypes.h"
#include "xform_args.h"
@@ -546,3 +547,4 @@ LLBL( G3TPIR_2 ):
POP_L ( EDI )
POP_L ( ESI )
RET
+#endif
diff --git a/src/mesa/x86/3dnow_xform4.S b/src/mesa/x86/3dnow_xform4.S
index 0336b708bc..6692529a10 100644
--- a/src/mesa/x86/3dnow_xform4.S
+++ b/src/mesa/x86/3dnow_xform4.S
@@ -1,4 +1,4 @@
-/* $Id: 3dnow_xform4.S,v 1.2 2001/10/22 01:21:16 brianp Exp $ */
+/* $Id: 3dnow_xform4.S,v 1.3 2004/04/26 10:10:25 alanh Exp $ */
/*
* Mesa 3-D graphics library
@@ -24,6 +24,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+#ifdef USE_3DNOW_ASM
#include "matypes.h"
#include "xform_args.h"
@@ -555,3 +556,4 @@ LLBL( G3TPIR_2 ):
POP_L ( EDI )
POP_L ( ESI )
RET
+#endif
diff --git a/src/mesa/x86/assyntax.h b/src/mesa/x86/assyntax.h
index 62d079f253..16aaf900f7 100644
--- a/src/mesa/x86/assyntax.h
+++ b/src/mesa/x86/assyntax.h
@@ -274,9 +274,7 @@
#define GLOBL CHOICE(.globl, .globl, .extern)
#define GLOBAL GLOBL
#define EXTERN GLOBL
-/*
-#define ALIGNTEXT32 CHOICE(.align 32, .align ARG2(5,0x90), .align 32)
-*/
+#ifndef __AOUT__
#define ALIGNTEXT32 CHOICE(.align 32, .balign 32, .align 32)
#define ALIGNTEXT16 CHOICE(.align 16, .balign 16, .align 16)
#define ALIGNTEXT8 CHOICE(.align 8, .balign 8, .align 8)
@@ -294,6 +292,26 @@
#define ALIGNDATA8 CHOICE(.align 8, .balign ARG2(8,0x0), .align 8)
#define ALIGNDATA4 CHOICE(.align 4, .balign ARG2(4,0x0), .align 4)
#define ALIGNDATA2 CHOICE(.align 2, .balign ARG2(2,0x0), .align 2)
+#else
+/* 'as -aout' on FreeBSD doesn't have .balign */
+#define ALIGNTEXT32 CHOICE(.align 32, .align ARG2(5,0x90), .align 32)
+#define ALIGNTEXT16 CHOICE(.align 16, .align ARG2(4,0x90), .align 16)
+#define ALIGNTEXT8 CHOICE(.align 8, .align ARG2(3,0x90), .align 8)
+#define ALIGNTEXT4 CHOICE(.align 4, .align ARG2(2,0x90), .align 4)
+#define ALIGNTEXT2 CHOICE(.align 2, .align ARG2(1,0x90), .align 2)
+/* ALIGNTEXT4ifNOP is the same as ALIGNTEXT4, but only if the space is
+ * guaranteed to be filled with NOPs. Otherwise it does nothing.
+ */
+#define ALIGNTEXT32ifNOP CHOICE(.align 32, .align ARG2(5,0x90), /*can't do it*/)
+#define ALIGNTEXT16ifNOP CHOICE(.align 16, .align ARG2(4,0x90), /*can't do it*/)
+#define ALIGNTEXT8ifNOP CHOICE(.align 8, .align ARG2(3,0x90), /*can't do it*/)
+#define ALIGNTEXT4ifNOP CHOICE(.align 4, .align ARG2(2,0x90), /*can't do it*/)
+#define ALIGNDATA32 CHOICE(.align 32, .align ARG2(5,0x0), .align 32)
+#define ALIGNDATA16 CHOICE(.align 16, .align ARG2(4,0x0), .align 16)
+#define ALIGNDATA8 CHOICE(.align 8, .align ARG2(3,0x0), .align 8)
+#define ALIGNDATA4 CHOICE(.align 4, .align ARG2(2,0x0), .align 4)
+#define ALIGNDATA2 CHOICE(.align 2, .align ARG2(1,0x0), .align 2)
+#endif /* __AOUT__ */
#define FILE(s) CHOICE(.file s, .file s, .file s)
#define STRING(s) CHOICE(.string s, .asciz s, .asciz s)
#define D_LONG CHOICE(.long, .long, .data4)
diff --git a/src/mesa/x86/common_x86.c b/src/mesa/x86/common_x86.c
index a8daada849..90fa7e48ff 100644
--- a/src/mesa/x86/common_x86.c
+++ b/src/mesa/x86/common_x86.c
@@ -28,7 +28,7 @@
*
* Written by Holger Waechtler <holger@akaflieg.extern.tu-berlin.de>
* Changed by Andre Werthmann <wertmann@cs.uni-potsdam.de> for using the
- * new Katmai functions.
+ * new SSE functions.
*/
/* XXX these includes should probably go into imports.h or glheader.h */
diff --git a/src/mesa/x86/common_x86_asm.h b/src/mesa/x86/common_x86_asm.h
index 83e1521ec8..a913bb1d09 100644
--- a/src/mesa/x86/common_x86_asm.h
+++ b/src/mesa/x86/common_x86_asm.h
@@ -1,4 +1,4 @@
-/* $Id: common_x86_asm.h,v 1.10 2002/10/29 20:28:57 brianp Exp $ */
+/* $Id: common_x86_asm.h,v 1.11 2004/04/26 10:10:25 alanh Exp $ */
/*
* Mesa 3-D graphics library
@@ -30,7 +30,7 @@
*
* Written by Holger Waechtler <holger@akaflieg.extern.tu-berlin.de>
* Changed by Andre Werthmann <wertmann@cs.uni-potsdam.de> for using the
- * new Katmai functions
+ * new SSE functions
*
* Reimplemented by Gareth Hughes in a more
* future-proof manner, based on code in the Linux kernel.
diff --git a/src/mesa/x86/mmx_blend.S b/src/mesa/x86/mmx_blend.S
index d049aa12be..f7326cdbe6 100644
--- a/src/mesa/x86/mmx_blend.S
+++ b/src/mesa/x86/mmx_blend.S
@@ -1,9 +1,11 @@
+
/*
* Written by José Fonseca <j_r_fonseca@yahoo.co.uk>
*/
-#include "matypes.h"
+#ifdef USE_MMX_ASM
+#include "matypes.h"
/* integer multiplication - alpha plus one
*
@@ -361,3 +363,4 @@ TWO(MOVQ ( MM1, REGIND(rgba) ))
#include "mmx_blendtmp.h"
+#endif
diff --git a/src/mesa/x86/sse_normal.S b/src/mesa/x86/sse_normal.S
index 64bd38486c..ca545f496d 100644
--- a/src/mesa/x86/sse_normal.S
+++ b/src/mesa/x86/sse_normal.S
@@ -1,4 +1,4 @@
-/* $Id: sse_normal.S,v 1.3 2003/11/26 08:32:36 dborca Exp $ */
+/* $Id: sse_normal.S,v 1.4 2004/04/26 10:10:25 alanh Exp $ */
/*
* Mesa 3-D graphics library
@@ -31,6 +31,7 @@
* data (trans-matrix, src_vert, dst_vert) needs to be 16byte aligned !
*/
+#ifdef USE_SSE_ASM
#include "matypes.h"
#include "norm_args.h"
@@ -250,3 +251,4 @@ LLBL(K_G3TNNRR_finish):
POP_L ( ESI )
RET
#undef FRAME_OFFSET
+#endif
diff --git a/src/mesa/x86/sse_xform1.S b/src/mesa/x86/sse_xform1.S
index 89c5567331..90768ba170 100644
--- a/src/mesa/x86/sse_xform1.S
+++ b/src/mesa/x86/sse_xform1.S
@@ -1,4 +1,4 @@
-/* $Id: sse_xform1.S,v 1.1 2001/03/29 06:46:27 gareth Exp $ */
+/* $Id: sse_xform1.S,v 1.2 2004/04/26 10:10:25 alanh Exp $ */
/*
* Mesa 3-D graphics library
@@ -31,6 +31,7 @@
* data (trans-matrix, src_vert, dst_vert) needs to be 16byte aligned !
*/
+#ifdef USE_SSE_ASM
#include "matypes.h"
#include "xform_args.h"
@@ -431,3 +432,4 @@ LLBL(K_GTP13P3DR_finish):
POP_L( ESI )
RET
#undef FRAME_OFFSET
+#endif
diff --git a/src/mesa/x86/sse_xform2.S b/src/mesa/x86/sse_xform2.S
index f936088f91..49f9889f2e 100644
--- a/src/mesa/x86/sse_xform2.S
+++ b/src/mesa/x86/sse_xform2.S
@@ -1,4 +1,4 @@
-/* $Id: sse_xform2.S,v 1.1 2001/03/29 06:46:27 gareth Exp $ */
+/* $Id: sse_xform2.S,v 1.2 2004/04/26 10:10:25 alanh Exp $ */
/*
* Mesa 3-D graphics library
@@ -31,6 +31,7 @@
* data (trans-matrix, src_vert, dst_vert) needs to be 16byte aligned !
*/
+#ifdef USE_SSE_ASM
#include "matypes.h"
#include "xform_args.h"
@@ -450,3 +451,4 @@ LLBL(K_GTP23P3DR_finish):
POP_L( ESI )
RET
#undef FRAME_OFFSET
+#endif
diff --git a/src/mesa/x86/sse_xform3.S b/src/mesa/x86/sse_xform3.S
index ff989c337d..f64baaccb7 100644
--- a/src/mesa/x86/sse_xform3.S
+++ b/src/mesa/x86/sse_xform3.S
@@ -1,4 +1,4 @@
-/* $Id: sse_xform3.S,v 1.1 2001/03/29 06:46:27 gareth Exp $ */
+/* $Id: sse_xform3.S,v 1.2 2004/04/26 10:10:25 alanh Exp $ */
/*
* Mesa 3-D graphics library
@@ -31,6 +31,7 @@
* data (trans-matrix, src_vert, dst_vert) needs to be 16byte aligned !
*/
+#ifdef USE_SSE_ASM
#include "matypes.h"
#include "xform_args.h"
@@ -496,3 +497,4 @@ LLBL(K_GTP3P3DR_finish):
POP_L( ESI )
RET
#undef FRAME_OFFSET
+#endif
diff --git a/src/mesa/x86/sse_xform4.S b/src/mesa/x86/sse_xform4.S
index 13cb2a3ecb..5a64c9e31e 100644
--- a/src/mesa/x86/sse_xform4.S
+++ b/src/mesa/x86/sse_xform4.S
@@ -1,4 +1,4 @@
-/* $Id: sse_xform4.S,v 1.1 2001/03/29 06:46:27 gareth Exp $ */
+/* $Id: sse_xform4.S,v 1.2 2004/04/26 10:10:25 alanh Exp $ */
/*
* Mesa 3-D graphics library
@@ -24,6 +24,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+#ifdef USE_SSE_ASM
#include "matypes.h"
#include "xform_args.h"
@@ -224,3 +225,4 @@ LLBL( sse_identity_done ):
POP_L( EDI )
POP_L( ESI )
RET
+#endif