Commit Graph

45112 Commits

Author SHA1 Message Date
Mike Klein
4135cf0b57 use round() instead of trunc() to f32->unorm
This does open us up to a little bit of possible inconsistency of
rounding when right on a x.5 (sometimes we'll +0.5 and trunc, sometimes
round to nearest, sometimes round according to the default mode which is
usually round to nearest) but I think that inconsistency may be worth
the free register not needing a splat(0.5f) buys us.

A few invisible diffs.

Change-Id: I9af092c937ccf7c5891c2ab3cb298d217e4a9e9f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253725
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-11-08 21:28:07 +00:00
Julia Lavrova
b30d4812c7 Yet another build fix
Change-Id: I606689930c9d07dbba3e743d1137e7c3c54790d4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253736
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-11-08 21:22:37 +00:00
Mike Klein
6e4aad91c3 rename to_i32 -> trunc, and add round
This plumbs through round but doesn't use it.  I want that change to be
its own CL.  It's nice to have assembler support and the name changes
even if I revert using round.

Change-Id: I6d67ec5c63546069eb7cc1c91599b599bafcda66
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253724
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-11-08 21:00:51 +00:00
Mike Klein
049b58f97a avoid redundant clamps
If we clamp the shader color to gamut, we won't need to clamp again when
storing to the destination... blending and coverage will keep the color
in gamut.

Change-Id: I9a4eb609de58fc0cb6295df0ad1c4cef8cd7e307
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253722
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-11-08 20:51:37 +00:00
Mike Klein
b97a919418 don't clamp alpha, it's already [0,1]
No diffs.

Change-Id: I13a848955605a16aa229b98a14dc0e1930ba28c2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253721
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-11-08 20:40:47 +00:00
Mike Klein
a53e47fe94 native f32 min/max
No diffs.

Change-Id: Ia0b35c2787e27d74763f21b81072affa6caf1e5a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253720
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-11-08 20:21:38 +00:00
recipe-roller
a461a8ee39 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
depot_tools:
  https://crrev.com/0e9afd2a56f279584af49aca1c4b72485df49a77 Change "CPU time" to "elapsed time" (brucedawson@chromium.org)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I3091a19ff5e94fda23ecdfac2dfc0ba8b72f1c0f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253713
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2019-11-08 19:42:46 +00:00
Mike Klein
b9f208817c convert SkVMBlitter over to floats
As we've learned there's not much advantage to working directly in i32
ops over f32... it's the same size, kind of a wash speed-wise, and f32
supports all operations we want where i32 supports only a subset.  If we
really want to go fast, we need to focus on i16 operations, which are
both significantly faster and operate on twice as much data at a time.

(This is the same split as SkRasterPipeline, highp f32 and lowp i16.)

For now port everything to f32, with i16 to follow, perhaps much later.

There's a little here we could spin off to land first (uniformF, better
unpremul) but I think it might be easiest to land all at once.

Cq-Include-Trybots: skia.primary:Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-SK_USE_SKVM_BLITTER
Change-Id: I6fa0fd2031a0de18456abf529cc5b0d8137ecbe0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253704
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-11-08 19:29:06 +00:00
Chris Dalton
f00b95b7f3 Always attach stencil buffers with exact sample count matches
After this CL we will always attach a stencil buffer for rendering
that matches the stencil sample count of the proxy. We will even
downgrade a stencil attachment to one with less samples if necessary.
(In the past we would only guarantee that the attached stencil buffer
had a sample count >= to that of the proxy.)

Change-Id: I358e13ffdf286695257b1b5b672a84d16c417b80
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253547
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-11-08 19:20:36 +00:00
recipe-roller
ac3cd147e4 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
recipe_engine:
  https://crrev.com/8eb3985beff2b4d0cf0bae61a7a3dab29271849f [recipe_modules/cipd] Expose default test data input for cipd.search. (iannucci@chromium.org)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I5a0866aacea7cf069210b4d020f620f8faec5d95
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253700
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2019-11-08 19:04:46 +00:00
Julia Lavrova
f0ade8a687 Fixing no icu situation
Change-Id: I9763a0a2a0ee231500b27c11e17e0f5f4df44f29
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253683
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-11-08 18:59:03 +00:00
Mike Reed
052a05ac3a add flatten test to SkFont
Change-Id: I7e96e826fad9aa204c963ae671cce668a676378f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253684
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2019-11-08 18:49:15 +00:00
Chris Dalton
0b68ddacad Defer stencil attachment until opsTask execution
Change-Id: I34cc35d16966d35e26561c40a0300112b2da2fa1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253546
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-11-08 18:36:35 +00:00
recipe-roller
c88d1774ed Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
depot_tools:
  https://crrev.com/d5c0b56e84e0c6f416439ce56c60d617897610fe Use git fetch --no-tags to fetch commits to apply via cherry-pick. (danakj@chromium.org)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I7a80629ff3742a77259f8e4304f2b3119be09414
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253681
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2019-11-08 18:07:05 +00:00
Mike Klein
b2ab7d15d3 add SkColorTypeIsNormalized()
This centralizes the logic for whether a color type is normalized.

