Commit Graph

50899 Commits

Author SHA1 Message Date
Robert Phillips
3380be9588 Fix creation of gpu resources in GrThreadSafeViewCache tests
This CL implements and exercises the preference for gpu-generated content.

This CL also switches to drawing a rect (vs. an arrow) since drawing
a concave path on the gpu can be fraught.

Bug: 1108408
Change-Id: Ieec1619b5357ffb31aa74b471ea09c061bd8f74e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319416
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-09-25 17:32:23 +00:00
John Stiles
ab4ab20fcf Migrate most SkSL tests currently in /glsl/ to /shared/.
These tests will also be used for Metal and SPIR-V testing. A small
handful of GLSL-specific stragglers (#version-specific or type-precision
related) will remain in /glsl/.

Change-Id: I7f2b2bd92825c327922c8ce74e438d2daa440dff
Bug: skia:10649
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319408
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2020-09-25 17:13:53 +00:00
Chris Dalton
081fcc7bba Add a "_volatile" suffix to AllPathsVolatile configs
Bug: skia:10419
Change-Id: Id80f229a59c2a2808ee4034c41896462effed83a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319640
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-09-25 16:55:43 +00:00
John Stiles
7e248716e7 Clean up SkSL test compilation in preparation for Metal support.
Now uses a GN template to avoid copy-pasting the same logic for each
type of test we want to perform, and the same file to be compiled in
more than one way at a time via an extra flag to compile_sksl_tests.py.

Change-Id: I8aadedeb140d78d58a345a2bac0da3d9c77e9a19
Bug: skia:10694
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319347
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2020-09-25 16:44:54 +00:00
Greg Daniel
a28ea67c2a Fix checks of GR_TEST_UTILS.
We had lots of checks just checking defined but we always define
GR_TEST_UTILS

Change-Id: I588c50ddd91f71618a96ab6c9eda2050b423f611
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319682
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-09-25 15:58:53 +00:00
John Stiles
d7ab450278 Traverse FieldAccess' base expression in visitExpression.
The absence of the FieldAccess::fBase traversal appears to be a simple
oversight. This doesn't appear to affect any tests.

Change-Id: I82a5828acedd00f62bf177bd2cf70d67071a83fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319413
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-09-25 15:39:13 +00:00
Jason Simmons
3b88c0772e Handle surrogates in SkUTF::UTF16ToUTF8
Change-Id: Ib2e34aaa49520328660cf5df1998dd50f6f07fbb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319176
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Jason Simmons <jsimmons@google.com>
2020-09-25 14:30:03 +00:00
skia-autoroll
1748c6a3b8 Roll SwiftShader from a09406249fa3 to b94db86cf9b3 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/a09406249fa3..b94db86cf9b3

2020-09-24 sdefresne@chromium.org Explicitly filter assigments to sources variable

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 csmartdalton@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/+doc/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: csmartdalton@google.com
Change-Id: I9bd341b0f4520b9084c4f98e1d37b1bcb8a48bb6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319489
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-09-25 05:28:22 +00:00
skia-autoroll
5227335b0a Roll dawn from 75e5ed6161fc to eec9edfd5769 (3 revisions)
https://dawn.googlesource.com/dawn.git/+log/75e5ed6161fc..eec9edfd5769

2020-09-24 cwallez@chromium.org Standardize the use of UNREACHABLE in switches.
2020-09-24 cwallez@chromium.org Add wgpu::BindingType::MultisampledTexture
2020-09-24 cwallez@chromium.org Refactor PipelineLayoutBase::CreateDefault

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dawn-skia-autoroll
Please CC cwallez@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/+doc/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: cwallez@google.com
Change-Id: I124896d8f82b3b494dbe02ee0deea68b254d98b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319536
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-09-25 05:27:12 +00:00
Brian Osman
79457efe7e Change VariableReference::fVariable to a pointer
We will soon be re-targeting variable references, and this is going to
be much easier (and cheaper) than replacing the entire VariableReference
itself.

Change-Id: I8febc44a1c06e99251153f038a4f5f693cd30231
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319344
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-09-25 01:22:29 +00:00
Robert Phillips
03c31eca19 Reduce needless spread of GrNonAtomicRef.h
Just noticed in passing that this was being used more broadly than warranted

