aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/jumper/SkJumper_misc.h
Commit message (Collapse)AuthorAge
* move load_and_inc() and LazyCtx into SkJumper_misc.hGravatar Mike Klein2017-06-02
| | | | | | | | | | | | This is a no-op refator that'll help keep the interesting diff more focused in the lowp CL. The lowp stages will use these unaltered, so SkJumper_misc.h is a good place for them. Change-Id: I7fb6327ade29ac884194517d94ac4303ed1079e0 Reviewed-on: https://skia-review.googlesource.com/18484 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* add unaligned_store()Gravatar Mike Klein2017-05-15
| | | | | | | | | | | | | Don't know why I never wrote unaligned_store() to mirror unaligned_load(), but now I have. This replaces all remaining memcpy() in SkJumper_stages.cpp, which is nice. The generated stage code didn't change. Change-Id: I714c1072a975d7fa268a4b06c13f06557bf0c12c Reviewed-on: https://skia-review.googlesource.com/16870 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Add evenly spaced stops and unify gradient contextsGravatar Herb Derby2017-05-15
| | | | | | | Change-Id: I17ac13b9d1ea6765e2c1a2b53aa6975eab408856 Reviewed-on: https://skia-review.googlesource.com/16713 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* finish up constantsGravatar Mike Klein2017-05-01
| | | | | | | | | | | | | | | | | | For whatever reason, if I swap the condition in the if_then_else tests from < to >= and swap the then/else values, I can use constants in hsl_to_rgb. Still don't understand why, but I'll take it. I suspect it has something to do with SSE, IEEE, and NaN, but I don't care enough to speculate any more concretely. This does that, removes C() and _f, updates some comments, and adds a guard in build_stages.py to yell if it sees trouble like LCPI40_4... This reminds me to try -ffast-math soon. I think that was mostly held back by constants. Change-Id: I3f8a37a4d4642f77422ce3261b750061e9e604a3 Reviewed-on: https://skia-review.googlesource.com/14942 Reviewed-by: Herb Derby <herb@google.com>
* jumper, remove C(int)Gravatar Mike Klein2017-04-27
| | | | | | | | | | | This finishes off integer constants... they should all be normal now. CQ_INCLUDE_TRYBOTS=skia.primary:Test-Win7-MSVC-Golo-CPU-AVX-x86_64-Release,Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release,Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_CPU_LIMIT_SSE41,Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_CPU_LIMIT_SSE2 Change-Id: I66ecc6533807fc59bb5ac9d3c5f7ab9e6e1f0d7f Reviewed-on: https://skia-review.googlesource.com/14528 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* jumper, replace _i with normal constantsGravatar Mike Klein2017-04-27
| | | | | | | | | | | | | | | So far I only seem to be encountering constant pools with float constants, so integer constants should be easy to make normal. This just removes _i. There might be a couple integer constants generated with C() too... they'll be the next CL. CQ_INCLUDE_TRYBOTS=skia.primary:Test-Win7-MSVC-Golo-CPU-AVX-x86_64-Release,Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release,Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_CPU_LIMIT_SSE41,Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_CPU_LIMIT_SSE2 Change-Id: Icc82cbc660d1e33bcdb5282072fb86cb5190d901 Reviewed-on: https://skia-review.googlesource.com/14527 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* jumper, split store_f16 into to_half, store4Gravatar Mike Klein2017-04-04
| | | | | | | | | | | | | | | | | | | Pretty much the same deal as the last CL going the other direction: split store_f16 into to_half() and store4(). Platforms that had fused strategies here get a little less optimal, but the code's easier to follow, maintain, and reuse. Also adds widen_cast() to encapsulate the fairly common pattern of expanding one of our logical vector types (e.g. 8-byte U16) up to the width of the physical vector type (e.g. 16-byte __m128i). This operation is deeply understood by Clang, and often is a no-op. I could make bit_cast() do this, but it seems clearer to have two names. Change-Id: I7ba5bb4746acfcaa6d486379f67e07baee3820b2 Reviewed-on: https://skia-review.googlesource.com/11204 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Refactor and recomment SkJumper_stages.cpp.Gravatar Mike Klein2017-04-03
SkJumper_stages.cpp is starting to get unweildy. This spins some logical parts out into their own headers. I will follow up by moving more of the very specific f16/f32 load/store logic into SkJumper_vectors.h too. Change-Id: I2a3a055e9d1b65f56983d05649270772a4c69f31 Reviewed-on: https://skia-review.googlesource.com/11133 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>