The change in SkRasterPipelineBlitter is minor, only now properly
treating kR16G16_float_SkColorType as unnormalized.

The change in SkColorSpaceXformSteps is more extreme given the way
it had been written, with all the newer color types now correct.

I think I'm making the right call on kA16_float_SkColorType?

Are there equivalent sites to update in Ganesh?

Change-Id: I32a40b31b86c5fde0dea2528122a4deda91c5545
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253668
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-11-08 17:51:45 +00:00
Julia Lavrova
2e30fde046 Font resolution: all unit tests working
Change-Id: Ie6ee30901d599ceefa42651add79bb0288c54c48
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249004
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
2019-11-08 17:24:14 +00:00
Kevin Lubick
47bd9f1b73 [canvaskit] Expand SkAnimatedImage
With these things exposed, I think Flutter will not need
CanvasKit to expose the very complex SkCodec API.

Change-Id: Iace1b496d1dcb8842181466e860e8f212aba7b48
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253542
Reviewed-by: Leon Scroggins <scroggo@google.com>
2019-11-08 14:58:14 +00:00
Kevin Lubick
f6a9d20e95 [canvaskit] Fix null dereference when GrContext cannot be made
This happens when validation fails, for example.

Change-Id: Idbd552fbce51c5cf1543fc7a0a34a87230264d6e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253658
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-11-08 14:58:04 +00:00
Greg Daniel
ed98476cf2 Handle failure to create VkRenderPasses in vulkan backend.
Bug: skia:9603
Change-Id: I8c56f399d58b109d163ff69b654d07edbc44dde0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253497
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-11-08 14:38:13 +00:00
Mike Klein
4d0fe38f29 Pre-flight SkTLS_pthread changes for C++17
Looks like this is what the CFI bots tripped on,
so maybe there's something more real going on here.

I think we can try again in Chromium after this?

Change-Id: I6f59aeae01df130a21c64b5218b4d21238e343d7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253636
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-11-08 14:24:14 +00:00
Mike Klein
8c1e265f6f remove redundant comparison ops
Depending on data type and platform, there's usually only one of < or >
(and <= or >=) since you can trivially translate to the other by
swapping the arguments.  This CL bubbles that insight up one level to
our mid-level skvm::Op enum, arbitrarily keeping > and >=.  Nothing
changes from the perspective of an skvm user.

Change-Id: Ia271436cc2b9916b761320769a715a3952e4ce41
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253199
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-11-08 14:16:03 +00:00
skia-autoroll
99b558b594 Roll third_party/externals/angle2 cc0919dcb64b..652dbfc63e70 (7 commits)
cc0919dcb6..652dbfc63e

git log cc0919dcb64b..652dbfc63e70 --date=short --no-merges --format='%ad %ae %s'
2019-11-07 jmadill@chromium.org Init Blend State color mask defaults.
2019-11-07 lehoangq@gmail.com Metal backend pt3: shader translator
2019-11-07 jmadill@chromium.org Capture/Replay: Introduce capture index file.
2019-11-07 jmadill@chromium.org Capture/Replay: Pass gl::State to capture functions.
2019-11-07 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader 88264e3e188d..27a3d31d7a9d (1 commits)
2019-11-07 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src d9fbf0234869..dc59b4b075e9 (2 commits)
2019-11-07 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/glslang/src 5d0e01d9e7f9..e471df3c9154 (2 commits)

