Commit Graph

57286 Commits

Author SHA1 Message Date
John Stiles
106e0cd412 Increase GetLoopUnrollInfo loop-count limit to 100,000.
To do this with a clean conscience, I needed to convert the unroll-
counting logic from a linear time algorithm to constant-time. Getting
all the edge cases correct requires a lot of care, and there are now
plenty of unit tests.

Change-Id: I620909d069ac425b7310e345bf80ec844fe035f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445643
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-09-07 19:28:08 +00:00
Greg Daniel
41a6ace12e Have vulkan copy commands take attachments instead of images.
The motivation for this is that with the new backend info structs the
sample count will be stored on non backend specific classes
(e.g. GrAttachment) and will not be part of the GrVkSurfaceSpec struct.
Thus the info will not be available from just a GrVkImage (or at least
until GrVkImage and GrVkAttachment get merged down the road).

This also removes some uses of GrVkImage::imageInfo() getter since that
struct will also be going away.

Bug: skia:12402 skia:10727
Change-Id: Ie90870e1d834e6ea6ba029d0b480641fb8d2cfa0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/446177
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-09-07 19:02:31 +00:00
Ethan Nicholas
327241208a Switched DSL error handling from const char* to string_view
This allows us to get rid of a lot of .c_str()'s.

Change-Id: I09102f90d69620614dc5a7a2ebc64bd3e9b1c437
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445816
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-09-07 18:48:04 +00:00
Derek Sollenberger
983ae8625b Only treat PNG_COLOR_TYPE_RGB as 565
Bug: 12145
Test: imagedecoder_png_fuzzer
Test: Codec_PngRoundTrip

If a PNG's sBIT specifies that the significant bits are 565, SkPngCodec
treats the image as defaulting to kRGB_565_SkColorType, rather than the
typical kN32_SkColorType. This feature is likely rarely used in the
wild, but it is used by Skia to encode kRGB_565_SkColorType to a PNG and
then recreate the original SkPixmap. These Skia-created PNGs always use
PNG_COLOR_TYPE_RGB, so only respect this sBIT with PNG_COLOR_TYPE_RGB.

Further, if the PNG is PNG_COLOR_TYPE_PALETTE, treating it as 565 means
that we read it incorrectly.

Change-Id: I81dcce771c8492cdcf5677d3c13167a1231acfe4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445963
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2021-09-07 18:45:34 +00:00
Jim Van Verth
2a3ee58daf Metal: Set up discardable MSAA.
* Sets up the resolve path so we don't necessarily store the MSAA result.
* Modifies copies so that in this case we blit copy from the resolve
  attachment rather than trying to do a resolve copy from the MSAA
  attachment.

Bug: skia:12086
Change-Id: Ie9cb71879d714676922e378ab74e32263b8dc50a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445111
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2021-09-07 18:38:49 +00:00
John Stiles
7d64a03c54 Disable UBSAN overflow detection in SkVM.
The fuzzer has discovered that it can trigger integer overflow in SkVM
via loops that perform arithmetic that can be constant-evaluated after
the loop is unrolled. GLSL doesn't define the results of this operation,
and SkVM doesn't need to define it either; we will accept whatever
platform-specific behavior we get if our shader's ints overflow.

Change-Id: Ib424bd3b0e5768b7b174ac8a52e126794962f6cb
Bug: oss-fuzz:37916
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445971
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-09-07 18:09:51 +00:00
Brian Osman
ca5d31e459 Revert "Add OWNERS to include (and include/private) to enforce API review"
This reverts commit be0e255c3e.

Reason for revert: Android autoroller can't create CLs

Original change's description:
> Add OWNERS to include (and include/private) to enforce API review
>
> Change-Id: I3ae83fbdcb4b3b13150df8b6a6461c36cbeaa55e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445641
> Reviewed-by: Ravi Mistry <rmistry@google.com>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

Change-Id: I368fa6293674d65b45f19c60dd6d47eaf33962b9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/446157
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2021-09-07 17:17:09 +00:00
skia-autoroll
5e11063d8c Roll SK Tool from fa3927a79599 to 583b1ee16513
https://skia.googlesource.com/buildbot.git/+log/fa3927a79599..583b1ee16513

