Mesa (openchrome-branch): Check for CPU sse support before using SSE memcpy .
Thomas Hellstrom
thomash at kemper.freedesktop.org
Sat Feb 7 15:51:50 UTC 2009
Module: Mesa
Branch: openchrome-branch
Commit: 83965dcad882c9a1dd624dfe7e64aa9cd6db67ae
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=83965dcad882c9a1dd624dfe7e64aa9cd6db67ae
Author: Thomas Hellstrom <thomas-at-shipmail-dot-org>
Date: Sat Feb 7 16:50:57 2009 +0100
Check for CPU sse support before using SSE memcpy.
---
src/mesa/drivers/dri/openchrome/via_tex.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/mesa/drivers/dri/openchrome/via_tex.c b/src/mesa/drivers/dri/openchrome/via_tex.c
index 2dbf758..4862aa0 100644
--- a/src/mesa/drivers/dri/openchrome/via_tex.c
+++ b/src/mesa/drivers/dri/openchrome/via_tex.c
@@ -947,7 +947,11 @@ viaInitTextureFuncs(struct dd_function_table *functions)
functions->CopyTexSubImage2D = viaCopyTexSubImage2D;
#if defined( USE_SSE_ASM )
- functions->TextureMemCpy = via_sse_memcpy;
+#include "x86/common_x86_asm.h"
+ if ( cpu_has_xmm )
+ functions->TextureMemCpy = via_sse_memcpy;
+ else
+ functions->TextureMemCpy = _mesa_memcpy;
#else
functions->TextureMemCpy = _mesa_memcpy;
#endif
More information about the mesa-commit
mailing list