Change-Id: I233060a272c4ed6b7fde7b830cbb5b16cad4cb29
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319350
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-09-24 23:19:11 +00:00
Florin Malita
fe3d9a2309 Reland "[skottie] Reduce CompositionBuilder stack footprint"
This reverts commit 1946366ee0.

Reason for revert: reland

Original change's description:
> Revert "[skottie] Reduce CompositionBuilder stack footprint"
>
> This reverts commit 3f751f29ad.
>
> Reason for revert: build errors
>
> Original change's description:
> > [skottie] Reduce CompositionBuilder stack footprint
> >
> > LayerBuilder has grown to be pretty chunky.  Using inline storage
> > SkSTArray<64> in stack-allocated CompositionBuilders is excessive
> > (and unnecessary).
> >
> > -fstack-usage before:
> >   AnimationBuilder::attachPrecompLayer() 7536
> >
> > -fstack-usage after:
> >   AnimationBuilder::attachPrecompLayer() 368
> >
> >
> > Change-Id: Ia905d58e02519d9251620f3eeedbbdc434e3392d
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319342
> > Reviewed-by: Mike Klein <mtklein@google.com>
> > Reviewed-by: Ben Wagner <bungeman@google.com>
> > Commit-Queue: Florin Malita <fmalita@google.com>
> > Commit-Queue: Florin Malita <fmalita@chromium.org>
>
> TBR=mtklein@google.com,bungeman@google.com,fmalita@chromium.org,fmalita@google.com
>
> Change-Id: Ie488318d8da5f568f7869041105e53ceb2bf2ccb
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319401
> Reviewed-by: Florin Malita <fmalita@google.com>
> Commit-Queue: Florin Malita <fmalita@google.com>

TBR=mtklein@google.com,bungeman@google.com,fmalita@chromium.org,fmalita@google.com

Change-Id: I806d70e28c8fc0f64a613a4d43705bb695ad3a68
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319406
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
2020-09-24 21:36:29 +00:00
Brian Salomon
96c8aeb494 Reland "Allow rect and circle blur fast cases to be used with rotation matrices."
This is a reland of 2bded27a96

Original change's description:
> Allow rect and circle blur fast cases to be used with rotation matrices.
>
> For circles this is trivial. The existing shader works as is.
>
> For rects this requires back projecting from device space.
>
> Adds a GM for rotated rect blurs and modifies a circle blur GM to add
> rotation.
>
> Bug: chromium:1087705
>
> Change-Id: I6b969552fbcc9f9997cfa061b3a312a5a71e8841
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318757
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

Bug: chromium:1087705
Change-Id: Ie3ef96c40461665f6207225a15e19b4cf5bcba94
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319338
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-09-24 21:33:44 +00:00
Julia Lavrova
6e51d92a02 ICU project: text break iterators in SkShaper
Change-Id: I8a0dd71298331b608fbe874cc610a80fc7815b0e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313082
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2020-09-24 20:17:04 +00:00
Florin Malita
1946366ee0 Revert "[skottie] Reduce CompositionBuilder stack footprint"
This reverts commit 3f751f29ad.

Reason for revert: build errors

Original change's description:
> [skottie] Reduce CompositionBuilder stack footprint
>
> LayerBuilder has grown to be pretty chunky.  Using inline storage
> SkSTArray<64> in stack-allocated CompositionBuilders is excessive
> (and unnecessary).
>
> -fstack-usage before:
>   AnimationBuilder::attachPrecompLayer() 7536
>
> -fstack-usage after:
>   AnimationBuilder::attachPrecompLayer() 368
>
>
> Change-Id: Ia905d58e02519d9251620f3eeedbbdc434e3392d
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319342
> Reviewed-by: Mike Klein <mtklein@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Florin Malita <fmalita@google.com>
> Commit-Queue: Florin Malita <fmalita@chromium.org>

TBR=mtklein@google.com,bungeman@google.com,fmalita@chromium.org,fmalita@google.com