2021-09-07 rmistry@google.com [status] Check for repo-specific tree statuses
2021-09-07 jcgregorio@google.com [ansible] Fix rpi.yml.
2021-09-07 jcgregorio@google.com [ansible] Get update-authorized-keys working for all_win.
2021-09-07 rmistry@google.com Workaround to get swiftshader->android roller rolling again
2021-09-07 kjlubick@google.com Revert "This is a test change that should be reverted"
2021-09-07 kjlubick@google.com This is a test change that should be reverted

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

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

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/main/autoroll/README.md

Tbr: jcgregorio@google.com
Change-Id: Ie183c19bb9ce7ac44bb4d4a7e361861451fbcd63
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/446136
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-07 16:26:28 +00:00
Jim Van Verth
7efdc8fd5d Reland "Metal: add loadMSAAFromResolve support."
This is a reland of 9f82158f17

Original change's description:
> Metal: add loadMSAAFromResolve support.
>
> Also fixes some minor warnings.
>
> Bug: skia:12086
> Change-Id: Ia476a7a196b490022978761e92f935a6d668136a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441797
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

Bug: skia:12086
Change-Id: I1d9dd36b3f8f19a0ab4a98ccaab18146566c1885
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/446077
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2021-09-07 16:19:34 +00:00
Brian Osman
be0e255c3e Add OWNERS to include (and include/private) to enforce API review
Change-Id: I3ae83fbdcb4b3b13150df8b6a6461c36cbeaa55e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445641
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-09-07 15:45:28 +00:00
Greg Daniel
6763e7c055 Remove unused vk tiling param from memory allocating/freeing.
Bug: skia:12402
Change-Id: Ifd077add34bb7d299654b29f5e8fbdb746cffed1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445968
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-09-07 15:43:36 +00:00
John Stiles
d5bd2df11d Silence unused-variable warning for layerHeight.
`layerHeight` is only used in an assert, so in release builds, it's not
actually used for anything.

Change-Id: I6fd802dd4a4f29bd01c469b80697366d4f4bb7d6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445966
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2021-09-07 15:28:08 +00:00
Dominik Röttsches
09961b554d [COLRv1] Fix blending and compositing
An additional layer is required to composite correctly. PaintComposite
blends/composites between source and destination. The result is
then drawn on top of previous paint results. Previously, the source
layer was just drawn atop previous paints, then the destination
layer was composited down with composite mode, which was incorrect.

More details in [1].

Add tests for composite modes, compare [2]

[1] https://github.com/googlefonts/nanoemoji/issues/332
[2] https://github.com/googlefonts/color-fonts/pull/73

Cq-Include-Trybots: luci.skia.skia.primary:Test-Android-Clang-GalaxyS6-GPU-MaliT760-arm64-Release-All-Android_NativeFonts,FM-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-MSAN
Bug: skia:12424
Change-Id: I8ff69022ec09758af7021756b0fb26443216fcca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445936
Commit-Queue: Dominik Röttsches <drott@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2021-09-07 15:09:58 +00:00
John Stiles
8e5fca1e36 Disable SkSL LoopFloat test on Mac Intel GPUs.
Change-Id: I291dedc14041647c32fcc95f0b96cdd91cafc3d8
Bug: skia:12426
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445969
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-09-07 15:02:10 +00:00
Brian Osman
0ad2d013b1 SkSL: Turn DSL parser off again
Several fuzzer issues, and one Chromium issue that's blocking the roll.

Bug: chromium:1246795
Bug: skia:12423
Change-Id: I00370b74569b447e543d9a1f22c588eb493063da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445960
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
2021-09-07 14:21:57 +00:00
John Stiles
733fd74c29 Improve unit testing of for-loops.
An ES2-compatible for loop supports six separate rel-ops:
   < <= > >= != ==
Each rel-op, in addition to its expected usage, is also able to
represent a loop which never terminates, as well as a loop which
terminates instantly. Since SkVM unrolls these loops, we should make
sure we do it properly. We now have unit tests for all of these cases.

Change-Id: Icae04d48bc158bf8c0c98db97f76756a1a29110c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445756
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-09-07 14:11:04 +00:00
John Stiles
3ff77f4862 Fix inliner bug discovered by fuzzer.
Intrinsic-call optimization can be triggered during inlining. In this
case, inlining turned `normalize(x)` into `normalize(constant-value)`.

DSL is used to implement optimizations for a handful of intrinsic calls,
including `normalize`, which internally relies on `length`.

