Commit Graph

52703 Commits

Author SHA1 Message Date
Greg Daniel
d8d9cf10ef Enable using discardable msaa attachments in vulkan.
This CL enables in Vulkan a system similar to render to texture for GL
MSAA. This can have rendering artifacts if we break up the rendering to
an MSAA surface into two render passes since when we load for the second
render pass it fills all the samples with the resolved color from the
first render pass instead of just the covered samples. These artifacts
exists in the GL version as well. Locally we are seeing perf gains up to
2x factor which justifies the artifacts of using this technique.
Additionally, when we turn on reduce oplist splitting this will decrease
the times where this is even an issue.

This enables it for all devices, but most likely we will only see
improvements on tilers and will end up disabling this for desktops.

Also includes some minor fixes.


Bug: skia:10979
Change-Id: Ic7c3000e3ebed9f4a6351ab8f5637be9ee0194ff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344964
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-01-08 17:20:49 +00:00
Eric Boren
fafb47739a [infra] Filter PathKit and CanvasKit tryjobs when cutting Chrome branch
The Chrome branches are irrelevent to CanvasKit/PathKit.

We only officially build/support *Kit built from ToT

Change-Id: I5f04ead23bb5d76891aec71350bad5b3039c2eda
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/351919
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2021-01-08 17:14:49 +00:00
Nathaniel Nifong
0355118f22 debug build for wasm gm tests
Change-Id: I802160c5734648a57b5ffe19f0df990c526e2c2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350896
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2021-01-08 16:46:49 +00:00
Weston Tracey
f5aed172c6 [infra] Use Mac10.15.7 and xcode12.3 for all builds.
Bug: skia:11129
Change-Id: I314d51988e4cafc9dfea60bc70a57f46faa8666a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345396
Reviewed-by: Eric Boren <borenet@google.com>
2021-01-08 13:33:55 +00:00
John Stiles
d2f51b1806 Fix fuzzer-discovered optimizer crash.
The CFG/definition map are no longer valid after replacing an expression
entirely. Swizzle-of-swizzle optimization was another case where the
optimizer would replace an expression wholesale, but failed to set the
needs-rescan flag.

Change-Id: Ida0363d738cd1d3ac2a48c824aa04065a7ca16b7
Bug: oss-fuzz:29085
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/351776
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-01-08 13:03:02 +00:00
skia-autoroll
cb3bcf88e3 Roll Chromium from ebb8289a1933 to f936dc21b927 (446 revisions)
ebb8289a19..f936dc21b9

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 johnstiles@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: johnstiles@google.com
Change-Id: I5b1ef1a04c66a6e39d4b166011b249a8e5149cee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/351900
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-01-08 05:00:02 +00:00
skia-autoroll
b2ac12993b Roll Dawn from fac169113df7 to 00fcab636a05 (5 revisions)
https://dawn.googlesource.com/dawn.git/+log/fac169113df7..00fcab636a05

