diff options
author | Brian Paul <[email protected]> | 2002-07-11 15:33:02 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2002-07-11 15:33:02 +0000 |
commit | 902d2faadf37a5627ab2cbcd8993825c8749ec82 (patch) | |
tree | 333dc5b34edb49672b203f67a8e1aab89373c96a /src/mesa/x86/common_x86.c | |
parent | 8eaffa2a1c807f2f966f7f48c705c91fdd3b9ab5 (diff) |
applied Eric Anholt's patch for Athlon SSE
Diffstat (limited to 'src/mesa/x86/common_x86.c')
-rw-r--r-- | src/mesa/x86/common_x86.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/mesa/x86/common_x86.c b/src/mesa/x86/common_x86.c index bcffb6a01be..aaef4f8349e 100644 --- a/src/mesa/x86/common_x86.c +++ b/src/mesa/x86/common_x86.c @@ -1,4 +1,4 @@ -/* $Id: common_x86.c,v 1.18 2002/06/29 19:48:17 brianp Exp $ */ +/* $Id: common_x86.c,v 1.19 2002/07/11 15:33:02 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -38,6 +38,10 @@ #if defined(USE_SSE_ASM) && defined(__linux__) #include <signal.h> #endif +#if defined(USE_SSE_ASM) && defined(__FreeBSD__) +#include <sys/types.h> +#include <sys/sysctl.h> +#endif #include "context.h" #include "common_x86_asm.h" @@ -213,8 +217,16 @@ static void check_os_sse_support( void ) message( "Cannot test OS support for SSE, disabling to be safe.\n" ); _mesa_x86_cpu_features &= ~(X86_FEATURE_XMM); #endif /* _POSIX_SOURCE && X86_FXSR_MAGIC */ +#elif defined(__FreeBSD__) + { + int ret, len, enabled; + len = sizeof(enabled); + ret = sysctlbyname("hw.instruction_sse", &enabled, &len, NULL, 0); + if (ret || !enabled) + _mesa_x86_cpu_features &= ~(X86_FEATURE_XMM); + } #else - /* Do nothing on non-Linux platforms for now. + /* Do nothing on other platforms for now. */ message( "Not testing OS support for SSE, leaving enabled.\n" ); #endif /* __linux__ */ |