Change-Id: Ie488318d8da5f568f7869041105e53ceb2bf2ccb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319401
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2020-09-24 20:15:26 +00:00
Brian Osman
5f46a27d7b Add missing include to fix generated files bot
Change-Id: I93ff7e5f1062c6a85152c587fcedc34e9257dd27
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319345
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-09-24 20:03:57 +00:00
Mike Klein
6b72d3a03b q14 rethink
I've been thinking and rethinking and rethinking how best to use 16-bit
values like Q14 fixed-point in SkVM.  Here's some ways:

   A) don't... just use 32-bit values instead
   B) use 16x2-bit pairs to match the narrower 32-bit lane count
   C) double-pump 32-bit values to match the wider 16-bit lane count
   D) use native 16- and 32-bit values and let the backends sort it out

A) is how things work today, and C) is how SkRasterPipeline's lowp mode
works.  Having tried out B) and C) both for a good fair shake, they were
both already awkward to work with after writing just a few functions.  I
would not give up on them entirely, but they're no longer my favorites.

D) is subtle and my new favorite.  It's easiest to program with SkVM
when the values we're holding represent single values and the backend
handles any parallelism for us.  That suggests we add a simple 16-bit
Q14 to the existing 32-bit I32 and F32 types, where they can be actively
converted between as normal, but not freely no-op bit punned.  D) says
we people shouldn't have to choose between A-C) up front... each backend
can handle it themselves.

Under strategy D), it's entirely the backend's job to decide how to
represent each value, and how to to vectorize them.  We don't need to
know as a user, and the backends can use the program itself to inform
how they vectorize.  16-bit values could live in xmm registers and
32-bit values in ymm, or the 16-bit values could go in the low half of a
ymm, or the even lanes of a ymm, or a full ymm and use two for 32-bit
values, etc. etc.  This all is a backend choice, not something we should
have to know about when writing a program using Q14/I32/F32.

My next steps are to get Q14 operations tested and plumbed through the
JIT again, and to build out a blitter and a few effects using Q14 color
channels.  Then, independently, we can look at each backend and how to
vectorize them.  Some ideas:

    1) keep running at current vectorization, with half rate 16-bit ops
    2) pump up to 2x wider vectorization unconditionally to favor 16-bit
    3) pump up to 2x wider vectorization only when any 16-bit op is used

These choices can be made independently for each backend (JIT, LLVM,
interp), and I wouldn't be surprised to find that we'll want to do them
differently.  For instance, the interpreter is already running at 32x
vectorization... might be pumping it higher won't help anything.

Change-Id: Ib8ad2b1bf790e8c4e3acfb4818d4032f7628e8f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319321
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-09-24 20:02:58 +00:00
skia-autoroll
18c043ee75 Roll Chromium from 9a7bc8d5069f to 6a3c229fa0dc (401 revisions)
9a7bc8d506..6a3c229fa0

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-skia-autoroll
Please CC csmartdalton@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/+doc/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Tbr: csmartdalton@google.com
Change-Id: I9ccf5f11bd07d538905af179a54412e46d8b8723
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319200
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-09-24 19:58:24 +00:00
Florin Malita
3f751f29ad [skottie] Reduce CompositionBuilder stack footprint
LayerBuilder has grown to be pretty chunky.  Using inline storage
SkSTArray<64> in stack-allocated CompositionBuilders is excessive
(and unnecessary).

-fstack-usage before:
  AnimationBuilder::attachPrecompLayer() 7536

-fstack-usage after:
  AnimationBuilder::attachPrecompLayer() 368


Change-Id: Ia905d58e02519d9251620f3eeedbbdc434e3392d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319342
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-09-24 19:56:50 +00:00
Chris Dalton
9278f10795 Add "AllPathsVolatile" skpbench bots
Also adds GalaxyS20 to the mix, which wasn't running skpbench
previously.

Also removes the skpbench logic to fail if we don't recognize the
hardware or have specific scripts for it. We don't have time to reverse
engineer every new piece of hardware we want to run on and the general
android script is quite helpful already.

Bug: skia:10419
Change-Id: I0e139cdd4bc2e7ca0e2e14c715d319664fa8c949
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319143
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-09-24 19:50:34 +00:00
Chris Dalton
e74cebefde Begin implementing onPrePrepare for tessellation ops
Records programInfos for the stroke ops and for the stencil portions
of the path ops.

We can't prePrepare programInfos for the fill portions yet because it
would require multiple GrPipelines that all reference the same
GrProcessorSet. And GrProcessorSet is currently designed to be
std::moved into one single GrPipeline.