2021-01-07 cwallez@chromium.org Fix default viewDimension in deprecated BGLEntry path.
2021-01-07 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 40b4928a73b7 to 766e31d50710 (4 revisions)
2021-01-07 bclayton@google.com Reland "Update PrimitiveTopologyTests to use WGSL"
2021-01-07 cwallez@chromium.org Roll third_party/vulkan-deps/ b08eace32..c493c6112 (27 commits; 1 trivial rolls)
2021-01-07 jpnurmi@gmail.com Fix typo: vulkan_deps vs. vulkan-deps

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from 40b4928a73b7 to 766e31d50710

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 enga@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: enga@google.com
Change-Id: I16984a5519d3a75ceba796acdbd6df187034ec77
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/351899
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-01-08 04:49:32 +00:00
skia-autoroll
f7ce1cd243 Roll SwiftShader from 7b2f93895418 to 937395c1ed5d (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/7b2f93895418..937395c1ed5d

2021-01-07 caramelli.devel@gmail.com Add Direct-to-Display support using KMS/DRM
2021-01-07 srisser@google.com Add structs for VK_KHR_vulkan_memory_model

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 johnstiles@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: johnstiles@google.com
Change-Id: I1afdfd881f29b2077753b0bb433faea692f5d823
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/351865
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-01-08 04:47:22 +00:00
Mike Reed
f4ea30580c Revert "Cache ICU break iterators in SkUnicode_icu"
This reverts commit 504451c7cc.

Reason for revert: breaking android roll?

external/skia/modules/skshaper/src/SkUnicode_icu.cpp:199:28: error: use of undeclared identifier 'ubrk_safeClone'
            iterator.reset(ubrk_safeClone(cachedIterator->get(), nullptr, nullptr, &status));
                           ^
1 error generated.


Original change's description:
> Cache ICU break iterators in SkUnicode_icu
>
> Change-Id: I2d6abd1a12d629b590a6616d0d1c71d71d5f4812
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344476
> Commit-Queue: Jason Simmons <jsimmons@google.com>
> Reviewed-by: Julia Lavrova <jlavrova@google.com>

TBR=bungeman@google.com,jsimmons@google.com,jlavrova@google.com

Change-Id: Iccc8c630bb2461ca3509144a25961b478e6a634d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/351916
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-01-08 02:29:03 +00:00
Mike Reed
c6e25754c4 Always lerp when post-rotating tile in pictureshader
... guarded by SK_SUPPORT_LEGACY_INHERITED_PICTURE_SHADER_FILTER

Bug: skia:7650
Change-Id: Ie6e230a492e8364395d4442263ed9bf95f546e0c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/351505
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-01-08 02:24:22 +00:00
Chris Dalton
811dc6a8a4 Make Comparator& refs in GrTriangulator const
TBR=jvanverth@google.com

Bug: skia:10419
Change-Id: I6da265e732b5588e1780da8b509d21ce65746a5a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/351796
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-01-08 00:14:01 +00:00
Brian Osman
db2dad5c64 SkSL-to-SkVM: Prepare to handle function calling
Change-Id: I4a130b0c776888587122a7ae25e1b32b10011d55
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/351499
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2021-01-07 21:54:56 +00:00
Ethan Nicholas
950461497d Beginnings of the SkSL DSL framework
The code at this point doesn't do anything useful, but establishes some
of the basic types and patterns.

Change-Id: I580a9e75ffa3162879893450fb7d1f0905a10687
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350697
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
2021-01-07 21:53:01 +00:00
John Stiles
7cbb09c2fe Report a parsing error when invalid tokens are detected.
Change-Id: I75f907ca673ee67f5d623b032128b97833070a0b
Bug: skia:10931
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/351504
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-01-07 21:49:51 +00:00
Brian Osman
57e353f840 Remove error reporter from SkSLVMGenerator
All errors need to be caught earlier, so turn any remaining TODO items
into asserts.

Bug: skia:11127
Change-Id: I6731f947233522df6397b3444c26d5ebc417c431
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/351506
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-01-07 21:36:21 +00:00
Mike Klein
606488ad68 back to exactCompare, fixed
Change-Id: Ifd7883a4b327aae9fc0a984f08755d6d6f57f72e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/351018
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2021-01-07 21:25:31 +00:00
Julia Lavrova
bdd9a7bf2e RTL run broken by text styles crashes SkParagraph
Bug: skia:11148
Change-Id: I92f941faa645b98e2fc6827eac80020637780a1c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/351501
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2021-01-07 21:03:01 +00:00
John Stiles
2787bc854f Add unit test for invalid tokens in input stream.
Change-Id: If6b23d03b02028b51f96e97080cbd7d34cc33b8f
Bug: skia:10931
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/351503
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>
2021-01-07 20:50:01 +00:00
John Stiles
bd058477e2 Constant-propagate the ! prefix onto constant boolean expressions.
This will flatten out expressions such as `!false` or `!true`. We
already had a similar fix-up at IR generation time which handled simple
cases, but this will catch more complicated ones like `!sk_Caps.xxxxx`
(since caps bits are only flattened out at constant propagation time).

Change-Id: I04282809d9a784266a64dbcafd097f3b0662806c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/351497
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>
2021-01-07 20:09:49 +00:00
Jason Simmons
504451c7cc Cache ICU break iterators in SkUnicode_icu
Change-Id: I2d6abd1a12d629b590a6616d0d1c71d71d5f4812
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344476
Commit-Queue: Jason Simmons <jsimmons@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
2021-01-07 19:57:46 +00:00
Mike Klein
627c0022ff support generalized HLG
Same basic deal as skcms.

This new GM tests our treatment of color spaces as sources is consistent
with our treatment of color spaces as destinations.  It looks good to me
now, and I have tested that this GM catches a "well-placed typo" in each
of the three implementations modified here.

Bug: chromium:1144260
Change-Id: I3eabc93bbd65855c60006751f68c171ccdce9d94
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/351336
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2021-01-07 19:32:03 +00:00
Mike Klein
8194c3024f add operator/= for skvm::F32
I've made y an F32 instead of an F32a to remind us that it's
usually best to multiply instead of divide by a constant.

Change-Id: I15c9ab50e51f5011eca977908168ed27f1de25b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/351337
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2021-01-07 19:24:09 +00:00
Chris Dalton
d60c919fc8 Revert "Move GrTriangulator internal struct definitions to the .h file"
This reverts commit 75887a2321.

Reason for revert: Flutter crash

Original change's description:
> Move GrTriangulator internal struct definitions to the .h file
>
> This makes them reusable for the edge-AA code when we move it.
>
> Bug: skia:10419
> Change-Id: I20042a419617717214535d45fc92a8cae986fb33
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/349356
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

TBR=jvanverth@google.com,robertphillips@google.com,csmartdalton@google.com

Change-Id: I7e317b01883afc9eab494f1a0846ece9e3272ec5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10419
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/351477
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-01-07 18:30:34 +00:00
John Stiles
df069c9ec7 Remove compile-time constant support from PrefixExpression.
This is not actually necessary now that constantPropagate can fully
flatten out unary negation into its constant operands. The compilation
results don't change at all.

Change-Id: I7ab55bd3720413609d799dd866e1703973cb2626
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/351202
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>
2021-01-07 18:14:22 +00:00
Adlai Holler
78036086cf Add a new implementation of reduceOpsTaskSplitting
Currently this doesn't actually handle going over the memory
budget, but it does carve out space to do that later. This algorithm
can't handle everything yet but I want to get it landed for
more iteration as long as it's disabled.

Bug: skia:10877
Change-Id: I37942172345e8cfd6fc2c591a3788a10652377da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345168
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
2021-01-07 17:20:03 +00:00
Kevin Lubick
5779a86072 [canvaskit] Add docs and example for flags
Change-Id: I9ad8a591b9f9dc5c454bfa30405244e49ad6b593
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350816
Reviewed-by: Yegor Jbanov <yjbanov@google.com>
2021-01-07 16:38:58 +00:00
John Stiles
bdc3d3c60f Simplify map of SPIR-V numeric constants.
Previously, we used a union of (int64, float) to store the cached value.
However, the union-based code turned out to be more complex than just
type-punning the float's bits to an int via memcpy (which we needed to
do anyway). The union-based approach was also likely to be UB by the
letter of the law--we were creating float keys by storing into fFloat,
then checking the map by comparing equality on fInt.

