skia2/gyp
mtklein 872ea29357 Move CPU feature detection to its own file.
- Moves CPU feature detection to its own file.
   - Cleans up some redundant feature detection scattered around core/ and opts/.
   - Can now detect a few new CPU features:
       * F16C     -> Intel f16<->f32 instructions, added between AVX and AVX2
       * FMA      -> Intel FMA instructions, added at the same time as AVX2
       * VFP_FP16 -> ARM f16<->f32 instructions, quite common
       * NEON_FMA -> ARM FMA instructions, also quite common
       * SSE and SSE3... why not?

This new internal API makes it very cheap to do fine-grained runtime CPU
feature detection.  Redundant calls to SkCpu::Supports() should be eliminated
and it's hoistable out of loops.  It compiles away entirely when we have the
appropriate instructions available at compile time.

This means we can call it to guard even a little snippet of 1 or 2 instructions
right where needed and let inlining hoist the check (if any at all) up to
somewhere that doesn't hurt performance.  I've explained how I made this work
in the private section of the new header.

Once this lands and bakes a bit, I'll start following up with CLs to use it more
and to add a bunch of those little 1-2 instruction snippets we've been wanting,
e.g. cvtps2ph, cvtph2ps, ptest, pmulld, pmovzxbd, blendvps, pshufb, roundps
(for floor) on x86, and vcvt.f32.f16, vcvt.f16.f32 on ARM.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1890483002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review URL: https://codereview.chromium.org/1890483002
2016-04-14 09:03:35 -07:00
..
android_deps.gyp Fix gyp files so that gyp_to_Android.mk succeeds 2016-01-25 11:40:02 -08:00
android_framework_lib.gyp Move SkBitmapRegionDecoder to include/android and src/android 2015-11-13 06:11:09 -08:00
android_output.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
android_system.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
angle.gyp Move SkGLContext and some GrGLInterface implementations to skgputest module 2016-03-30 18:56:20 -07:00
animator.gyp rm src/animator/SkTime.cpp 2016-03-25 15:22:47 -07:00
apptype_console.gypi Remove all code related to NaCl 2015-04-02 12:16:36 -07:00
bench.gyp Remove internal calls to SkImage::getTexture 2016-02-29 11:41:52 -08:00
bench.gypi SkPDF/Bench: add bench for SkPDFSharedStream (deflate) 2016-02-24 15:17:20 -08:00
canvas_state_lib.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
codec_android.gyp Use a smart pointer for SkColorSpace factories 2016-03-07 07:09:03 -08:00
codec.gyp Rename encoders to Sk*ImageEncoder 2016-03-25 08:58:55 -07:00
common_conditions.gypi We meant these to be YES... sigh. 2016-03-28 12:43:39 -07:00
common_variables.gypi Enable RAW codec for Windows 2016-04-06 06:47:15 -07:00
common.gypi Turn off Discardable scaled image cache 2016-03-25 09:48:45 -07:00
core.gyp Move CPU feature detection to its own file. 2016-04-14 09:03:35 -07:00
core.gypi Move CPU feature detection to its own file. 2016-04-14 09:03:35 -07:00
debugger.gyp unified PNG encoding between SkDrawCommand and skiaserve 2016-03-21 10:19:39 -07:00
dm.gyp Use a statically linked libhwui for testing. 2016-02-16 09:19:36 -08:00
dm.gypi integrated SkDebugCanvas JSON support with UrlDataManager 2016-02-11 10:35:21 -08:00
dng_sdk.gyp Enable RAW codec for Windows 2016-02-29 07:14:42 -08:00
effects.gyp Revert of sRGB support in Ganesh. Several pieces: (patchset #12 id:220001 of https://codereview.chromium.org/1789663002/ ) 2016-03-17 13:01:26 -07:00
effects.gypi remove avoid and pixelxor xfermodes 2016-04-05 06:25:14 -07:00
etc1.gyp Revert of Depend on ETC1 via DEPS instead of a direct third_party checkin. (patchset #1 id:1 of https://codereview.chromium.org/1296253003/ ) 2015-08-17 11:15:00 -07:00
everything.gyp Add SkDrawPosTextHCommand JSON, fix skiaserve build. 2016-03-09 07:42:54 -08:00
example.gyp Create a standalone example for using Skia with SDL 2015-11-13 11:22:19 -08:00
expat.gyp msan: build expat from source 2016-02-07 13:31:23 -08:00
experimental.gyp experimental: coreGraphicsPdf2png 2016-03-09 11:26:51 -08:00
FileReaderApp.gyp remove SkGPipe 2016-01-08 06:30:14 -08:00
find.py Sort build files for consistent link order. 2015-05-20 09:26:47 -07:00
flags.gyp Move SkGLContext and some GrGLInterface implementations to skgputest module 2016-03-30 18:56:20 -07:00
freetype.gyp Update android_make to support both --gcc and --clang options. 2016-03-07 12:30:47 -08:00
freetype.gypi Update Android FreeType version. 2015-10-27 08:39:39 -07:00
fuzz.gyp Make fuzz builds set SK_FUZZ_LOGGING 2016-04-12 12:02:59 -07:00
giflib.gyp Update giflib to 5.1.1 (AOSP hash) 2015-08-24 12:00:15 -07:00
gmslides.gypi unified PNG encoding between SkDrawCommand and skiaserve 2016-03-21 10:19:39 -07:00
gpu.gyp Move SkGLContext and some GrGLInterface implementations to skgputest module 2016-03-30 18:56:20 -07:00
gpu.gypi Implement texel buffers 2016-04-11 14:47:28 -07:00
gputest.gyp Add CreatePlatformGLTestContext_none.cpp for Google3 build 2016-04-01 04:50:45 -07:00
icu.gyp Revert "Factor out xcode c/cpp settings into variables to apply to cmake builds." 2016-02-03 13:06:28 -08:00
images.gyp Delete SkPageFlipper 2016-03-25 10:31:22 -07:00
iOSShell.gyp Modify iOSShell-gyp to generate unique bundle identifier 2015-12-02 09:45:30 -08:00
jsoncpp.gyp Roll jsoncpp, drop dependency on Chromium overrides. 2014-08-19 07:21:00 -07:00
kilobench.gyp Move SkGLContext and some GrGLInterface implementations to skgputest module 2016-03-30 18:56:20 -07:00
ktx.gyp add -Iinclude/private anywhere we have -Isrc/core 2015-07-28 08:55:14 -07:00
libjpeg-turbo-selector.gyp Remove dependencies on Android's forked decoder libraries 2015-11-06 11:15:49 -08:00
libjpeg-turbo.gyp Switch Skia's libjpeg-turbo to 1.4.2 2015-11-23 11:09:14 -08:00
libpng.gyp Update libpng to 1.6.22beta 2016-02-19 11:14:43 -08:00
libwebp_skia.gypi Comments Style: s/skbug.com/bug.skia.org/ 2015-11-07 05:29:00 -08:00
libwebp.gyp Update libwebp to version 0.5.0 2016-01-22 06:58:27 -08:00
lua.gyp Update android_make to support both --gcc and --clang options. 2016-03-07 12:30:47 -08:00
microhttpd.gyp Create explicit microhttpd.gyp 2016-03-09 15:07:02 -08:00
most.gyp First pass at VulkanViewer 2016-04-06 06:08:59 -07:00
nanomsg.gyp Experiment with find as a road to Gyp sanity. 2015-05-16 15:47:10 -07:00
opts.gyp spin off some safe parts from AVX2 CL 2016-01-25 09:26:54 -08:00
opts.gypi Port S32A_opaque blit row to SkOpts. 2016-03-23 06:29:12 -07:00
pathops_skpclip.gyp remove SkGPipe 2016-01-08 06:30:14 -08:00
pathops_unittest.gyp Move SkGLContext and some GrGLInterface implementations to skgputest module 2016-03-30 18:56:20 -07:00
pathops_unittest.gypi More conic-specific tests revealed a few conic-specific bugs. Because javascript / canvas make visualizing conics tricky, new native tools are required. 2015-10-30 12:03:06 -07:00
pdf.gyp SkPDF: skia_pdf_less_compression - for debugging only 2016-03-29 10:10:24 -07:00
pdf.gypi SkPDF: PDFDevice::ContentEntry now implemented with SinglyLinkedList 2016-03-28 11:58:08 -07:00
piex.gyp msan: define BREAK_IF_DEBUGGING_AND_OUT_OF_RANGE in piex 2016-02-08 09:35:05 -08:00
ports.gyp rm src/ports/SkTime_*.cpp 2016-03-28 09:00:22 -07:00
SampleApp.gyp Move SkGLContext and some GrGLInterface implementations to skgputest module 2016-03-30 18:56:20 -07:00
sdl.gyp Initial gyp files for SDL 2015-10-29 07:09:53 -07:00
sfnt.gyp Move SkTemplates.h to private. 2015-08-19 11:56:48 -07:00
sfntly.gyp Disable sanitizers with a blacklist. 2015-12-08 14:26:17 -08:00
shaderc.gyp Make build_shaderc.py blow away output dir and allow build_type arg to contain either Debug or Release 2016-04-13 08:02:43 -07:00
SimpleCocoaApp.gyp Allows windowed apps to be built on the Mac just by writing a SkOSWindow subclass without needing nib/plist files. 2015-06-18 11:49:42 -07:00
SimpleiOSApp.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
skia_for_android_framework_defines.gypi switch maskfilters to sk_sp 2016-04-04 10:02:58 -07:00
skia_for_chromium_defines.gypi Remove SK_IGNORE_GL_TEXTURE_TARGET from skia_for_chromium_defines.gypi 2015-12-07 14:05:31 -08:00
skia_launcher.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
skia_lib.gyp Move SkBitmapRegionDecoder to include/android and src/android 2015-11-13 06:11:09 -08:00
skiaserve.gyp Move SkGLContext and some GrGLInterface implementations to skgputest module 2016-03-30 18:56:20 -07:00
skmojo.gyp SkMojo: generate on Darwin/x86_64 2016-02-03 13:54:03 -08:00
svg.gyp add -Iinclude/private anywhere we have -Isrc/core 2015-07-28 08:55:14 -07:00
tests.gypi Use a statically linked libhwui for testing. 2016-02-16 09:19:36 -08:00
tools.gyp Force include test to run on every compile. 2016-03-30 08:28:02 -07:00
utils.gyp remove SkGPipe 2016-01-08 06:30:14 -08:00
utils.gypi Templatize SkToXXX. 2016-03-19 15:06:56 -07:00
v8.gyp Allows windowed apps to be built on the Mac just by writing a SkOSWindow subclass without needing nib/plist files. 2015-06-18 11:49:42 -07:00
views.gyp Move SkGLContext and some GrGLInterface implementations to skgputest module 2016-03-30 18:56:20 -07:00
visualbench.gyp Move SkGLContext and some GrGLInterface implementations to skgputest module 2016-03-30 18:56:20 -07:00
vulkanviewer.gyp Some more improvements/fixes to the VulkanViewer 2016-04-07 11:09:51 -07:00
xml.gyp remove unused BML (binary xml) code 2016-04-09 11:09:49 -07:00
xps.gyp SkPDF: move all pdf sources into src/pdf 2016-03-12 05:59:39 -08:00
yasm.gyp followups 2016-02-12 12:58:10 -08:00
zlib.gyp Put all XSAN bots on the same DEPS-sourced build of Clang. 2016-02-12 12:15:23 -08:00