Bug: skia:10419
Change-Id: I3b8c061da181e20d3ff68746cf4b9c61f6d73a88
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319256
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-09-24 18:07:24 +00:00
Ravi Mistry
15a4b183c8 Add digital micrography svg to the RecreateSKPs bot
Bug: skia:10752
Change-Id: I15d6bb189d44eddbd8bbe2133a2bd705f5313a75
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319028
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2020-09-24 17:20:42 +00:00
John Stiles
8cfbcb5afb Update doc comments to match new enum structure.
Change-Id: I5b4fe40847112a11d6057ee7acd208879a71722f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319190
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-09-24 16:39:33 +00:00
Ethan Nicholas
c8d9c8ee34 Revert "Revert "moved BinaryExpression's data into IRNode""
This reverts commit b61c3a9a01.

Change-Id: I42d93bdc6455c8ef941a6cbe1339df2ba916bb3c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318697
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-09-24 16:34:23 +00:00
Brian Osman
32d53550c8 Remove unsafe compiler methods related to external values
We don't want to be polluting the global namespace with external values,
especially when the typical/recommended way to use the Compiler is with
a single long-lived instance. Force client code to manage ownership (the
only non-unit-test case was already doing this), and pass external
values to convertProgram, so they can be added to the Program's symbol
table.

Change-Id: If4c1db5e48a62e2cf4333b8d80420f2dfede27ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319125
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-09-24 14:12:08 +00:00
Robert Phillips
1fc7422092 Revert "Allow rect and circle blur fast cases to be used with rotation matrices."
This reverts commit 2bded27a96.

Reason for revert: Seems to be blocking the Chrome roll

Original change's description:
> Allow rect and circle blur fast cases to be used with rotation matrices.
>
> For circles this is trivial. The existing shader works as is.
>
> For rects this requires back projecting from device space.
>
> Adds a GM for rotated rect blurs and modifies a circle blur GM to add
> rotation.
>
> Bug: chromium:1087705
>
> Change-Id: I6b969552fbcc9f9997cfa061b3a312a5a71e8841
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318757
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,robertphillips@google.com

Change-Id: Iafb479f3b3561e226678a3020254c6e76d4ce284
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1087705
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319186
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-09-24 13:43:20 +00:00
Adlai Holler
cf43fc6768 Revert "Reland "Take GrContext private, GrDDLContext inherit from GrRecordingContext""
This reverts commit ff13ffbeac.

Reason for revert: Blink in g3

Original change's description:
> Reland "Take GrContext private, GrDDLContext inherit from GrRecordingContext"
>
> This reverts commit 89bdc90ac8.
>
> Reason for revert: Fix metal
>
> Original change's description:
> > Revert "Take GrContext private, GrDDLContext inherit from GrRecordingContext"
> >
> > This reverts commit d2daa94ede.
> >
> > Reason for revert: Metaru
> >
> > Original change's description:
> > > Take GrContext private, GrDDLContext inherit from GrRecordingContext
> > >
> > > Woo!
> > >
> > > Change-Id: I8d201b709343dc18cad31ea740575285dd035f35
> > > Docs-Preview: https://skia.org/?cl=317436
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317436
> > > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > Commit-Queue: Adlai Holler <adlai@google.com>
> >
> > TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com
> >
> > Change-Id: I9b58dee285fbdc49ebc8e76df5da0fe224cf9787
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318758
> > Reviewed-by: Adlai Holler <adlai@google.com>
> > Commit-Queue: Adlai Holler <adlai@google.com>
>
> TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com
>
>
> Change-Id: Id4b10795193a904cd4ed8c36e60e74abe3b6702a
> Docs-Preview: https://skia.org/?cl=318759
> Cq-Include-Trybots: luci.skia.skia.primary:Build-Mac10.15.5-Clang-arm64-Debug-iOS_Metal,Build-Mac-Clang-x86_64-Debug-Metal
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318759
> Commit-Queue: Adlai Holler <adlai@google.com>
> Reviewed-by: Adlai Holler <adlai@google.com>

TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com

Change-Id: Ib20fe933120d56b72efaec73a0bedec60bc28def
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319184
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
2020-09-24 11:44:49 +00:00
skia-autoroll
96d9b52bb9 Roll SwiftShader from 6aadd31a5f98 to a09406249fa3 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/6aadd31a5f98..a09406249fa3