The DSL expects that it can use the IRGenerator to handle function
calls. This was not working because we were finished with the initial
compilation pass, and the IRGenerator's symbol table is removed when
finish() was called.

We now temporarily give a symbol table back to the IRGenerator while
the inliner runs. We remove it again as soon as inlining is complete.

Change-Id: I6da98788d93749ffeb008c1f4c3f72b436e8ceeb
Bug: oss-fuzz:37994
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445956
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-09-07 13:29:37 +00:00
John Stiles
826468ff56 Optimize dead-code elimination in SkVM.
By processing the instructions in reverse order, we can avoid the need
for a worklist vector.

Change-Id: Id81673b41ac6f201bac3da87328c9fbdde35846a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445757
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-09-07 13:12:58 +00:00
Nam Se Hyun
cf6ea775a4 fix fontMgr.makeTypefaceFromData type name
fontMgr doesn't export the function named `makeTypefaceFromData`.

it has `**M**akeTypefaceFromData`.

This is an imported pull request from
https://github.com/google/skia/pull/87

GitOrigin-RevId: 7a80a1a7776d0b20810510665f6a3727100bef97
Change-Id: I02eb6a5f406d4448f61266016f9c0882eb59c871
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445804
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-09-07 12:16:30 +00:00
Nam Se Hyun
e1b74b7358 Fix EmbindObject's deleteLater to deleteAfter
I found that CanvasKit's `EmbindObject` type has wrong function name, `deleteAfter`.

I cound't find any information of function `deleteAfter` even in google searching. so i digged it.

