aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/opts/SkNx_sse.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/opts/SkNx_sse.h b/src/opts/SkNx_sse.h
index 1720f14fb8..335b70c1e9 100644
--- a/src/opts/SkNx_sse.h
+++ b/src/opts/SkNx_sse.h
@@ -8,7 +8,15 @@
#ifndef SkNx_sse_DEFINED
#define SkNx_sse_DEFINED
-#include <immintrin.h>
+#include "SkTypes.h"
+
+#if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE41
+ #include <smmintrin.h>
+#elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSSE3
+ #include <tmmintrin.h>
+#else
+ #include <emmintrin.h>
+#endif
// This file may assume <= SSE2, but must check SK_CPU_SSE_LEVEL for anything more recent.
// If you do, make sure this is in a static inline function... anywhere else risks violating ODR.