2020-09-24 egranata@google.com Fix a linker problem with ARM/thumb compatibility

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 csmartdalton@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/+doc/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: csmartdalton@google.com
Change-Id: I0b613887780e604af1c909c147c452cb74b3e0a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319236
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-09-24 04:47:57 +00:00
skia-autoroll
3fe9fd4dfb Roll dawn from 0b29732cd84f to 75e5ed6161fc (3 revisions)
https://dawn.googlesource.com/dawn.git/+log/0b29732cd84f..75e5ed6161fc

2020-09-23 shaobo.yan@intel.com Support Noop Copy for B2T, T2B and T2T Copies
2020-09-23 cwallez@chromium.org Fix deprecation errors for indexFormat being set.
2020-09-23 cwallez@chromium.org Fix compilation on ChromeOS

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dawn-skia-autoroll
Please CC cwallez@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/+doc/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: cwallez@google.com
Change-Id: I945418dce61f1dd5172b8b3993b8e7131eac8855
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319201
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-09-24 04:46:27 +00:00
Chris Dalton
fc396a85e4 Make WangsFormula_* tests more tolerant of rsqrt approximation
TBR=michaelludwig@google.com

Change-Id: I01e9bd833b604628487a9f345d6fae8340f2848d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319197
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-09-24 03:36:27 +00:00
Jim Van Verth
1b89eb742a Add AMD allocator to D3D12 backend.
Adds base class GrD3DAlloc and GrD3DMemoryAllocator, and a reference
to a GrD3DMemoryAllocator in GrBackendContext and a reference to a
GrD3DAlloc in GrD3DTextureResourceInfo. Internally, we override this
base class to define the AMD memory allocator.

Change-Id: I033924b0247ea330969b1398f25985e7a84aec11
Bug: skia:9935
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317243
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-09-23 21:22:52 +00:00
Herb Derby
5d9d837994 error on the side of safety for empty blobs
If the blob is empty, then try to regenerate it. Using
this method caused a slowdown in Skia perf, so we
added an extra check to allow some empty blobs through
for perf performance. The perf problem was caused by
SKPs generate empty blobs because of font mismatches.
Flutter has shown that scaling from very small to
normal size is not correctly handled by the existing
check. This CL favors correctness over optimizing empty
text blob and always regenerates empty blobs.

https://github.com/flutter/flutter/issues/64936

Change-Id: Ib18ecb684b0af5cf6dce274b6dc09a9c61b17c77
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319031
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-09-23 21:18:27 +00:00
Adlai Holler
ff13ffbeac Reland "Take GrContext private, GrDDLContext inherit from GrRecordingContext"
This reverts commit 89bdc90ac8.

Reason for revert: Fix metal

Original change's description:
> Revert "Take GrContext private, GrDDLContext inherit from GrRecordingContext"
>
> This reverts commit d2daa94ede.
>
> Reason for revert: Metaru
>
> Original change's description:
> > Take GrContext private, GrDDLContext inherit from GrRecordingContext
> >
> > Woo!
> >
> > Change-Id: I8d201b709343dc18cad31ea740575285dd035f35
> > Docs-Preview: https://skia.org/?cl=317436
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317436
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Adlai Holler <adlai@google.com>
>
> TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com
>
> Change-Id: I9b58dee285fbdc49ebc8e76df5da0fe224cf9787
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318758
> Reviewed-by: Adlai Holler <adlai@google.com>
> Commit-Queue: Adlai Holler <adlai@google.com>

TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com


Change-Id: Id4b10795193a904cd4ed8c36e60e74abe3b6702a
Docs-Preview: https://skia.org/?cl=318759
Cq-Include-Trybots: luci.skia.skia.primary:Build-Mac10.15.5-Clang-arm64-Debug-iOS_Metal,Build-Mac-Clang-x86_64-Debug-Metal
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318759
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
2020-09-23 21:17:47 +00:00
John Stiles
978674a23e Fix crash with invalid out parameters.
Many calls to `setRefKind` failed to check the return value; if it's
false, an error has occurred and the program is in a bad state.
Specifically, there is an assignment to a variable that's not marked as
"written-to." If we continue processing the program, we're likely to
assert.