Change-Id: I62c7ff4b5fab8bb1be8836c23f746ef254053b6f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350957
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-01-07 15:50:11 +00:00
John Stiles
9cfaa4ffa1 Flatten nested vector constructors when emitting SPIR-V.
This fixes SPIR-V code generation when encountering nested constructors
like `float3 v4 = float3(float2(1), 1.0);` as featured in our unit test
VectorConstructors.sksl.

Change-Id: I3a0c4b466b3cb17ba50bd264f899e59c55c768ed
Bug: skia:11141
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350032
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-01-07 15:47:11 +00:00
John Stiles
e1c80d625b Implement getBVecComponent.
Like getIVecComponent or getFVecComponent, this retrieves the n'th
element of a Boolean compile-time constant vector. This will be used in
followup CLs.

Change-Id: Ib41c9c89cb773251e4c0d6cdcaea0437d8074e48
Bug: skia:11141
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350918
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-01-07 15:26:31 +00:00
Chris Dalton
dc8ed8fb8b Revert "Disable tessellation when we don't have indirect draw support"
This reverts commit b05571f0b8.

Reason for revert: Android crash

Original change's description:
> Disable tessellation when we don't have indirect draw support
>
> Avoids the polyfill that uses looping instanced draws. This has led to
> perf regressions on android.
>
> Bug: skia:11138 skia:11139 chromium:1163441
> Change-Id: I129bf96c6d8a3eaadc79bfca496c7d50189f737e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350738
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

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

Change-Id: Iebb473211ff618c1988aa5b7306e3e39efa353f5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11138 skia:11139 chromium:1163441
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/351216
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-01-07 15:16:12 +00:00
John Stiles
f710147302 Add getConstantBool as a sibling of getConstant(Int|Float).
This will be used in a followup CL to implement getBVecComponent. At
present it's not called.

Change-Id: Idd6f18314d0835af3946ea7458e6650384f505ea
Bug: skia:11141
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350703
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-01-07 15:14:21 +00:00
Brian Osman
be0b3b7363 Strip down SkSL::ExternalValues, limit them to functions
Previously ExternalValues were flexible, and could be used as raw values
(with the ability to chain access via dot notation), or they could be
callable. The only non-test use-case has been for functions (in
particles) for a long time. With the push towards SkVM, limiting
ourselves to this interface simplifies things: external functions are
basically custom intrinsics (and with the SkVM backend, they'll just get
access to the builder, and be able to do any math, as well as
loads/stores, etc).

