[Mesa-dev] [PATCH V3 1/3] mesa: add runtime support for SSSE3
Timothy Arceri
t_arceri at yahoo.com.au
Sat Nov 8 03:12:12 PST 2014
V3:
- remove flag check from config
V2:
- remove unrequired #ifdef bit_SSSE3
- order flag check in config
Signed-off-by: Timothy Arceri <t_arceri at yahoo.com.au>
---
src/mesa/x86/common_x86.c | 2 ++
src/mesa/x86/common_x86_features.h | 4 +++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/mesa/x86/common_x86.c b/src/mesa/x86/common_x86.c
index 25f5c40..bef9cf2 100644
--- a/src/mesa/x86/common_x86.c
+++ b/src/mesa/x86/common_x86.c
@@ -352,6 +352,8 @@ _mesa_get_x86_features(void)
__get_cpuid(1, &eax, &ebx, &ecx, &edx);
+ if (ecx & bit_SSSE3)
+ _mesa_x86_cpu_features |= X86_FEATURE_SSSE3;
if (ecx & bit_SSE4_1)
_mesa_x86_cpu_features |= X86_FEATURE_SSE4_1;
}
diff --git a/src/mesa/x86/common_x86_features.h b/src/mesa/x86/common_x86_features.h
index 66f2cf6..6eb2b38 100644
--- a/src/mesa/x86/common_x86_features.h
+++ b/src/mesa/x86/common_x86_features.h
@@ -43,7 +43,8 @@
#define X86_FEATURE_XMM2 (1<<6)
#define X86_FEATURE_3DNOWEXT (1<<7)
#define X86_FEATURE_3DNOW (1<<8)
-#define X86_FEATURE_SSE4_1 (1<<9)
+#define X86_FEATURE_SSSE3 (1<<9)
+#define X86_FEATURE_SSE4_1 (1<<10)
/* standard X86 CPU features */
#define X86_CPU_FPU (1<<0)
@@ -65,6 +66,7 @@
#define cpu_has_xmm2 (_mesa_x86_cpu_features & X86_FEATURE_XMM2)
#define cpu_has_3dnow (_mesa_x86_cpu_features & X86_FEATURE_3DNOW)
#define cpu_has_3dnowext (_mesa_x86_cpu_features & X86_FEATURE_3DNOWEXT)
+#define cpu_has_ssse3 (_mesa_x86_cpu_features & X86_FEATURE_SSSE3)
#define cpu_has_sse4_1 (_mesa_x86_cpu_features & X86_FEATURE_SSE4_1)
#endif
--
1.9.3
More information about the mesa-dev
mailing list