Change-Id: I2dd5d1f41aa5ca0d30f8d638f05fe2e838216d78
Bug: skia:10753
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319116
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-09-23 20:36:17 +00:00
Chris Dalton
e2067645ef Optimize GrWangsFormula
Adds various optimizations to GrWangsFormula as well as "pow4" variants
of the formula that are quicker than the standard and/or log2 versions.
Uses the pow4 variants in GrStrokePatchBuilder.

Bug: skia:10419
Change-Id: I8478582df5296b088d25808bcaeb93107ff20797
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318954
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-09-23 20:35:47 +00:00
John Stiles
59b2a92c96 Add new unit tests for SkSL.
These cover:
- Properly configured out-params
- Invalid/non-lvalue out-params, which currently cause an SkSL crash
- Interactions between the inliner and variable swizzles

Change-Id: I4874101236084f273e704d8717149b431d813883
Bug: skia:10753
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319036
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-09-23 20:30:47 +00:00
Brian Salomon
2bded27a96 Allow rect and circle blur fast cases to be used with rotation matrices.
For circles this is trivial. The existing shader works as is.

For rects this requires back projecting from device space.

Adds a GM for rotated rect blurs and modifies a circle blur GM to add
rotation.

Bug: chromium:1087705

Change-Id: I6b969552fbcc9f9997cfa061b3a312a5a71e8841
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318757
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-09-23 20:01:07 +00:00
Brian Osman
e498b3c75b Various cleanup related to symbol tables
- Remove a spurious symbol table inserted by convertProgram. start()
  already pushes a symbol table, and this was pushing a second one,
  which didn't seem necessary. (The Parser can inject symbols for types
  it discovers, but I can't justify those needing to be in a different
  table than the rest of the program elements?)
- The convertProgram one had a comment indicating that it was popped by
  the Compiler. That wasn't true, so this gets us one step closer to
  balance.
- The one in start() is meant to be balanced by a pop in finish(), but
  no one ever called finish(). Add that call in, and also rearrange
  things so that the base symbol table is a parameter to start(), rather
  than just setting it on the IR generator. (There's more of this
  pattern around, but I wanted to limit the scope of this CL).
- When dehydrating the include files, we had logic to work around the
  extra symbol table (absorbing the symbols) - that's not needed now.
- Simplify some other logic in processIncludeFile (no need to make so
  many string copies). Always just put the incoming include file strings
  into the root table, also. It's largely irrelevant where they go.

Change-Id: I18d897af3d5fa6506e11024beb9bb70e6cc5b538
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319038
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-09-23 19:55:08 +00:00
Greg Daniel
1d3c8c1a8b Add optional param to setBackendTextureState to return previous state.
Bug: skia:10742
Change-Id: I334e7896d0a1509eb666c46d5731d2573a5c1aba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318698
Reviewed-by: Austin Eng <enga@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-09-23 19:54:59 +00:00
Adlai Holler
7b97b3cb2b Reland "Migrate metal tools away from GrContext"
This reverts commit 18f4b1c7e3.

Reason for revert: Fixed iOS

Original change's description:
> Revert "Migrate metal tools away from GrContext"
>
> This reverts commit 3eb813e0cc.
>
> Reason for revert: Broke iOS
>
> Original change's description:
> > Migrate metal tools away from GrContext
> >
> > Change-Id: I73a73ca5d088c35acd23be3336d8d1e3e859a82e
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318760
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
> > Auto-Submit: Adlai Holler <adlai@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com
>
> Change-Id: Idf74c936cfe8481e18455dcc0faa21155884b198
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319017
> Reviewed-by: Adlai Holler <adlai@google.com>
> Commit-Queue: Adlai Holler <adlai@google.com>

TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com


Change-Id: I6e14a333be4a960af0434bbcb6ce9a1a2271dca6
Cq-Include-Trybots: luci.skia.skia.primary:Build-Mac-Clang-arm64-Debug-iOS_Metal,Test-iOS-Clang-iPhone11-GPU-AppleA13-arm64-Debug-All-Metal,Test-Mac10.13-Clang-MacBook10.1-GPU-IntelHD615-x86_64-Debug-All-Metal,Test-Mac10.13-Clang-MacBook10.1-GPU-IntelHD615-x86_64-Debug-All-DDL3_Metal
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319018
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-09-23 19:11:07 +00:00
Chris Dalton
49814b9fdc Merge joins into the same tessellation patch as their following stroke
Implements the previous join as a sub-section of the tessellation
patch. This cuts the number of vertex shader invocations in half since
we are no longer treating joins as their own patch. (This therefore
cuts the amount of inflection/midtangent chopping work in half also.)