Created with:
  gclient setdep -r third_party/externals/angle2@652dbfc63e70

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-skia-autoroll
Please CC ethannicholas@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Bug: None
TBR=ethannicholas@google.com
Change-Id: If1977b6c9e4476d9729b263faa77e0241a851575
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253548
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-11-08 06:15:03 +00:00
skia-autoroll
3fd426d19d Roll third_party/externals/swiftshader 27a3d31d7a9d..d9ed1c2732ba (1 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/27a3d31d7a9d..d9ed1c2732ba

git log 27a3d31d7a9d..d9ed1c2732ba --date=short --no-merges --format='%ad %ae %s'
2019-11-07 sugoi@google.com Prevent rasterizing fragments outside the framebuffer

Created with:
  gclient setdep -r third_party/externals/swiftshader@d9ed1c2732ba

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-skia-autoroll
Please CC ethannicholas@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
TBR=ethannicholas@google.com
Change-Id: Ieb29b7fbb7d042f68276196f40703e33597304b7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253549
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-11-08 04:42:33 +00:00
recipe-roller
76eaab6b8c Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
depot_tools:
  https://crrev.com/1917f7a099407369280b2cc74a33e44f4ed8c84c Revert "Fetch the input commit ref when both ref and id are specified." (martiniss@chromium.org)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I3ccda22049588cedc7aa9d2c1309ee5db2c3082a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253541
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2019-11-08 00:54:49 +00:00
Chris Dalton
b204e4c3d3 Implement multisample "disable" in Vulkan
Emulates multisample disable by colocating all samples at pixel
center. Multisample disable will be required in order for us to
integrate mixed samples.

Change-Id: I52b67e22c979584b5d001e737a08eef07bd7ffe2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253282
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-11-08 00:21:09 +00:00
recipe-roller
52591f6880 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
recipe_engine:
  https://crrev.com/71729a14269530e56e9a74c0335e7d4385969153 Allow StepPresentation logs to be a single string (mheikal@chromium.org)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: Ibe2c2e723004c198dec855bdae6bdb5fff9b00cd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253537
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2019-11-08 00:16:19 +00:00
Mike Klein
81a8d282d3 Reland "hook up float comparisons to x86 JIT"
This is a reland of 12cea8d6c4

Now implementing float comparisons on ARM also.
Only vaguely tricky thing is that x!=y is ~(x==y).

Original change's description:
> hook up float comparisons to x86 JIT
>
> This gets the draws in gm/skvm.cpp all JITing again,
> and in one of the unit tests.
>
> (Everything draws the same of course.)
>
> Change-Id: Iada28690d9df78f9d444ee3765e21beb29239672
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253166
> Auto-Submit: Mike Klein <mtklein@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

Cq-Include-Trybots: skia.primary:Test-Android-Clang-NVIDIA_Shield-CPU-TegraX1-arm64-Debug-All-Android
Change-Id: I771b8a327a958db8a0d509d55863ade935a00035
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253401
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-11-07 18:55:14 +00:00
herb
05f6a01bf9 Remove unused methods from SkStrike
Change-Id: Icfca4b099e594c61cbaf0b5f160c6293b39c4083
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253382
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-11-07 18:25:14 +00:00
Mike Klein
3f7c865936 avoid the JIT on MSAN builds
JIT code isn't MSAN-instrumented, so we won't see when it uses
uninitialized memory, and we'll not see the writes it makes as properly
initializing memory.  Instead force the interpreter, which should let
MSAN see everything our programs do properly.

This refactors so that SkVM.cpp is the only code to look at whether
SKVM_JIT is defined, and undefines it when built with MSAN.  Added
a simple regression test too.

Cq-Include-Trybots: skia.primary:Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-MSAN
Change-Id: Ic7cca2621f84dfba7174127738744d6c68f85f2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253410
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-11-07 18:24:34 +00:00
Hal Canary
a1050ed2b1 SkPDF/docs: note that Sfntly subsetter is deprecated
Change-Id: I09ecee95653212268926d82739c0df3866d3a8d7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253380
Auto-Submit: Hal Canary <halcanary@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2019-11-07 18:07:55 +00:00
herb
252cdb7824 One glyph() to rule them all!!!
Change-Id: Icb8d9653b5037921648a6c20ff21d26375301b65
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253381
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-11-07 18:03:34 +00:00
Mike Reed
4edb719f1b flesh out blendmodes through Screen
Cq-Include-Trybots: skia.primary:Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-SK_USE_SKVM_BLITTER
Change-Id: I7a573d8991a41020bfaf72fe1fe231ee1da92535
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253196
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-11-07 17:59:24 +00:00
recipe-roller
9c990faa58 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
depot_tools:
  https://crrev.com/72a245e4c678f478bf7e1961cae8b2ba5bfa93bf Fetch the input commit ref when both ref and id are specified. (gbeaty@chromium.org)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: If43b9047be30290d6069d4b5fcc764d25a346afe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253412
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2019-11-07 17:32:45 +00:00
recipe-roller
633ddecec8 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
depot_tools:
  https://crrev.com/9ab047e78be34f3345b00c3d71cbfcbbe110ab3b [tricium] Add string_view to list of C++ headers (jaspercb@chromium.org)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I587805229aeeb6621067546c2248c2c48a60fccb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253403
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2019-11-07 16:26:44 +00:00
Robert Phillips
fcaae486d7 Use GrProgramInfo's primitiveType field
This improves the encapsulation of all the data required to make a program/pipeline w/in the GrProgramInfo class.

Bug: skia:9455
Change-Id: Ib41519c8ded9f27a7bbe787097a431b38ab101bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253376
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-11-07 16:15:04 +00:00
Mike Klein
297d5a03e6 Revert "hook up float comparisons to x86 JIT"
This reverts commit 12cea8d6c4.

Reason for revert: unit tests failing on ARM... will try again once I have float comparisons implemented for ARM too.

Original change's description:
> hook up float comparisons to x86 JIT
> 
> This gets the draws in gm/skvm.cpp all JITing again,
> and in one of the unit tests.
> 
> (Everything draws the same of course.)
> 
> Change-Id: Iada28690d9df78f9d444ee3765e21beb29239672
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253166
> Auto-Submit: Mike Klein <mtklein@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,reed@google.com

Change-Id: Ie07e580b4998199338217a27d4fad34c679ffc23
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253399
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-11-07 15:35:12 +00:00
Greg Daniel
fa3adf79c8 Add handling of failed framebuffer creation in vulkan.
Bug: skia:9603
Change-Id: I264d1387f319cbe3bb27982ccc6e01fb530abbd5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253238
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2019-11-07 15:25:20 +00:00
Mike Klein
12cea8d6c4 hook up float comparisons to x86 JIT
This gets the draws in gm/skvm.cpp all JITing again,
and in one of the unit tests.

(Everything draws the same of course.)

Change-Id: Iada28690d9df78f9d444ee3765e21beb29239672
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253166
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-11-07 14:36:32 +00:00
Mike Klein
44649ca518 gn format BUILD.gn
Change-Id: Ifd81cf84d0c9ea4ba7dbbec212961ebd7b18424c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253361
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-11-07 14:03:11 +00:00
Robert Phillips
cea290f9d5 Add GrPrimitiveType to GrProgramInfo
This further consolidates the information required to compute the program key (esp. for Vulkan). This CL mainly comprises the plumbing portion - a follow up CL will actually use it.

Bug: skia:9455
Change-Id: Iaac716c289916981a1757a333bfa57b3051fd35b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252161
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-11-07 13:30:42 +00:00
skia-autoroll
c4420ef3dc Roll third_party/externals/angle2 1d09b983031b..cc0919dcb64b (8 commits)
1d09b98303..cc0919dcb6

git log 1d09b983031b..cc0919dcb64b --date=short --no-merges --format='%ad %ae %s'
2019-11-07 jmadill@chromium.org Capture/Replay: Fix VertexAttribType BYTE output.
2019-11-06 tobine@google.com Vulkan:ImageHelper read combined DS textures
2019-11-06 timvp@google.com Vulkan: Ignore VK_INCOMPLETE from vkGetPipelineCacheData
2019-11-06 tobine@google.com Vulkan:Ignore layer warnings about provoking vtx ext
2019-11-06 shrekshao@google.com Fix d3d9 intel gpu fail to create image surface issue
2019-11-06 geofflang@chromium.org GL: Expose PBO extensions
2019-11-06 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src e0d5544c9864..d9fbf0234869 (3 commits)
2019-11-06 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader aaa64b76c0b4..88264e3e188d (3 commits)

Created with:
  gclient setdep -r third_party/externals/angle2@cc0919dcb64b

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-skia-autoroll
Please CC ethannicholas@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Bug: None
TBR=ethannicholas@google.com
Change-Id: I9300a51121a1a3a5e14a2c1c99f4442fbdf7b32c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253300
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-11-07 06:15:51 +00:00
skia-autoroll
345a2735e2 Roll third_party/externals/swiftshader 215bc7949b35..27a3d31d7a9d (2 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/215bc7949b35..27a3d31d7a9d

git log 215bc7949b35..27a3d31d7a9d --date=short --no-merges --format='%ad %ae %s'
2019-11-06 jonahr@google.com Fix issues presenting MetalSurfaces
2019-11-06 swiftshader.regress@gmail.com Regres: Update test lists @ 215bc794

Created with:
  gclient setdep -r third_party/externals/swiftshader@27a3d31d7a9d

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-skia-autoroll
Please CC ethannicholas@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
TBR=ethannicholas@google.com
Change-Id: I8b0c630ed7e6a29bb764aa1797ce1f2002ca54f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253301
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-11-07 04:40:51 +00:00
John Rosasco
f66ec5d69d No GL support on Fuchsia.
Change-Id: Ibd5bd82c9967b6fd10fcf2269db60b6af3d55cbb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253257
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-11-07 01:04:19 +00:00
Chris Dalton
67d43fe581 Rename stencil face terminology to clockwise/counter-clockwise
"Front" and "back" actually refer to opposite triangles in GL vs
Vulkan. Both APIs define counter-clockwise as the default winding
direction for the front face, but since GL uses a bottom-up coordinate
system, they are reversed from one another.

The idea of this CL is to define Ganesh's stencil settings in terms of
clockwise and counter-clockwise in skia device space, just like how we
use "sk_Clockwise" insead of "gl_FrontFacing" in SkSL. We
intentionally avoid the "front"/"back" terminology so there is no
ambiguity. The individual backends are now responsible to translate
cw/ccw into whatever that means for front and back in their own
particular APIs.

This change also swaps the front and back stencil faces in vulkan and
metal, since they were previously backwards from GL. This should have
no actual effect yet, because the only code so far where this matters
is ccpr.

Change-Id: Ife6afbe0a83899edc7eacc3f00a4507d065cccab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252977
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-11-06 22:42:19 +00:00
Herb Derby
2959749f85 Allow more sub-pixel position bits
I tracked down all the places where things were assuming 2-bits
of sub-pixel positions. I generalized them all to take a variable
number of bits.

Change-Id: I304061635c838fedc3881aaa256bab943ff6a817
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253236
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-11-06 21:37:07 +00:00
Mike Klein
714f8cc3ff add vcmpps
Change-Id: I7a13b759d2cd2c27c107ff4cec0daa15c2cd9edb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253131
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-11-06 21:22:22 +00:00
Herb Derby
f7ce19e773 Improve the dynamic range of SkPackedGlyphID ctor
The previous version only translated the sub-position reliably
if the position < 2^10. This code extends the range to 2^21.

Change-Id: I7fcdfe2c3f7336ac0788e282c2bd0fc73067d8fb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253101
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-11-06 20:27:42 +00:00
recipe-roller
2524f1df01 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
depot_tools:
  https://crrev.com/23247b99321549c24e62ad45200409419423695d Don't fetch tags when fetching to deapply a patch. (danakj@chromium.org)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: Ib884645f1061bf950210323f75688d71ec308726
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253159
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2019-11-06 20:26:49 +00:00
recipe-roller
1cbf4ec27c Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
recipe_engine:
  https://crrev.com/9aeddce5ce569741c849c155d94b4966832356eb Add swarming.TaskRequest.from_jsonish() (garymm@google.com)
  https://crrev.com/ce6248afeab2c85d8e9eebc934339c26d048d0fb Revert "Add swarming.TaskRequest.from_jsonish()" (iannucci@chromium.org)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I41f84915c16f53dfdb125abb22ea18f87696bd9c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253135
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2019-11-06 19:43:09 +00:00
Mike Klein
d0792e6de6 unnest matrix multiply
As written the order that skvm::Builder sees the values passed as
arguments to mad() is dependent on C++ function argument evaluation
order.  This can be counterintuitive, and since skvm::Builder uses the
original order it saw arguments to break ties when reordering programs,
it can affect program order and register pressure.

This change keeps the math happening in the same order, but takes
precise control over when we mention (and thus when we load) each matrix
coefficient.  The program goes from looking like this, loading uniforms
in reverse order that they're needed,

    ...
    r4 = uniform32 arg(0) 4C
    r3 = uniform32 arg(0) 50
    r12 = uniform32 arg(0) 54
    r13 = uniform32 arg(0) 58
    r14 = uniform32 arg(0) 5C
    r14 = mad_f32 r13 r8 r14
    r14 = mad_f32 r12 r9 r14
    r14 = mad_f32 r3 r11 r14
    r14 = mad_f32 r4 r6 r14
    ...

to something nicer like this that reuses the same temporaries to load
and accumulate the uniforms in the order they're needed,

    ...
    r7 = uniform32 arg(0) 5C
    r11 = uniform32 arg(0) 58
    r7 = mad_f32 r11 r8 r7
    r11 = uniform32 arg(0) 54
    r7 = mad_f32 r11 r9 r7
    r11 = uniform32 arg(0) 50
    r7 = mad_f32 r11 r10 r7
    r11 = uniform32 arg(0) 4C
    r7 = mad_f32 r11 r6 r7
    ...

In all this cuts three unnecessary temporary registers from programs
using SkColorFilter_Matrix, and would be enough to get gm/skvm.cpp all
JITing again if all the instructions it used were implemented... (next).

Cq-Include-Trybots: skia.primary:Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-SK_USE_SKVM_BLITTER
Change-Id: Ie03a5da476a49eeb950e74290001a0625cf61177
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253126
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-11-06 19:09:19 +00:00