add structure for normal SKX opts

My experience porting the old opts over to the current SKX opts setup
was so bad that I don't want to try any more, and think it's probably
safer to port the SKX code to the old setup.

Need to hook up dependents (Chromium and Google3 I think) before we can
move the actual SXK opts code over.

Change-Id: Ibb8bc4a083cb104cd39f27cbfbc16e9eedd9bd46
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294495
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This commit is contained in:
Mike Klein 2020-06-05 06:57:30 -05:00 committed by Skia Commit-Bot
parent e780a590ba
commit ad56c4c143
5 changed files with 25 additions and 1 deletions

View File

@ -218,6 +218,19 @@ opts("hsw") {
} }
} }
opts("skx") {
enabled = is_x86
sources = skia_opts.skx_sources
if (is_win) {
cflags = [ "/arch:AVX512" ]
} else {
cflags = [ "-march=skylake-avx512" ]
if (is_mac && is_debug) {
cflags += [ "-fno-stack-check" ] # Work around skia:9709
}
}
}
# Any feature of Skia that requires third-party code should be optional and use this template. # Any feature of Skia that requires third-party code should be optional and use this template.
template("optional") { template("optional") {
visibility = [ ":*" ] visibility = [ ":*" ]

View File

@ -494,7 +494,8 @@ with open('Android.bp', 'w') as Android_bp:
defs['sse41'] + defs['sse41'] +
defs['sse42'] + defs['sse42'] +
defs['avx' ] + defs['avx' ] +
defs['hsw' ])), defs['hsw' ] +
defs['skx' ])),
'dm_includes' : bpfmt(8, dm_includes), 'dm_includes' : bpfmt(8, dm_includes),
'dm_srcs' : bpfmt(8, dm_srcs), 'dm_srcs' : bpfmt(8, dm_srcs),

View File

@ -18,3 +18,4 @@ sse41 = [ "$_src/opts/SkOpts_sse41.cpp" ]
sse42 = [ "$_src/opts/SkOpts_sse42.cpp" ] sse42 = [ "$_src/opts/SkOpts_sse42.cpp" ]
avx = [ "$_src/opts/SkOpts_avx.cpp" ] avx = [ "$_src/opts/SkOpts_avx.cpp" ]
hsw = [ "$_src/opts/SkOpts_hsw.cpp" ] hsw = [ "$_src/opts/SkOpts_hsw.cpp" ]
skx = [ "$_src/opts/SkOpts_skx.cpp" ]

View File

@ -26,4 +26,5 @@ skia_opts = {
sse42_sources = sse42 sse42_sources = sse42
avx_sources = avx avx_sources = avx
hsw_sources = hsw hsw_sources = hsw
skx_sources = skx
} }

8
src/opts/SkOpts_skx.cpp Normal file
View File

@ -0,0 +1,8 @@
/*
* Copyright 2020 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
// Intentionally empty, to be filled in.