This required a lot of modifications to GrStrokePatchBuilder.cpp, so
this CL also finishes up the chopping logic in that file for when there
aren't enough tessellation segments to render a curve.

Bug: skia:10419
Change-Id: I3da081fe756c97aeeb65e27f1319a29763b4ad34
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318876
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-09-23 19:05:17 +00:00
Chris Dalton
d1e6716f6a Add an "allPathsVolatile" option for testing
Bug: skia:10419
Change-Id: I4bb2dc515448d8c87329ade90d24bf78ca1d7938
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319097
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-09-23 19:02:27 +00:00
John Stiles
db62d088ef Bring back the harness from SkSLGLSLTest as a testbed for debugging.
The code here is resuscitated from the GLSL testing harness at
http://review.skia.org/317771 . Testing and debugging in dm is simpler
than debugging skslc when we encounter compiler issues.

Change-Id: I492dd0bbd2f0ee0b3b6a1b5253da54d72dc1eb3b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319032
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-09-23 18:44:47 +00:00
Chris Dalton
6756afabb6 Fail the "tess_segs_5" tests if Skia doesn't actually give us 5 tessellation segments
Bug: skia:10419
Change-Id: I5363ac6ac74131341d010cf2958cc5d7a070689f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318782
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-09-23 17:03:57 +00:00
Brian Osman
81fc1fc3bf Remove fRootSymbolTable from IR Generator
Two Compiler methods that use the root symbol table are still dangerous,
they're polluting the global namespace. For long-lived compilers, we
don't want to do that. takeOwnership is only used in tests, but
registerExternalValue is used by particles. Thinking I'll move that to
an optional argument to convertProgram, or a field on Settings.

Change-Id: Ic88d29d053510001931dcc2388aba2dc83a953ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319030
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-09-23 17:02:37 +00:00
John Stiles
647a9bd7c2 Convert the remaining FP tests to golden outputs.
(Removed one test, SkSLFPSwitchWithMultipleReturnsInside, because it was
redundant with existing tests.)

Change-Id: I1bfc069babdb5eb0cc515f195c3a2e307bb5871a
Bug: skia:10694
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319029
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-09-23 16:21:58 +00:00
Nathaniel Nifong
ba615e892f Fixes for canvaskit karma tests in google3
Change-Id: I4945f99016ed7424ed0fe8cca1f0006396a1ad44
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317857
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-09-23 14:51:27 +00:00
John Stiles
443d2c17b7 Revert "Calculate texture clamping X/Y coordinates in parallel."
This reverts commit a38945abe3.

Reason for revert: Pinpoint says it costs RAM on Mac (?), and doesn't show any visible perf benefit

Original change's description:
> Calculate texture clamping X/Y coordinates in parallel.
> 
> The X and Y values of `clampedCoord`, `extraRepeatCoord`, and `snapped`
> were being calculated and stored separately, even in cases where work
> could easily be done in tandem. Updated the code so that we use .xy when
> it makes sense to do so.
> 
> Change-Id: I10d85670acb4fec960444b3f3c30f2929c6dcaf2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318436
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

TBR=bsalomon@google.com,johnstiles@google.com

Change-Id: I10aaba4caeacaa0b081d10cc900044c37f690782
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319021
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-09-23 13:55:49 +00:00
Robert Phillips
c2fe1644db Add time-based purging to the GrThreadSafeUniquelyKeyedProxyViewCache
Bug: 1108408
Change-Id: I7dd4a3b1b20f3267903dd7f303a2d639b562d84a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318761
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-09-23 13:07:50 +00:00
Michael Ludwig
462bdfc06e Allow non-AA clip rects to be scissor only even on MSAA targets
This appears to fix the performance regressions seen on a number of webpage
SKPs for vkmsaa8 and glmsaa targets on devices that can't disable multisampling.

Bug: skia:10730
Change-Id: I2c10a78cfe864f987b7f17eb69eb2e1712ca0676
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317772
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-09-23 13:05:00 +00:00