diff options
author | Mike Klein <mtklein@chromium.org> | 2017-04-26 16:11:47 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-27 12:33:32 +0000 |
commit | 56de05fec3fa2b99a21bc4c820e2d8c68eae8336 (patch) | |
tree | b7acfe3f14e8e22d459a9501deaaac9ff9bbe977 /src/core/SkCpu.h | |
parent | ac0e705af1d68267e4f09a6486f4cb68903f7835 (diff) |
add #defines to limit SkCpu
I just noticed we don't really have any CPU test bots that have less
than AVX anymore. I'd like to make sure we're testing each mode of
SkJumper at least, so I've added flags to let us limit to SSE2 or
SSE4.1, the modes currently missing coverage.
Add the bots to test these modes too.
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_CPU_LIMIT_SSE2,Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_CPU_LIMIT_SSE41
Change-Id: I7c2b061332e7f037538488260583076c34ae7b1e
Reviewed-on: https://skia-review.googlesource.com/14405
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src/core/SkCpu.h')
-rw-r--r-- | src/core/SkCpu.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/SkCpu.h b/src/core/SkCpu.h index 24428d9781..a9ed906a5f 100644 --- a/src/core/SkCpu.h +++ b/src/core/SkCpu.h @@ -87,6 +87,12 @@ inline bool SkCpu::Supports(uint32_t mask) { // It's available on Haswell+ just like AVX2, but it's technically a different bit. // TODO: circle back on this if we find ourselves limited by lack of compile-time FMA + #if defined(SK_CPU_LIMIT_SSE41) + features &= (SkCpu::SSE1 | SkCpu::SSE2 | SkCpu::SSE3 | SkCpu::SSSE3 | SkCpu::SSE41); + #elif defined(SK_CPU_LIMIT_SSE2) + features &= (SkCpu::SSE1 | SkCpu::SSE2); + #endif + #else #if defined(SK_ARM_HAS_NEON) features |= NEON; |