By narrowing the feature set, we can rename everything to reflect that,
and it's overall clearer (the SkSL types now mirror FunctionReference
and FunctionCall directly, particularly in how they're handled by the
CFG and inliner).

Change-Id: Ib5dd34158ff85aae6c297408a92ace5485a08190
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350704
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-01-07 14:28:41 +00:00
skia-autoroll
f39e76846d Roll Chromium from 302da2568953 to ebb8289a1933 (437 revisions)
302da25689..ebb8289a19

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 johnstiles@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: johnstiles@google.com
Change-Id: Ib88a26258657c2233e840e429e78828ab84f940d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/351017
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-01-07 05:02:40 +00:00
skia-autoroll
85dfc104b0 Roll SwiftShader from b9e179f1f239 to 7b2f93895418 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/b9e179f1f239..7b2f93895418

2021-01-07 capn@google.com Fix implicit inexact conversion

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 johnstiles@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: johnstiles@google.com
Change-Id: I06958ff1232456e9ed06d3cde64585f531d632c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/351038
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-01-07 04:53:10 +00:00
skia-autoroll
d64a3193cd Roll Dawn from a84acc4fcca8 to fac169113df7 (3 revisions)
https://dawn.googlesource.com/dawn.git/+log/a84acc4fcca8..fac169113df7

2021-01-07 rharrison@chromium.org Remove HLSL & MSL SPIRV-Cross Fuzzers
2021-01-06 senorblanco@chromium.org Use Jamie's 7-layer burrito of Vulkan DEPS.
2021-01-06 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from e6e704145b31 to 40b4928a73b7 (11 revisions)

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from e6e704145b31 to 40b4928a73b7

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 enga@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: enga@google.com
Change-Id: Idb3f7aff992caf185347d367df5b8437e842a589
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/351037
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-01-07 04:48:01 +00:00
Brian Salomon
756995baea Revert "Revert "Fix GPU improved noise impl and add to perlinnoise GM.""
This reverts commit 9730dc4041.

Bug: skia:10536
Cq-Include-Trybots: luci.skia.skia.primary:Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Valgrind_PreAbandonGpuContext_SK_CPU_LIMIT_SSE41
Change-Id: I6a61ec6e52d7c9e71516b1b5949d698f6576e653
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350958
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2021-01-07 01:45:10 +00:00
John Stiles
9730dc4041 Revert "Fix GPU improved noise impl and add to perlinnoise GM."
This reverts commit bef02dca9d.

Reason for revert: PreAbandonGpuContext failing on tree

Original change's description:
> Fix GPU improved noise impl and add to perlinnoise GM.
>
> GPU was recently busted when switching alpha-color type swizzles from
> aaaa to 000a.
>
> There was no GM that exercised SkPerlinNoiseShader::MakeImprovedNoise.
>
> It draws wrong before and after this change with the CPU backend.
>
> Bug: skia:10536
> Change-Id: I514e304d022fcccae80699a99facafa8ce947e9f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350916
> Auto-Submit: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

Change-Id: Iac635028b402e6008e3a8050bdfa66052d94fd10
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10536
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350956
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-01-06 23:30:22 +00:00
Brian Salomon
bef02dca9d Fix GPU improved noise impl and add to perlinnoise GM.
GPU was recently busted when switching alpha-color type swizzles from
aaaa to 000a.

There was no GM that exercised SkPerlinNoiseShader::MakeImprovedNoise.

It draws wrong before and after this change with the CPU backend.

