gallium: Introduce PIPE_ARCH_SSE define for SSE support.
authorJosé Fonseca <jrfonseca@tungstengraphics.com>
Tue, 7 Oct 2008 05:25:09 +0000 (14:25 +0900)
committerJosé Fonseca <jrfonseca@tungstengraphics.com>
Tue, 7 Oct 2008 05:25:09 +0000 (14:25 +0900)
Besides meaning x86 and x86-64 architecture, it also depends on SSE2
support enabled on gcc.

This fixes the linux-debug build.

src/gallium/auxiliary/draw/draw_vs_sse.c
src/gallium/auxiliary/tgsi/tgsi_sse2.c
src/gallium/auxiliary/util/u_sse.h
src/gallium/drivers/softpipe/sp_fs_sse.c
src/gallium/include/pipe/p_config.h

index 0efabd9de8bda0b70f3bdb6ec9e3e9fb10b6a881..b11ae316627cd0fbbc0f2bd1c391ffafedf56e1a 100644 (file)
@@ -37,7 +37,7 @@
 
 #include "draw_vs.h"
 
-#if defined(PIPE_ARCH_X86)
+#if defined(PIPE_ARCH_X86) && defined(PIPE_ARCH_SSE)
 
 #include "pipe/p_shader_tokens.h"
 
index 79f424b692ae12ec1c8d2b9805e274ede81cdbe9..f79170b9d65964de0ea312373e470fe5891a413e 100644 (file)
@@ -27,7 +27,7 @@
 
 #include "pipe/p_config.h"
 
-#ifdef PIPE_ARCH_X86
+#if defined(PIPE_ARCH_X86) && defined(PIPE_ARCH_SSE)
 
 #include "pipe/p_debug.h"
 #include "pipe/p_shader_tokens.h"
index 68e56f081650d357e4800282dafcc3ac396ba8d6..e2a8491e62c67e6557f7b3c2e77d05f922ef20e9 100644 (file)
@@ -39,7 +39,7 @@
 
 #include "pipe/p_config.h"
 
-#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
+#if defined(PIPE_ARCH_SSE)
 
 #include <xmmintrin.h>
 #include <emmintrin.h>
index 496ed43df26fbadc1da4c030a73108a37e11f061..0111469405f1f960ff6874ea567819ea9d180ae4 100644 (file)
@@ -40,7 +40,7 @@
 #include "tgsi/tgsi_sse2.h"
 
 
-#ifdef PIPE_ARCH_X86
+#if defined(PIPE_ARCH_X86) && defined(PIPE_ARCH_SSE)
 
 #include "rtasm/rtasm_x86sse.h"
 
index af3746c0265ec397df05e54a7c542f898cd52641..ef05547819deea1d73d954864a20796cd1f79f29 100644 (file)
 #define PIPE_ARCH_X86_64
 #endif
 
+#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
+#if defined(PIPE_CC_GCC) && !defined(__SSE2__)
+/* #warning SSE2 support requires -msse -msse2 compiler options */
+#else
+#define PIPE_ARCH_SSE
+#endif
+#endif
+
 #if 0 /* FIXME */
 #define PIPE_ARCH_PPC
 #endif