![image](https://user-images.githubusercontent.com/3580430/132103177-9c7c32a3-2107-4b97-9698-f52da5833ba1.png)

I have no idea with `deleteAfter`, but `EmbindObject` has the function name `deleteLater`, not `deleteAfter`.

Below is the code of Embind.
dd5733ac80/src/embind/embind.js (L1782)

This is an imported pull request from
https://github.com/google/skia/pull/86

GitOrigin-RevId: 0738dc792404e8a08ba666c0662795b55beb7a5d
Change-Id: I0a7af3d4f313d36e8cdc09d631f9199e948eca29
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445736
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2021-09-07 12:11:14 +00:00
skia-autoroll
10fa1c84b4 Roll Dawn from 2e40f90e8cb9 to ba1feb07bc5f (1 revision)
https://dawn.googlesource.com/dawn.git/+log/2e40f90e8cb9..ba1feb07bc5f

2021-09-06 jiawei.shao@intel.com Always point to own members in FlatComputePipelineDescriptor

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 bajones@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry
To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

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/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: bajones@google.com
Change-Id: I7714338c330f34a47c93c8d1561fc7e2e80b48e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445977
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-07 04:39:01 +00:00
skia-autoroll
48bb9a59e0 Roll SwiftShader from bac3c5559b2b to aed9a7633481 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/bac3c5559b2b..aed9a7633481

2021-09-03 sugoi@google.com Revert "Add external memory parameter to size computations"

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 erikrose@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in SwiftShader: https://bugs.chromium.org/p/swiftshader/issues/entry
To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

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/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: erikrose@google.com
Change-Id: I066e5786a45915a3290227412f6c7acd4d764328
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445858
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-06 05:16:31 +00:00
skia-autoroll
fc5efe32b4 Roll Dawn from 90b41c78f94f to 2e40f90e8cb9 (4 revisions)
https://dawn.googlesource.com/dawn.git/+log/90b41c78f94f..2e40f90e8cb9

2021-09-04 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 3e70f3e2ac35 to ed18f2f8c325 (8 revisions)
2021-09-03 rafael.cintron@microsoft.com Handle failed calls to ID3D12CommandQueue::GetTimestampFrequency
2021-09-03 cwallez@chromium.org Remove deprecated SetBlendColor and blend factors
2021-09-03 cwallez@chromium.org Add dawn_wire/client/RequestTracker.h to build files

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from 3e70f3e2ac35 to ed18f2f8c325

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 sarahmashay@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry
To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

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/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: sarahmashay@google.com
Change-Id: Id67a5c72cc609a85dc95ad9753fcbb4212d080c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445857
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-06 04:46:31 +00:00
skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com
f65cd9be73 Update SKP version
Automatic commit by the RecreateSKPs bot.

Change-Id: I70c85c65ab71f51b6b47103afea7187fd72a807d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445037
Commit-Queue: skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Bot-Commit: skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2021-09-05 08:44:43 +00:00
Ethan Nicholas
360db877be Fix line numbers of several DSLParser errors
Change-Id: I82e0d29fbcb5be93fe20a1fb442e2a429e6cab8e
Bug: skia:12411
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445644
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-09-03 22:12:22 +00:00
Brian Osman
7ad42c0b16 Fix nanobench perf bug with large --ms values
When profiling with a large `--ms` value, the sample count could become
very large. We would still tell the Stats object that we wanted the plot
string (even though we weren't going to print it). Sadly, creation of
that string is O(n^2), thanks to SkString's allocation behavior.

Change-Id: I20ed61a49ab2827f3561673f086e7c5c298eaf86
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445645
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-09-03 21:49:45 +00:00
Michael Ludwig
c3a0c8e5e7 Perform rect+path clip intersection in-place
https://skia-review.googlesource.com/c/skia/+/443897 regressed
the motionmarksuits.skp (180ms to 202ms on my machine). With this change
performance was brought back to 180ms.

Bug: skia:12398, chromium:1245485
Change-Id: Ib7e5776f1f9ab37f8681425e3972680bc547ed99
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445236
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2021-09-03 19:38:19 +00:00
Brian Osman
56273c9248 Update SkSL docs slightly
- Use .eval() in all example fiddles
- Add some more explanation of how the parts of a draw/paint contribute
  to the GPU fragment shader.

Bug: skia:12302
Change-Id: Ib69b9af39368c980e1aa9206af585f26498d083e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445640
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-09-03 19:09:52 +00:00
Ethan Nicholas
0ed278b42d Flip the switch to activate DSLParser
Change-Id: Id894eb70273454716eb33c85dff2056333e90cdd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445281
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2021-09-03 19:07:17 +00:00
Ethan Nicholas
678ec7187a Added DSL modifiers declarations
Change-Id: I97a7c5cfb3ce3f430074092616a3256422c8ad5e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444979
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-09-03 17:02:59 +00:00
Brian Osman
33e0f9aa49 Remove SkSL shade/blend/filter intrinsics
Bug: skia:12302
Change-Id: I4ff394f1f9d93d2def19a9f9d49cb208651aff10
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445639
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-09-03 16:55:38 +00:00
skia-autoroll
3e4ccf17c3 Roll ANGLE from de09f8db317d to 3271dea1673a (3 revisions)
de09f8db31..3271dea167

2021-09-02 cnorthrop@google.com FrameCapture: Check EXT before limiting tex buffer
2021-09-02 cnorthrop@google.com GetTexImage: Fix image initialization
2021-09-02 lexa.knyazev@gmail.com Vulkan: Suppress VUID-vkCmdDraw-blendEnable

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 fmalita@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry
To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

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/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Tbr: fmalita@google.com
Test: Test: Fortnite MEC
Test: Test: FrameCapture on Pixel 4
Change-Id: Ie2d4f12605163fcf2f307d3f1b2f71d4954223e9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445559
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-03 16:25:19 +00:00
Ethan Nicholas
642215e8cd Added DSL extension support
Change-Id: Ia6dd32e91aa242162d4687f5c05832b87e2560ca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444977
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-09-03 16:22:26 +00:00
Mike Reed
1eb1f448d5 Add typeface to shaper md
Change-Id: I5c1122a10be320e877b2adba992edb58e3ca1f9e
No-Try: true
Docs-Preview: https://skia.org/?cl=444981
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444981
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-09-03 16:02:24 +00:00
Brian Osman
cbfa34a58c Convert internal SkSL to use .eval()
Also update RELEASE_NOTES to describe new syntax.

Change-Id: I2666551b98f80b61ae3a48c92a9e306cdc7242b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444735
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-09-03 15:54:54 +00:00
John Stiles
9d82e61c90 Only perform unrolled-size check on valid code.
This analysis pass assumes we have a program with a valid structure--all
loops must be ES2-compliant, and all function-calls must reference real
functions that exist. If we detected an error during compilation, our
program might not meet these criteria.

Change-Id: I4c7aefb3221438643614f1e0cbc2bad40b94b161
Bug: skia:12396
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444982
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-09-03 15:51:11 +00:00
John Stiles
36ddccc214 Remove unnecessary [[maybe_unused]].
We started actually using fContext within this class at
http://review.skia.org/445296.

Change-Id: I1e9e36e6177e6b0eba71a8486e50956d112e276e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445638
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-09-03 15:47:15 +00:00
John Stiles
b6c29c7b22 Initialize class variables at construction time.
Calling `visitProgramElement` on a FunctionDefinition should always set
fFunctionSize on any path through the code. However, this is difficult
to confirm by inspection, since there are several exit conditions. It's
safest to initialize the variables at construction time, just in case.

Change-Id: I8bfda5fc5c4d71f5593ea2469586d668be762449
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445636
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-09-03 14:58:20 +00:00
Florin Malita
e780d6bb45 Revert "Metal: add loadMSAAFromResolve support."
This reverts commit 9f82158f17.

Reason for revert: broke Flutter/iOS

Original change's description:
> Metal: add loadMSAAFromResolve support.
>
> Also fixes some minor warnings.
>
> Bug: skia:12086
> Change-Id: Ia476a7a196b490022978761e92f935a6d668136a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441797
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

TBR=egdaniel@google.com,jvanverth@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com

Change-Id: I82ce91628a0921bcf8dd831ded0bb83937f5cadb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:12086
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445637
Commit-Queue: Florin Malita <fmalita@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Florin Malita <fmalita@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2021-09-03 14:57:11 +00:00
Brian Osman
3099f798e7 SkSL: Add support for method calls on effect objects
Includes .eval() as a new alternative syntax for sample/shade.

Bug: skia:12302
Change-Id: Ia921c141b3eeeba7e5309d921967b941f9cd055e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444756
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-09-03 14:53:33 +00:00
Ethan Nicholas
b61a243294 Refactored swizzle domain testing
This moves the swizzle domain test into the path used by the DSL so that
the error check benefits both sides. To make this possible we need to
be able to distinguish between equivalent swizzle components like x and
r, so they aren't collapsed down to the same component until the very
end.

Change-Id: I48f2582886391eabd7ce6eae949babdeead6051e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445280
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2021-09-03 14:50:57 +00:00
John Stiles
7deee71593 Remove recursion from SkVM dead-code elimination.
Previously, deeply-nested loops could lead to stack overflow during SkVM
dead-code elimination. The DCE algorithm in SkVM now stores its worklist
on the heap and does not rely on recursion. Since we now enforce an
upper bound on maximum program size within SkSL, this worklist's size
should always be reasonable and bounded.

Change-Id: I8b7955298b2540a9f600fc5d94d3bc804c68632c
Bug: skia:12396, oss-fuzz:37827, oss-fuzz:37837
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445597
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-09-03 14:48:22 +00:00
Florin Malita
5572b2a3ed Reland "[skottie] AllCaps support"
This reverts commit 6142500513.

Reason for revert: relanding with fixes

Original change's description:
> Revert "[skottie] AllCaps support"
>
> This reverts commit efc7ca4a71.
>
> Reason for revert: broke Chromium, NoDEPS builds
>
> Original change's description:
> > [skottie] AllCaps support
> >
> > AfterEffects and Bodymovin support an "AllCaps" text flag which forces
> > text capitalization.
> >
> >   * add toUpper() bindings to SkUnicode/SkICU
> >   * add capitalization options to SkottieShaper
> >   * plumb existing Lottie 'ca' (AllCaps) prop
> >   * also fix a couple of unrelated whoopsies
> >
> > Change-Id: I8e80921b66530e9830938004946082c6e450b04b
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445104
> > Reviewed-by: Ben Wagner <bungeman@google.com>
> > Commit-Queue: Florin Malita <fmalita@google.com>
>
> TBR=bungeman@google.com,fmalita@chromium.org,fmalita@google.com,jlavrova@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
>
> Change-Id: I3bb43f37f07cfc021e397df578499a4c4da15ca3
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444980
> Reviewed-by: Florin Malita <fmalita@google.com>
> Commit-Queue: Florin Malita <fmalita@google.com>

Change-Id: Id729e09d4cade0cead193ffc5e6bd4fea1cdcff6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445598
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2021-09-03 14:43:59 +00:00
Florin Malita
6142500513 Revert "[skottie] AllCaps support"
This reverts commit efc7ca4a71.

Reason for revert: broke Chromium, NoDEPS builds

Original change's description:
> [skottie] AllCaps support
>
> AfterEffects and Bodymovin support an "AllCaps" text flag which forces
> text capitalization.
>
>   * add toUpper() bindings to SkUnicode/SkICU
>   * add capitalization options to SkottieShaper
>   * plumb existing Lottie 'ca' (AllCaps) prop
>   * also fix a couple of unrelated whoopsies
>
> Change-Id: I8e80921b66530e9830938004946082c6e450b04b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445104
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Florin Malita <fmalita@google.com>

TBR=bungeman@google.com,fmalita@chromium.org,fmalita@google.com,jlavrova@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com

Change-Id: I3bb43f37f07cfc021e397df578499a4c4da15ca3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444980
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2021-09-03 11:55:10 +00:00
skia-autoroll
9bb2422f4b Roll SwiftShader from c82c59307208 to bac3c5559b2b (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/c82c59307208..bac3c5559b2b

2021-09-02 srisser@google.com Update git-hooks to latest revision

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 fmalita@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in SwiftShader: https://bugs.chromium.org/p/swiftshader/issues/entry
To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

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/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: fmalita@google.com
Change-Id: Icc4c2c3dd20d30430af86aa10f9e11518a915b54
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445498
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-03 05:07:45 +00:00
skia-autoroll
5438f1c1af Roll Dawn from 305f4df2b5ad to 90b41c78f94f (8 revisions)
https://dawn.googlesource.com/dawn.git/+log/305f4df2b5ad..90b41c78f94f

2021-09-02 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 03cd48424797 to 3e70f3e2ac35 (1 revision)
2021-09-02 brandon1.jones@intel.com Add check for an invalid D3D12/Vk object in SetDebugLabel
2021-09-02 brandon1.jones@intel.com Add Labels For Pipelines and ShaderModule for D3D12/Vk
2021-09-02 cwallez@chromium.org vulkan: wait for fences on ErrorInjector device loss
2021-09-02 senorblanco@chromium.org Remove all "WithTint" suffixes from Dawn native.
2021-09-02 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from cf57896d5205 to 03cd48424797 (3 revisions)
2021-09-02 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 44a0adf9b47c to cf57896d5205 (1 revision)
2021-09-02 cwallez@chromium.org Add Dawn's logo and use it in README.md

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from 44a0adf9b47c to 3e70f3e2ac35

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 sarahmashay@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry
To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

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/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: sarahmashay@google.com
Change-Id: Ifc749ce01a423f3b1d0199a36f900c6e54e8669a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445499
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-03 05:06:44 +00:00
Brandon Jones
c3dce03362 Remove deprecated WebGPU blend factors
The previous values are about to be removed from Dawn.

Bug: chromium:1199057
Change-Id: Iec6c4e4d641a99bceae975e68ab4b53ccdc75ef0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445436
Auto-Submit: Brandon Jones <bajones@chromium.org>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-09-03 02:49:46 +00:00
John Stiles
2af4b13925 Reject programs which exceed 50 stack frames during size analysis.
Our program-size analysis pass needs to recurse into called functions;
depending on the exact order of functions in the program, this recursion
can hypothetically be as deep as the deepest function-call chain. Set an
upper bound on recursion here, so we don't overflow the stack while
trying to check the program size. In practice, 50 frames is far deeper
than a regular shader should ever go.

Change-Id: I733ee48dad6f8053facdfd9f6d8a2b9b2a4af188
Bug: skia:12396
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445279
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-09-03 02:41:34 +00:00
Florin Malita
efc7ca4a71 [skottie] AllCaps support
AfterEffects and Bodymovin support an "AllCaps" text flag which forces
text capitalization.

  * add toUpper() bindings to SkUnicode/SkICU
  * add capitalization options to SkottieShaper
  * plumb existing Lottie 'ca' (AllCaps) prop
  * also fix a couple of unrelated whoopsies

Change-Id: I8e80921b66530e9830938004946082c6e450b04b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445104
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2021-09-03 00:01:53 +00:00
skia-autoroll
88018b6e41 Roll skcms from c1e907c8f007 to cf7d3f925b87 (1 revision)
https://skia.googlesource.com/skcms.git/+log/c1e907c8f007..cf7d3f925b87

2021-09-02 lovisolo@google.com Add BAZEL.md file with build and test instructions on all supported platforms.

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

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

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/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Canary-Chromium
Tbr: fmalita@google.com,brianosman@google.com
Change-Id: Ic8c1fa91cdc6227f4aa27ee7a86bccd67ff1fc4d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445223
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-02 22:51:45 +00:00