Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(485)

Unified Diff: include/core/SkPreConfig.h

Issue 272503006: Improved x86 SSE build and run-time checks. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/opts/opts_check_x86.cpp » ('j') | src/opts/opts_check_x86.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPreConfig.h
diff --git a/include/core/SkPreConfig.h b/include/core/SkPreConfig.h
index 9aefc2d64a6abcd4fc3ffae86896eaa89a5039ea..a91ddf2bf84505c7fbee75c7fe169368f982afaf 100644
--- a/include/core/SkPreConfig.h
+++ b/include/core/SkPreConfig.h
@@ -123,12 +123,18 @@
#define SK_CPU_SSE_LEVEL_SSE2 20
#define SK_CPU_SSE_LEVEL_SSE3 30
#define SK_CPU_SSE_LEVEL_SSSE3 31
+#define SK_CPU_SSE_LEVEL_SSE41 41
+#define SK_CPU_SSE_LEVEL_SSE42 42
// Are we in GCC?
#ifndef SK_CPU_SSE_LEVEL
// These checks must be done in descending order to ensure we set the highest
// available SSE level.
- #if defined(__SSSE3__)
+ #if defined(__SSE4_2__) || defined(__SSE4__)
mtklein 2014/05/07 17:34:41 Are there compilers where __SSE4_2__ isn't defined
henrik.smiding 2014/05/08 11:02:46 As far as I can remember gcc used to set __SSE4__
henrik.smiding 2014/05/08 11:02:46 Done.
+ #define SK_CPU_SSE_LEVEL SK_CPU_SSE_LEVEL_SSE42
+ #elif defined(__SSE4_1__)
+ #define SK_CPU_SSE_LEVEL SK_CPU_SSE_LEVEL_SSE41
+ #elif defined(__SSSE3__)
#define SK_CPU_SSE_LEVEL SK_CPU_SSE_LEVEL_SSSE3
#elif defined(__SSE3__)
#define SK_CPU_SSE_LEVEL SK_CPU_SSE_LEVEL_SSE3
« no previous file with comments | « no previous file | src/opts/opts_check_x86.cpp » ('j') | src/opts/opts_check_x86.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698