summaryrefslogtreecommitdiffstats
path: root/src/mesa/x86/common_x86_features.h
diff options
context:
space:
mode:
authorMatt Atwood <[email protected]>2014-05-02 09:44:44 -0700
committerMatt Turner <[email protected]>2014-05-22 10:17:16 -0700
commita2fb71e23bced3f3585e91726590efe6034a10ed (patch)
tree1c97317b16355bc29ebc76f1649cab5acee52067 /src/mesa/x86/common_x86_features.h
parent8b9302f2b4b0536abb91cb73682ec13640fe9eaf (diff)
mesa/x86: add SSE4.1 runtime detection.
Add a bit to _mesa_x86_features for SSE 4.1, along with macros to query. Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/x86/common_x86_features.h')
-rw-r--r--src/mesa/x86/common_x86_features.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/x86/common_x86_features.h b/src/mesa/x86/common_x86_features.h
index 86254844034..66f2cf651c2 100644
--- a/src/mesa/x86/common_x86_features.h
+++ b/src/mesa/x86/common_x86_features.h
@@ -43,6 +43,7 @@
#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)
/* standard X86 CPU features */
#define X86_CPU_FPU (1<<0)
@@ -50,6 +51,8 @@
#define X86_CPU_MMX (1<<23)
#define X86_CPU_XMM (1<<25)
#define X86_CPU_XMM2 (1<<26)
+/* ECX. */
+#define X86_CPU_SSE4_1 (1<<19)
/* extended X86 CPU features */
#define X86_CPUEXT_MMX_EXT (1<<22)
@@ -62,6 +65,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_sse4_1 (_mesa_x86_cpu_features & X86_FEATURE_SSE4_1)
#endif