summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2005-05-24 23:03:15 +0000
committerIan Romanick <[email protected]>2005-05-24 23:03:15 +0000
commite87ab8c05fb08c39432f5838c05df3b50e9a2694 (patch)
treef7e7359c8510f9c6210d8bd2dc23ccc824c9c020 /src/mesa/drivers/dri
parent6b5afb003645d2cbaabf7d9c0733f1f7891cb0a0 (diff)
Only use x86 / SSE assembly when USE_X86_ASM / USE_SSE_ASM are defined.
This makes the driver build on x86-64 again.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/unichrome/via_memcpy.c4
-rw-r--r--src/mesa/drivers/dri/unichrome/via_tex.c4
-rw-r--r--src/mesa/drivers/dri/unichrome/via_tex.h2
-rw-r--r--src/mesa/drivers/dri/unichrome/via_tris.c2
4 files changed, 9 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_memcpy.c b/src/mesa/drivers/dri/unichrome/via_memcpy.c
index 351ba26ff2a..d7b05bcaaf9 100644
--- a/src/mesa/drivers/dri/unichrome/via_memcpy.c
+++ b/src/mesa/drivers/dri/unichrome/via_memcpy.c
@@ -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 ) */
diff --git a/src/mesa/drivers/dri/unichrome/via_tex.c b/src/mesa/drivers/dri/unichrome/via_tex.c
index 9672888f8ea..f628e089d33 100644
--- a/src/mesa/drivers/dri/unichrome/via_tex.c
+++ b/src/mesa/drivers/dri/unichrome/via_tex.c
@@ -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;
diff --git a/src/mesa/drivers/dri/unichrome/via_tex.h b/src/mesa/drivers/dri/unichrome/via_tex.h
index 8277aada407..73cfa91addc 100644
--- a/src/mesa/drivers/dri/unichrome/via_tex.h
+++ b/src/mesa/drivers/dri/unichrome/via_tex.h
@@ -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
diff --git a/src/mesa/drivers/dri/unichrome/via_tris.c b/src/mesa/drivers/dri/unichrome/via_tris.c
index e425a1eda74..898a343856b 100644
--- a/src/mesa/drivers/dri/unichrome/via_tris.c
+++ b/src/mesa/drivers/dri/unichrome/via_tris.c
@@ -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; \