Only use x86 / SSE assembly when USE_X86_ASM / USE_SSE_ASM are defined.
authorIan Romanick <idr@us.ibm.com>
Tue, 24 May 2005 23:03:15 +0000 (23:03 +0000)
committerIan Romanick <idr@us.ibm.com>
Tue, 24 May 2005 23:03:15 +0000 (23:03 +0000)
This makes the driver build on x86-64 again.

src/mesa/drivers/dri/unichrome/via_memcpy.c
src/mesa/drivers/dri/unichrome/via_tex.c
src/mesa/drivers/dri/unichrome/via_tex.h
src/mesa/drivers/dri/unichrome/via_tris.c

index 351ba26ff2a817f5b60095fed61ffa978686b9b5..d7b05bcaaf9499a11fcc27dea551a7a8740d477a 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "via_tex.h"
 
+#if defined( USE_SSE_ASM )
 
 #define SSE_PREFETCH "  prefetchnta "
 #define FENCE __asm__ __volatile__ ("sfence":::"memory");
@@ -134,5 +135,4 @@ void via_sse_memcpy(void *to,
    FENCE;
 }
 
-
-
+#endif /* defined( USE_SSE_ASM ) */
index 9672888f8eae05346699c8d1f6a91484a66a65d8..f628e089d337a2f67357e0c557dcf6fe85a938fb 100644 (file)
@@ -948,10 +948,14 @@ void viaInitTextureFuncs(struct dd_function_table * functions)
    functions->DeleteTexture = _mesa_delete_texture_object;
    functions->FreeTexImageData = viaFreeTextureImageData;
 
+#if defined( USE_SSE_ASM )
    if (getenv("VIA_NO_SSE"))
       functions->TextureMemCpy = _mesa_memcpy;
    else
       functions->TextureMemCpy = via_sse_memcpy;
+#else
+   functions->TextureMemCpy = _mesa_memcpy;
+#endif
 
    functions->UpdateTexturePalette = 0;
    functions->IsTextureResident = viaIsTextureResident;
index 8277aada4073f2cc57a354d0a79d3992a03083e7..73cfa91addc2924c8f7f30c1b083cd8102b42a37 100644 (file)
@@ -34,6 +34,8 @@ GLboolean viaUpdateTextureState(GLcontext *ctx);
 void viaInitTextureFuncs(struct dd_function_table * functions);
 GLboolean viaSwapOutWork( struct via_context *vmesa );
 
+#if defined( USE_SSE_ASM )
 void via_sse_memcpy( void *to, const void *from, size_t sz );
+#endif /* defined( USE_SSE_ASM ) */
 
 #endif
index e425a1eda74e8908e06bc044f337005517908aaf..898a343856b9ff2e60160f2ac0b845f2653ad0ed 100644 (file)
@@ -57,7 +57,7 @@ do {                                          \
    vb += vertsize;                             \
 } while (0)
 #else
-#if 1
+#if defined( USE_X86_ASM )
 #define COPY_DWORDS(vb, vertsize, v)                                   \
     do {                                                               \
         int j;                                                         \