diff options
author | José Fonseca <[email protected]> | 2008-04-21 13:02:59 +0900 |
---|---|---|
committer | José Fonseca <[email protected]> | 2008-04-21 13:02:59 +0900 |
commit | 40e0439db448a7d93ddb18faac7f14b47b1343c0 (patch) | |
tree | b3f67744af49cc93bd01d1ad23f45c3deaa1d0d2 /src/gallium/auxiliary/rtasm/rtasm_cpu.c | |
parent | 29858e1b553cee1fd7e3380ea62c69d2a6b91b95 (diff) |
gallium: Centralize SSE usage logic.
Diffstat (limited to 'src/gallium/auxiliary/rtasm/rtasm_cpu.c')
-rw-r--r-- | src/gallium/auxiliary/rtasm/rtasm_cpu.c | 10 |
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 d577ff5b42f..175245a9f6b 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 |