Bug: skia:10536
Change-Id: I514e304d022fcccae80699a99facafa8ce947e9f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350916
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2021-01-06 22:40:10 +00:00
Brian Osman
f4a77739f3 Use SkVM for (many) interpreter tests
Continue to test everything with the ByteCode interpreter, and run most
tests with the new SkSL-to-SkVM utilities, as well. A few tests rely on
features that aren't yet implemented (function calls, looping), and some
of the bespoke tests (that don't use the test() helpers) use even more
exotic features that need to be implemented or disallowed in the IR
generator. This is getting us closer to not needing ByteCode at all,
though.

Refactored a bunch of the helper code to reduce copy-paste among the
many different 'test' functions.

Change-Id: I138d4a24266f2d862742245c5ee895d86c01018e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350560
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2021-01-06 21:58:40 +00:00
Chris Dalton
a7b7964a23 Don't let stroke-width circles become degenerate
Bug: skia:11134
Change-Id: I0b0a3f530452d5bb5c08da7f247728298c234dd7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350583
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-01-06 21:32:20 +00:00
Chris Dalton
b05571f0b8 Disable tessellation when we don't have indirect draw support
Avoids the polyfill that uses looping instanced draws. This has led to
perf regressions on android.

Bug: skia:11138 skia:11139 chromium:1163441
Change-Id: I129bf96c6d8a3eaadc79bfca496c7d50189f737e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350738
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-01-06 21:30:30 +00:00
Mike Klein
279ca2e10c don't dedup loads or stores
We've been assuming that all Ops with the same arguments produce the
same value and deduplicating them, which results in a simple common
subexpression eliminator.

But we can't soundly dedup two identical loads with a store between;
that store could change the memory those loads read, producing different
values, as demonstrated by the first new unit test.

Then, by similar reasoning, it may first seem fine to deduplicate
stores, e.g.

   store32 arg(0), v1
   store32 arg(0), v1

That second store certainly does look redundant.  But if we slot a
different store between, it's no longer redundant:

   store32 arg(0), v1
   store32 arg(0), v2
   store32 arg(0), v1

If we dedup those two v1 stores, we'll skip the second and be left with
v2 in our buffer instead of v1.  This is the second new unit test.

Now, uniform32 and gather ops also touch memory... are they safe to
dedup?  Surprisingly, yes!  Uniforms are easy: they're read-only.  No
way to store to uniforms, so no intervening store can invalidate them.

Gathers are a little fuzzier, in that the buffer we gather from is
uniform in practice, but not strictly required to be... it's not
impossible to construct a program that gathers from a buffer that the
program also stores to, but you'd have to go out of your way to do it,
and it's not a pattern we use today, and SkVM does not provide the
synchronization primitives you'd need to make attempting that even
vaguely sensible.  So gathers in practice can also be deduplicated.

In general it's safe to dedup an operation unless it touches _varying
memory_, i.e.  loads and stores.  uniform32 and gathers touch
non-varying memory, so they're safe, and while index is varying, it
doesn't touch memory.

Change-Id: Ia275f0ab2708d3f71e783164b419436b90f103a9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350608
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-01-06 21:17:10 +00:00
Mike Klein
0a80427bf7 gathers aren't necessarily varying
I noticed is_always_varying() is a little wrong, and this new test demos
how.  This isn't terribly important: in most practical situations
gathers will indeed be varying.

Change-Id: I456d4c7287147726c49ebb5af5af347c65cd21d4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350602
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2021-01-06 21:13:10 +00:00
John Stiles
cd80689192 Deduplicate vector constants in SPIR-V output.
Many of our shaders generate the same vector constant dozens of times,
e.g. Gaussian blur uses float4(1) repeatedly. This change avoids
re-emitting redundant vector constants.

Change-Id: I22a71cd8b2783fb997f52d485b49031f64ca6d96
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350701
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-01-06 21:05:50 +00:00
Kevin Lubick
95c1a08b24 [canvaskit] Fix typo in docs example
Change-Id: Ie3b9ad724fa0d71ad1f433324cfcb76c769bfebe
No-Try: true
Docs-Preview: https://skia.org/?cl=350837
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350837
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-01-06 21:01:07 +00:00
Brian Osman
d1b47ba7bf Remove glslang from DEPS
This was needed (transitively) by Dawn previously, but no longer

Cq-Include-Trybots: luci.skia.skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn,Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Dawn
Change-Id: I15089298a295be41d7564fe53779e3fafd01229c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350702
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-01-06 20:27:30 +00:00
Ben Wagner
a5784a7b54 Remake SkStrikeCache::commonSetup as constructor.
Also explicitly default all special methods of SkStrikeCache to get
nicer warnings.

Change-Id: I8856a905c6075ca52d4ad900ccd0dacc581cd485
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350637
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2021-01-06 19:46:00 +00:00
Chris Dalton
75887a2321 Move GrTriangulator internal struct definitions to the .h file
This makes them reusable for the edge-AA code when we move it.

Bug: skia:10419
Change-Id: I20042a419617717214535d45fc92a8cae986fb33
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/349356
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-01-06 19:30:32 +00:00
Robert Phillips
edc5b4d706 Expand GrGLGpu::flushViewport
and update GrGLGpu::flushScissorRect's signature to match it.

Change-Id: I9082003934168306833f86d310b942a8d7527384
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350612
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-01-06 19:23:00 +00:00
Mike Reed
b746b1f598 Pass sampling to surface.draw
Bug: skia:7650
Change-Id: I97941a44faa4176f94d57a9c1626ac36b0c0c4ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350557
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-01-06 19:05:00 +00:00