diff options
author | Mike Klein <mtklein@chromium.org> | 2018-02-27 10:37:40 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-07 14:40:10 +0000 |
commit | 22e536e3a1a09405d1c0e6f071717a726d86e8d4 (patch) | |
tree | 1fbcfdd6a6c60e612e22038770ae7eeb8e306ee4 /BUILD.gn | |
parent | 25d07fc354f9150f6d2292be27554db4fc454ad6 (diff) |
make SkJumper stages normal Skia code
Enough clients are using Clang now that we can say, use Clang to build
if you want these software pipeline stages to go fast.
This lets us drop the offline build aspect of SkJumper stages, instead
building as part of Skia using the SkOpts framework.
I think everything should work, except I've (temporarily) removed
AVX-512 support. I will put this back in a follow up.
I have had to drop Windows down to __vectorcall and our narrower
stage calling convention that keeps the d-registers on the stack.
I tried forcing sysv_abi, but that crashed Clang. :/
Added a TODO to up the same narrower stage calling convention
for lowp stages... we just *don't* today, for no good reason.
Change-Id: Iaaa792ffe4deab3508d2dc5d0008c163c24b3383
Reviewed-on: https://skia-review.googlesource.com/110641
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'BUILD.gn')
-rw-r--r-- | BUILD.gn | 44 |
1 files changed, 15 insertions, 29 deletions
@@ -48,10 +48,6 @@ declare_args() { skia_compile_processors = false skia_lex = false - skia_jumper_clang = "" - skia_jumper_objdump = "" - skia_jumper_ccache = "" - skia_skqp_enable_driver_correctness_workarounds = false skia_skqp_global_error_tolerance = 0 } @@ -314,6 +310,20 @@ opts("avx") { } } +opts("hsw") { + enabled = is_x86 + sources = skia_opts.hsw_sources + if (!is_clang && is_win) { + cflags = [ "/arch:AVX2" ] + } else { + cflags = [ + "-mavx2", + "-mf16c", + "-mfma", + ] + } +} + # Any feature of Skia that requires third-party code should be optional and use this template. template("optional") { if (invoker.enabled) { @@ -775,6 +785,7 @@ component("skia") { ":fontmgr_fuchsia", ":gpu", ":heif", + ":hsw", ":jpeg", ":none", ":pdf", @@ -2101,28 +2112,3 @@ if (skia_enable_tools) { } } } - -if (skia_jumper_clang != "") { - action("regen_jumper") { - script = "src/jumper/build_stages.py" - - inputs = [ - "src/jumper/SkJumper_stages.cpp", - "src/jumper/SkJumper_stages_lowp.cpp", - ] - - # GN insists its outputs should go somewhere underneath target_out_dir, so we trick it. - outputs = [ - "$target_out_dir/" + - rebase_path("src/jumper/SkJumper_generated.S", target_out_dir), - "$target_out_dir/" + - rebase_path("src/jumper/SkJumper_generated_win.S", target_out_dir), - ] - - args = [ - skia_jumper_clang, - skia_jumper_objdump, - skia_jumper_ccache, - ] + rebase_path(inputs) + rebase_path(outputs) - } -} |