gallium: Centralize SSE usage logic.

This commit is contained in:
José Fonseca
2008-04-21 13:02:59 +09:00
parent 29858e1b55
commit 40e0439db4
5 changed files with 10 additions and 19 deletions

View File

@@ -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