summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/rtasm
diff options
context:
space:
mode:
authorJosé Fonseca <jrfonseca@tungstengraphics.com>2008-04-21 13:02:59 +0900
committerJosé Fonseca <jrfonseca@tungstengraphics.com>2008-04-21 13:02:59 +0900
commit40e0439db448a7d93ddb18faac7f14b47b1343c0 (patch)
treeb3f67744af49cc93bd01d1ad23f45c3deaa1d0d2 /src/gallium/auxiliary/rtasm
parent29858e1b553cee1fd7e3380ea62c69d2a6b91b95 (diff)
gallium: Centralize SSE usage logic.
Diffstat (limited to 'src/gallium/auxiliary/rtasm')
-rw-r--r--src/gallium/auxiliary/rtasm/rtasm_cpu.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/rtasm/rtasm_cpu.c b/src/gallium/auxiliary/rtasm/rtasm_cpu.c
index d577ff5b42..175245a9f6 100644
--- a/src/gallium/auxiliary/rtasm/rtasm_cpu.c
+++ b/src/gallium/auxiliary/rtasm/rtasm_cpu.c
@@ -26,14 +26,20 @@
**************************************************************************/
+#include "pipe/p_debug.h"
#include "rtasm_cpu.h"
+static boolean rtasm_sse_enabled(void)
+{
+ return !debug_get_bool_option("GALLIUM_NOSSE", FALSE);
+}
+
int rtasm_cpu_has_sse(void)
{
/* FIXME: actually detect this at run-time */
#if defined(__i386__) || defined(__386__) || defined(i386)
- return 1;
+ return rtasm_sse_enabled();
#else
return 0;
#endif
@@ -43,7 +49,7 @@ int rtasm_cpu_has_sse2(void)
{
/* FIXME: actually detect this at run-time */
#if defined(__i386__) || defined(__386__) || defined(i386)
- return 1;
+ return rtasm_sse_enabled();
#else
return 0;
#endif