diff options
author | Mike Klein <mtklein@chromium.org> | 2018-02-27 10:37:40 -0500 |
---|---|---|
committer | Mike Klein <mtklein@chromium.org> | 2018-03-07 16:22:44 +0000 |
commit | 78cb579f33943421afc8423a39867fcfd69fed44 (patch) | |
tree | a78d3dd042c94b6bba794fdfb9d87a4e164886f4 /src/opts/SkOpts_hsw.cpp | |
parent | aa567aba513cbab618c4433372ae6eb5d11e527b (diff) |
Reland "make SkJumper stages normal Skia code"
This is a reland of 22e536e3a1a09405d1c0e6f071717a726d86e8d4
Now with fixed #include paths in SkRasterPipeline_opts.h,
and -ffp-contract=fast for the :hsw target to minimize
diffs on non-Windows Clang AVX2/AVX-512 bots.
Original change's description:
> 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>
Change-Id: I44f2c03d33958e3807747e40904b6351957dd448
Reviewed-on: https://skia-review.googlesource.com/112742
Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src/opts/SkOpts_hsw.cpp')
-rw-r--r-- | src/opts/SkOpts_hsw.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/opts/SkOpts_hsw.cpp b/src/opts/SkOpts_hsw.cpp new file mode 100644 index 0000000000..a97b7bff55 --- /dev/null +++ b/src/opts/SkOpts_hsw.cpp @@ -0,0 +1,28 @@ +/* + * Copyright 2018 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 hsw +#include "SkRasterPipeline_opts.h" +#include "SkUtils_opts.h" + +namespace SkOpts { + void Init_hsw() { + #define M(st) stages_highp[SkRasterPipeline::st] = (StageFn)SK_OPTS_NS::st; + SK_RASTER_PIPELINE_STAGES(M) + just_return_highp = (StageFn)SK_OPTS_NS::just_return; + start_pipeline_highp = SK_OPTS_NS::start_pipeline; + #undef M + + #define M(st) stages_lowp[SkRasterPipeline::st] = (StageFn)SK_OPTS_NS::lowp::st; + SK_RASTER_PIPELINE_STAGES(M) + just_return_lowp = (StageFn)SK_OPTS_NS::lowp::just_return; + start_pipeline_lowp = SK_OPTS_NS::lowp::start_pipeline; + #undef M + } +} |