Commit Graph

50682 Commits

Author SHA1 Message Date
John Stiles
c75abb8432 Assign unique names to inlined variable declarations.
Change-Id: I6097f50e7be1fa2f7772f6c454410ecbf3470eea
Bug: skia:10722
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316977
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-09-15 13:22:52 +00:00
John Stiles
8f026259d8 Demonstrate name reuse error in inliner.
The following conditions lead to the error:
- A pair of nested functions, both of which must be inlined.
- Both inlined functions create a variable with the same name.
- The outer function passes its variable to the inner function.
- The initialization of the inner variable uses the value from the outer
  variable.
- The inner function does not mutate the variable, use it as an out-
  parameter, or otherwise cause it to receive a temporary copy.

When all these conditions are met, both variable declarations are
inlined as-is without performing any name salting, because it's
seemingly safe to do so. The name overlap issue is not considered in the
safety checks. Inlined variable declarations are not subject to name
salting but they should be; I suspect other adversarial examples could
be crafted as well where unhandled name overlap leads to errors.

Change-Id: Ia754bee8e45c8a5c7548436594bbf04abc7a8396
Bug: skia:10722
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316945
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-09-15 13:03:22 +00:00
skia-autoroll
aecd484d03 Roll Chromium from 2ab7a04e4589 to 2c970cbe2fff (351 revisions)
2ab7a04e45..2c970cbe2f

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 scroggo@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: scroggo@google.com
Change-Id: I8ac4598a7ddff27f047d39cd2df35a877aa8ff49
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317038
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-09-15 04:57:31 +00:00
skia-autoroll
19ed57bfb4 Roll SwiftShader from dc552fcef1fe to 0f14b7ab7a55 (4 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/dc552fcef1fe..0f14b7ab7a55

2020-09-14 amaiorano@google.com CMake: normalize FOLDER property for third_party targets
2020-09-14 bclayton@google.com SpirvShaderDebugger: Add PRINT_EACH_DEFINED_DBG_INSTRUCTION
2020-09-14 bclayton@google.com SpirvShaderDebugger: Implement DebugValue
2020-09-14 bclayton@google.com SpirvShaderDebugger: Reduce lock contention

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 scroggo@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: scroggo@google.com
Change-Id: Iefa184af3d10b903845bdbc8191071882af4c75d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317036
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-09-15 04:38:31 +00:00
Mike Klein
2bc4077c9e notes on bazel
I have been hacking around on Bazel more today,
and while I think it was a day well spent, I've
got intentionally nothing to commit except notes.

Change-Id: I711eaf403e447aff5b19830d3ed8c5132c98c469
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316910
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-09-14 23:27:37 +00:00
John Stiles
b0245494c6 Convert several SkSL->GLSL unit tests to golden outputs.
The new test files are intended to be identical to the unit tests in
every meaningful way. (Comments and formatting are not preserved
exactly.) In cases where a unit-test method contained more than one
test, multiple test files were created; in these cases, new names were
invented to match the apparent intent of each invocation.

Followup CLs will continue to migrate additional tests.

Change-Id: I785c6761ba7ee2b25b5ddc0108321734be23b77c
Bug: skia:10694
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316678
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-09-14 22:11:20 +00:00
John Stiles
ea9e7ca1ce Support testing error cases in our SkSL unit test goldens.
Change-Id: I56e19153597e2c4393c5821314b82937828c0d50
Bug: skia:10694
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316569
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-09-14 21:23:07 +00:00
John Stiles
eaed918a1d Disable whole-program inliner.
This can be re-enabled once the Metal bug with fp_sample_chaining is
diagnosed and fixed.

A pure rollback led to a merge conflict; just commenting out the line
that invokes the inliner serves the same purpose.

Change-Id: I4df556ea8cd44349cbca2ea0ec9995dfffeb8aec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316937
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-09-14 20:58:47 +00:00
Greg Daniel
37fd658981 Add input attachment support to program building.
This is also the final wire to connect, so with this CL we will try
using input attachments for dst blends in available.

Bug: skia:10409
Change-Id: I8bd953ea5eb056a55d8bf36d91008a9d7298d84d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315650
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-09-14 19:59:47 +00:00
Greg Daniel
6253b5787d Remove command buffer reset bit from vk command pool.
We always reset the entire command pool so we don't need to create the
pool with support for resetting individual command buffers. This may
or may not give us perf and/or memory wins.

Change-Id: I172362b49444a80f4e91958120d165c130598a98
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316656
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-09-14 19:18:27 +00:00
Brian Osman
01a3eb44af SkSL: When simplifcation requires a rescan, do it right away
Fixes a use-after-free where switch statements were replaced by the
statically-determined case, but there were other (later) blocks in the
list that still had pointers into the no-longer-valid cases.

Bug: oss-fuzz:25554
Change-Id: I23b80d66d49a251b59ce02d74f31996858c04395
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316876
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-09-14 18:42:57 +00:00
Brian Osman
0acb5b50b3 Allow casting to lower precision types in runtime effects
Bug: skia:10679
Change-Id: If464c48b7c31d0d8440d1231d1983829d54ce598
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315281
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-09-14 18:08:17 +00:00
Kevin Lubick
b45d0caa55 [fuzz] Make libfuzzer defines backwards compatible for roll
This should fix the chrome roll.

Change-Id: I2de68f972996bf6124cf5cc27dfd538aa1161057
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316877
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2020-09-14 17:43:00 +00:00
skia-autoroll
96a505f840 Roll skcms from b1f9041ffe31 to 069b8f699b59 (1 revision)
https://skia.googlesource.com/skcms.git/+log/b1f9041ffe31..069b8f699b59

2020-09-11 mtklein@google.com mostly pointless rename

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 scroggo@google.com,mtklein@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: luci.chromium.try:linux-blink-rel
Tbr: scroggo@google.com,mtklein@google.com
Change-Id: Iac25b72067f7c5454e1d8ef58ca36c18cbdb85d3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316901
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-09-14 17:25:17 +00:00
Greg Daniel
569afe11a5 Force linux nvida vulkan to use dedicated image allocations.
This change is in response to the perf regessions we saw when we started
using less dedicated allocations.

Bug: chromium:1127358
Change-Id: Ie0cbf546b92d344712e32b5fc8e56837f49fed67
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316836
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-09-14 17:06:37 +00:00
Adlai Holler
302e8fb771 Downgrade SkImage to GrImageContext
We still occasionally downcast, so this is not airtight,
but it (1) allows us to know where we are downcasting and
(2) lets us move away from GrContext (and hopefully remove
it sooner than later.)

All three canaries are currently broken =( so here we go!

Bug: skia:104662
Change-Id: I84efe132574690b62ea512e194e4f9e318e9c050
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316218
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-09-14 17:01:07 +00:00
Ethan Nicholas
34b19c5750 SkSL optimization now happens in convertProgram rather than being a
separate step.

This ended up uncovering an optimization bug. SkSLNonConstantCase
started failing; it turns out that the optimizer was never being run on
this test, and so we hadn't noticed that it didn't actually work in the
presence of optimization.

Change-Id: Iff1d330be7534113b86f86b00c39f91282903ae3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316568
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-09-14 16:34:47 +00:00
Adlai Holler
d8dfd7a224 Elevate caps methods to GrRecordingContext
This partially unblocks Chrome from migrating from
SkCanvas-getGrContext to SkCanvas-recordingContext.

Change-Id: I1100387497ba8b482005bb1d147e9768590afe95
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316449
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>
2020-09-14 15:58:57 +00:00
Greg Daniel
2177436cf8 Update GrVkRenderPasses to be created to support both input attachments and adv blend.
Bug: skia:10409
Change-Id: I90c83e03616b76adb887c087f7f22941bd776d8c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316356
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-09-14 15:43:13 +00:00
Mike Klein
c1cc1d85ab bazel baby steps
A few first steps toward a Bazel build.

To try it out, I think just

    $ bazel test ...

I added third_party to .bazelignore to prevent Bazel from looking there.
It can handle external dependencies itself, so no need to poke into what
we sync from DEPS.  Some of those have Bazel configs and we don't want
to be building them yet.

I've started by with libpng using new_git_repository(), mostly because
it's small, with a mildly complex build, and needs dependencies of its
own, zlib.  Mysteriously zlib is built-in to Bazel, so that was easy.

Next up is probably a dependency that does support Bazel, using
git_repository().  That should make sure we can handle the full mix.

Change-Id: I5775a1b254d341b9a90630aa1cc433a24167f2fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316636
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2020-09-14 15:18:32 +00:00
John Stiles
d836f84ab8 Generate SkSL golden output files from test inputs during the build.
Golden SkSL outputs are intended to eventually replace the majority of
our unit tests, since they can automatically update themselves when we
change implementation details of the compiler.

If you change the compiler output without updating the Golden files, the
CheckGeneratedFiles housekeeper will be triggered. Set
`skia_compile_processors` or `skia_compile_sksl_tests` to true in your
GN args to regenerate them.

Almost all of the tests from SkSLFPTests.cpp and SkSLGLSLTests.cpp can
be migrated into separate unit-test .fp/.sksl files in a followup CL.

hcm@ has signed off on removing the copyright boilerplate preamble from
our unit test files.

Change-Id: I9e24a944bbac8f8efd62c92481b022a0b1ecdd0b
Bug: skia:10694
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316336
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-09-14 14:54:12 +00:00
John Stiles
915a38c688 Enable the inlining pass during optimization.
In this CL, the IR generator still performs inlining as well; this will
be removed in a followup CL. However, the optimization pass is able to
find more inlining opportunities because it allows itself to exceed
the 50-IRNode limit when a function is only used once. In our test code
this is uncommon, but in SkSL generated from trees of fragment
processors, it is very common; any FP that is only sampled once tends
to qualify.

Change-Id: I8b2f653b2dd05d4de18bb15f3a4c1f034b8252ad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315639
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-09-14 14:38:42 +00:00
Kevin Lubick
493f89e577 [fuzz] Standardize, document, and backport fuzzing defines.
We had several defines around the code base that were not
very descriptive. Additionally, we had a patch of extra
runtime restrictions living in oss-fuzz that were applied
when fuzzing over there for some fuzzers.

This has all be consolidated and controlled via the defines
documented in site/dev/testing/fuzz.md

As such, we can remove one of the patches that is in oss-fuzz,
taking us closer to being able to fuzz in the CI/CQ.

PS 1 renames existing fuzz defines to the new schema.
PS 2-3 backports skia.diff from oss-fuzz and changes those
definitions to have the _GREATLY modifier.
PS 5+ further condenses the defines so that there is one
define for gating the runtime checks.

Change-Id: Ia4ad96f30c1e9620a2123b510e97c6f501a2e257
Docs-Preview: https://skia.org/?cl=316443
Bug: skia:10713
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316443
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-09-14 13:36:10 +00:00
skia-autoroll
081bc32703 Roll Chromium from d14e6a0b90c2 to 2ab7a04e4589 (486 revisions)
d14e6a0b90..2ab7a04e45

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 scroggo@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: scroggo@google.com
Change-Id: Ic935dd69eecc89933cbb039a12aa259e0577430d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316747
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-09-14 04:55:40 +00:00
skia-autoroll
3b0d5d454a Roll ANGLE from 0c8f66c7169c to 183a454b9d54 (14 revisions)
0c8f66c716..183a454b9d

2020-09-12 jmadill@chromium.org Test Runner: Use standard isolate script args.
2020-09-12 m.maiya@samsung.com EGL: Refcount external AHB when backing an image
2020-09-12 jmadill@chromium.org TestRunner: Fix missing "=" on swarming args.
2020-09-11 m.maiya@samsung.com EGL: Fix a bug in ImageTest
2020-09-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from a48ed7c29144 to b045bf7d3b6a (9 revisions)
2020-09-11 jmadill@chromium.org Add a perf test that cycles through many VBOs.
2020-09-11 syoussefi@chromium.org Vulkan: Fix RAW hazard with storage images
2020-09-11 geofflang@google.com Flush less frequently in QueryGL.
2020-09-11 courtneygo@google.com Vulkan: Use current commandBuffer pointer
2020-09-11 courtneygo@google.com Enable precision qualifiers.
2020-09-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from fcb7ecbe49c5 to 3114c91b037b (3 revisions)
2020-09-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from b24900a1aa39 to 41974f57973e (1 revision)
2020-09-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Tools from ccab4cc42372 to d19622688af4 (1 revision)
2020-09-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 30a5da059e5d to fe51fcb522cc (441 revisions)

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 scroggo@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-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
Bug: chromium:1078754
Tbr: scroggo@google.com
Change-Id: I7da61b51d5cd50aaf13a2f39591881809365540e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316746
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-09-14 04:47:00 +00:00
skia-autoroll
7a588f80c2 Roll SwiftShader from 41974f57973e to dc552fcef1fe (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/41974f57973e..dc552fcef1fe

2020-09-11 capn@google.com Drop the float literal suffix

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 scroggo@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: scroggo@google.com
Change-Id: Ib95602b0aa9f3daccbadcba8924444c604398d7f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316745
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-09-14 04:44:00 +00:00
skia-autoroll
81a7629b20 Roll dawn from 948b3a05550b to dbd34449af20 (2 revisions)
https://dawn.googlesource.com/dawn.git/+log/948b3a05550b..dbd34449af20

2020-09-11 cwallez@chromium.org Roll third_party/spirv-cross/ bad9dab8d..bdbef7b1f (3 commits)
2020-09-11 cwallez@chromium.org Fix typo in README.md

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: I5988f29eededf441df37c43b92155d805ad8e348
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316744
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-09-14 04:31:40 +00:00
skia-recreate-skps
b711737c13 Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=rmistry@google.com
NO_MERGE_BUILDS

Change-Id: I81ef1bca2a4bb8a7ac5040677f3a0e22c37fb299
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316740
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-09-13 08:44:45 +00:00
Mike Reed
186866c461 expose clear way to create default mips
Change-Id: Id533b71d56fc44d8f86db24c5c4e9131d57479a5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316716
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-09-12 15:19:15 +00:00
Chris Dalton
582c5a9a84 Fix assert on tessellated stroke join type
Change-Id: Ife539625656dd379a6ab5797bcfe5511dfda1e3d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316477
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-09-11 21:37:44 +00:00
Brian Osman
9eb848ae82 Give SwitchCase it's own Statement::Kind value
Disambiguates Switch from SwitchCase, and makes is() and as() work.

Change-Id: I9b9b71dabd730247b20ec9b6df02b87e4978d534
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316577
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2020-09-11 20:46:44 +00:00
Ben Wagner
e4383b8f1e Add SkFILEStream constructor which takes a size.
Allows the user to limit the stream to a subset of the entire file.
SkFILEStream uses the current FILE position as the base position for the
stream; this allows the user to further limit the length of the stream
to a range of bytes in the file.

Change-Id: I36131ff19e75b65d501eabdfd9368f8fbb2e177f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316357
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-09-11 19:50:24 +00:00
Ben Wagner
bb60c2149e Refactor SkFILEStream for clarity.
Rename fSize to fEnd (since it is actually the offset of the end
underlying file, not the size of the file), fOriginalOffset to
fStart, and fOffset to fCurrent. Also initialize in the order fEnd,
fStart, then fCurrent to maintain the invariant that fCurrent should
always be kept within the range of fStart and fEnd, inclusive.

Change-Id: I8801288320cf82b071e4621c0e770ce16016953a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316453
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-09-11 19:49:04 +00:00
John Stiles
d2be5c51e3 Fix warning in Flutter.
SkASSERT(!"message") triggers -Wstring-conversion in Flutter:

implicit conversion turns string literal into bool: 'const char [42]'
to 'bool' [-Werror,-Wstring-conversion]

Change-Id: I1fbc835fc8e5414fafb1dc82a6a9a02c17c4f12a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316576
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
2020-09-11 19:40:34 +00:00
Brian Osman
83ba930225 Support dangling type references in the IR generator's inliner
Bug: oss-fuzz:25584
Change-Id: I3d6007e373f2b3b684065cad276695fb78c0bd8f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316537
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-09-11 19:11:44 +00:00
Brian Salomon
de3d44109a Always make atlas texture index varying a float
This improves perf on ANGLE D3D11 ES3. Will make conditional
if any other config regresses.

Also makes the varyings passed to append_index_uv_varyings be
purely output params.


Change-Id: I332940d9d55be854d3bba72286ca89840ab43d50
Bug: skia:10644
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316226
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-09-11 19:06:34 +00:00
Julia Lavrova
b6b7fffc35 Reland "Removing ICU dependencies from skparagraph BUILD.gn file"
This reverts commit 05ce2817f2.

Reason for revert: Fixing the build

Original change's description:
> Revert "Removing ICU dependencies from skparagraph BUILD.gn file"
>
> This reverts commit f1711adb1a.
>
> Reason for revert: Build break
>
> Original change's description:
> > Removing ICU dependencies from skparagraph BUILD.gn file
> >
> > (and from the sources, too)
> >
> > Change-Id: I9d8ff51c91aad4b770b1f183c04734d31252b851
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313148
> > Commit-Queue: Julia Lavrova <jlavrova@google.com>
> > Reviewed-by: Ben Wagner <bungeman@google.com>
>
> TBR=bungeman@google.com,jlavrova@google.com
>
> Change-Id: I1fce2436855e3e2a4cb7d1d7204b3ae49fd530e8
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314540
> Reviewed-by: Julia Lavrova <jlavrova@google.com>
> Commit-Queue: Julia Lavrova <jlavrova@google.com>

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

Change-Id: I13d78d75698df47930adc2514d1328abc556a209
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316444
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2020-09-11 18:31:24 +00:00
James Zern
dd12d9d498 DEPS: update libwebp to v1.1.0-28-g55a080e5
picks up a couple ubsan fixes

24 commits:
https://chromium.googlesource.com/webm/libwebp/+log/0fa56f3..55a080

Bug: skia:10693
Change-Id: I2ffa72d1e60b2034bd01eb11ede39bf70726fbe7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316379
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2020-09-11 17:34:24 +00:00
Ethan Nicholas
30d3022f72 Moved SkSL type into IRNode, now accessed via a method
This change doesn't accomplish anything by itself, but is a necessary
prerequisite for followup changes to node handling. Eventually all data
is going to be stored within IRNode itself, and the subclasses will not
add any fields; this is just the first step in that process.

Change-Id: If2bea4c62bd8f680e9d9f39248bb9679332b245b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315867
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
2020-09-11 17:08:04 +00:00
John Stiles
9344262e2f Reland "Add InlineCandidateAnalyzer to locate candidate functions for inlining."
This is a reland of ff9dc8240e

ASAN errors were resolved at http://review.skia.org/316451

Original change's description:
> Add InlineCandidateAnalyzer to locate candidate functions for inlining.
>
> The analyzer will be enabled in followup CLs. At present, if the
> commented-out code is enabled, it will properly identify candidate
> functions that should be inlined.
>
> Change-Id: Icb6e7c2394a3828df81f75b855c69a25bf297842
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315217
> Commit-Queue: John Stiles <johnstiles@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

Change-Id: I851bde66c5e490c237b88606f23fb3c5077a2393
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316452
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@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-11 16:48:14 +00:00
John Stiles
759880ab05 Pass non-temporary Program::Settings to convertProgram.
This will fix ASAN errors such as these:
https://logs.chromium.org/logs/skia/4e924a3651708511/+/steps/symbolized_dm/0/stdout

Change-Id: I49756df6e077cc8813f51f70082c88d861fa337f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316451
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2020-09-11 16:37:34 +00:00
Greg Daniel
98df291b2a Reduce the amount of forced dedicated allocations we do in Vulkan.
This removes the always use dedicated allocations for newer Mali's
and removes the "small image" check in GrVkMemory. The later is not
needed since the allocators we use have their own heuristics for using
dedicated memory which includes querying the driver itself to see if
it is recommended or not. We can also add a limit back here if we find
it necessary.

Bug: chromium:1127358
Change-Id: Ia7fa6281abb058293805c9c1c3dba9b79e7e12fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314320
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-09-11 16:25:34 +00:00
Jamie Madill
f1003a7758 Port to ANGLE's GN files
Bug: skia:7647
Change-Id: Ic4709817804610783de8ff3d9eaa32f57fb72729
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313316
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-09-11 15:22:34 +00:00
John Stiles
ab5010493d Revert "Add InlineCandidateAnalyzer to locate candidate functions for inlining."
This reverts commit ff9dc8240e.

Reason for revert: tree on fire

Original change's description:
> Add InlineCandidateAnalyzer to locate candidate functions for inlining.
> 
> The analyzer will be enabled in followup CLs. At present, if the
> commented-out code is enabled, it will properly identify candidate
> functions that should be inlined.
> 
> Change-Id: Icb6e7c2394a3828df81f75b855c69a25bf297842
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315217
> Commit-Queue: John Stiles <johnstiles@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com

Change-Id: I1f07b406c4d56f2fdb6d3c5360f15397fc26d783
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316448
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-09-11 15:02:16 +00:00
John Stiles
a003e8184e Fix inline code generation when literals appear in the argument list.
We don't expect raw literals to ever appear here; this is a defensive
maneuver. See http://review.skia.org/316440 for an example case where
raw literals accidentally made it all the way to the inlining pass, due
to a missing `coerce`.

Change-Id: I80198f2f135791931aa53e0d6d92f1edfe4fb3b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315970
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-09-11 14:57:14 +00:00
Florin Malita
66b45a7f40 [skottie] Add support for invert/YIQ
The Invert layer effect [1] also supports YIQ selectors [2]:

  -- YIQ
  -- Luminance (Y)
  -- In Phase Chrominance (I)
  -- Quadrature Chrominance (Q)

[1] https://helpx.adobe.com/after-effects/using/channel-effects.html#invert_effect
[2] https://en.wikipedia.org/wiki/YIQ

Change-Id: I54b1c81a786ff6f2bdea6456b45b435b2c0fea07
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316446
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-09-11 14:55:44 +00:00
Greg Daniel
d358cbebd4 Add support for plumbing GrDstSampleType through Ops and Pipeline creation.
This CL adds a new type GrDstSampleType to say how we will sample the dst.

We add tracking of the GrDstSampleType in the recording of GrOps and
then during execution passing the information along to the GrPipeline.

In general the tracking of GrDstSampleType is a global state of a GrOpsTask
so it is kept separate fro the DstProxyView which is more specific to a
single Op on the GrOpsTask.

Bug: skia:10409
Change-Id: Ie843c31f2e48a887daf96cee99ed159b196cb545
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315645
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-09-11 14:42:34 +00:00
Florin Malita
4748c17557 [skottie] Initial Displacement Map effect
Plumb layer size information and add machinery for retrieving layer
content as an SkPicture.

Implement the effect in SkSL.

Current limitations:

  * displacement source layer must be above (on top in stacking order)
    of the target layer
  * if animated, the displacement layer timeline (in/out points) must
    fully cover the target layer timeline
  * Hue/Sat/Lightness selectors are not supported at the moment

These will be addressed in follow-up CLs.

Note: Bodymovin does not export hidden layers by default; if the
displacement source layer is hidden, one should select the "Hidden"
export option.

Change-Id: I11a5c760a9df1e75835a51371f60d5b798e7e38a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314798
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-09-11 14:15:44 +00:00
Ethan Nicholas
1d88152de6 Fixed an SkSL optimizer error around constant propagation
Constant propagation wasn't performing type coercions, so we'd end up
propagating a constant into its final location and using the constant's
type rather than the destination type. This allowed things like
$floatLiteral to sneak into final output.

Change-Id: I5b63c70370095e291dea6374e139329b695fa0b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316440
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
2020-09-11 14:02:44 +00:00
Jorge Betancourt
b862131f49 organize deps so that modules/audioplayer is listed as a dep for samples
Change-Id: I0592c66f12fe7db5d88fac0ba4ba8cb0c87911ff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316256
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2020-09-11 13:59:14 +00:00