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

Unified Diff: src/core/SkOpts.cpp

Issue 1419553007: sse 4.2 detection (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkOpts.cpp
diff --git a/src/core/SkOpts.cpp b/src/core/SkOpts.cpp
index 57c387a6192a61187c0abce767ff009c78fa0f5d..99ffc1b7f33e53943cbd73a8dc4d9acb2336fb3a 100644
--- a/src/core/SkOpts.cpp
+++ b/src/core/SkOpts.cpp
@@ -83,9 +83,10 @@ namespace SkOpts {
// Each Init_foo() is defined in src/opts/SkOpts_foo.cpp.
void Init_ssse3();
void Init_sse41();
- void Init_neon();
+ void Init_sse42() { SkDEBUGCODE( SkDebugf("sse 4.2 detected\n"); ) }
Lei Zhang 2015/11/17 00:11:32 These are a wee bit spammy in debug builds. Every
void Init_avx() { SkDEBUGCODE( SkDebugf("avx detected\n"); ) }
void Init_avx2() { SkDEBUGCODE( SkDebugf("avx2 detected\n"); ) }
+ void Init_neon();
//TODO: _dsp2, _armv7, _armv8, _x86, _x86_64, _sse42, ... ?
Lei Zhang 2015/11/17 00:11:32 Remove sse42 from this list now?
static void init() {
@@ -95,6 +96,7 @@ namespace SkOpts {
cpuid(abcd);
if (abcd[2] & (1<< 9)) { Init_ssse3(); }
if (abcd[2] & (1<<19)) { Init_sse41(); }
+ if (abcd[2] & (1<<20)) { Init_sse42(); }
// AVX detection's kind of a pain. This is cribbed from Chromium.
if ( ( abcd[2] & (7<<26)) == (7<<26) && // Check bits 26-28 of ecx are all set,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698