aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar herb <herb@google.com>2016-06-23 09:40:30 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-06-23 09:40:30 -0700
commit4d1dd6643f2efa34d22d5fc3cf9cb4866252358e (patch)
tree6bd7dd298730fb8464e11aadbda66115085cd083
parent9cb6340a62a5d748e4189d50e51fa527c8c80c03 (diff)
Add stub for avx.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087343002 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review-Url: https://codereview.chromium.org/2087343002
-rw-r--r--gyp/opts.gypi6
-rw-r--r--src/core/SkOpts.cpp2
-rw-r--r--src/opts/SkBlend_opts.h4
-rw-r--r--src/opts/SkOpts_avx.cpp15
4 files changed, 23 insertions, 4 deletions
diff --git a/gyp/opts.gypi b/gyp/opts.gypi
index fbc3d4910a..6db9d0ced8 100644
--- a/gyp/opts.gypi
+++ b/gyp/opts.gypi
@@ -49,13 +49,13 @@
'sse41_sources': [
'<(skia_src_path)/opts/SkOpts_sse41.cpp',
],
+ 'avx_sources': [
+ '<(skia_src_path)/opts/SkOpts_avx.cpp',
+ ],
# These targets are empty, but XCode doesn't like that, so add an empty file to each.
'sse42_sources': [
'<(skia_src_path)/core/SkForceCPlusPlusLinking.cpp',
],
- 'avx_sources': [
- '<(skia_src_path)/core/SkForceCPlusPlusLinking.cpp',
- ],
'avx2_sources': [
'<(skia_src_path)/core/SkForceCPlusPlusLinking.cpp',
],
diff --git a/src/core/SkOpts.cpp b/src/core/SkOpts.cpp
index a2de1f59d2..3c13dcfb0d 100644
--- a/src/core/SkOpts.cpp
+++ b/src/core/SkOpts.cpp
@@ -90,7 +90,7 @@ namespace SkOpts {
void Init_ssse3();
void Init_sse41();
void Init_sse42() {}
- void Init_avx() {}
+ void Init_avx();
void Init_avx2() {}
static void init() {
diff --git a/src/opts/SkBlend_opts.h b/src/opts/SkBlend_opts.h
index 2e6eff6277..2dcdcc7aaf 100644
--- a/src/opts/SkBlend_opts.h
+++ b/src/opts/SkBlend_opts.h
@@ -15,6 +15,10 @@ ninja -C out/Release dm nanobench ; and ./out/Release/dm --match Blend_opts ; an
#include "SkNx.h"
#include "SkPM4fPriv.h"
+#if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2
+ #include <immintrin.h>
+#endif
+
namespace SK_OPTS_NS {
// An implementation of SrcOver from bytes to bytes in linear space that takes advantage of the
diff --git a/src/opts/SkOpts_avx.cpp b/src/opts/SkOpts_avx.cpp
new file mode 100644
index 0000000000..835e0c0ded
--- /dev/null
+++ b/src/opts/SkOpts_avx.cpp
@@ -0,0 +1,15 @@
+/*
+ * Copyright 2016 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "SkOpts.h"
+
+#define SK_OPTS_NS sk_avx
+#include "SkBlend_opts.h"
+
+namespace SkOpts {
+ void Init_avx() { }
+}