Commit Graph

52980 Commits

Author SHA1 Message Date
Ben Wagner
2c73fc43a3 Roll freetype
40c5681ab9..60ba8fe9e7

FreeType has moved from git.sv.nongnu.org to gitlab.freedesktop.org.
Since the chromium.googlesource.com mirror has already been changed to
reflect this new url, use it as the new upstream.

Change-Id: Iac78b913d5a98f0fd8d082092f81ebdfda737972
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357281
Commit-Queue: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-01-22 20:09:59 +00:00
Mike Klein
d272110d71 update alloc_tmp() to allocate blocks of N regs
We now search for a block of N adjacent registers that minimizes the
number of spills, where unspillable registers are counted as if
infinitely expensive.

On arm64, store64 now uses alloc_tmp(2) and st2.4s, and similarly
store128 uses alloc_tmp(4) and st4.4s.

For the purposes of arm64 instructions we could allow the block to wrap
around the register file mod 32, but I figured that probably wasn't
necessary and might be confusing to follow.  If we're right on the edge
some day we could circle back.

I'm not sure yet if our register-pair use cases on x86-64 will ever care
that the registers are adjacent, but it doesn't hurt to start that way.

This should behave pretty much the same when N=1 except that we're not
doing any interesting tie-breaking when all registers are occupied.  I
left a TODO, but I bet we'll never feel the need to follow up on it.

Change-Id: Ibbdd42858a6daf61401c638435617bfb37d1899c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357300
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2021-01-22 19:54:08 +00:00
John Stiles
bfc9be0f77 Migrate SkSL test inputs to the resources/ directory.
This will allow us to load these inputs for unit testing in `dm`.

Change-Id: Id256ba7c30d3ec94b98048e47af44cf9efe580d5
Bug: skia:11009
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357282
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-01-22 18:57:29 +00:00
John Stiles
da57fc0854 Update skslc compiler script to allow for output path flexibility.
Previously, the script was hardcoded to use the input file's path, plus
"/golden/". In a followup CL, we are going to move the input files into
the resources/ directory but keep the output files in tests/, so we
needed additional flexibility here.

Change-Id: I8d5a78f6a8efd9a0e7f2a6d1ad8ad72a46cf70ce
Bug: skia:11009
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357280
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-01-22 18:14:03 +00:00
Kevin Lubick
6a272434c2 [docker] Fix build by pointing to correct path
Change-Id: I66ed32fc354a95e50ecaf68708f67592bda25b76
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357296
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2021-01-22 17:34:56 +00:00
John Stiles
7938717797 Update folding tests to return pass/fail status.
A passing test returns solid green. Failing tests are written to
return solid red, but drawing any other color than green can be
interpreted as a test failure.

Additionally, tests which cannot compile as RuntimeEffects (due to
non-ES2-compatible features) have been split into an ES2-compatible part
and an ES3 part.

Change-Id: I3f53121d9de0ae4c4e7f1de3177d067811980b55
Bug: skia:11009
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356999
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-01-22 16:44:22 +00:00
John Stiles
8d3642e200 Add checkpointing functionality to the Parser.
This allows us to roll the Parser back to an earlier state if we need
to do so. This includes:
- rewinding the lexer
- restoring the previous Pushback node
- backing out AST nodes
- backing out errors

This functionality is used to back out of parsing a vardecl if we
discover mid-stream that it is actually an expression statement that
coincidentally starts with the name of a type.

Change-Id: Ia5feb45019693931c1e6870e3ff7a5398924c863
Bug: skia:11198
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356997
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-01-22 16:42:33 +00:00
John Stiles
cc6961b9ac Add checkpointing functionality to SkSL Lexer.
The lexer can be reset to an earlier state simply by overwriting its
offset to a previous position.

Change-Id: I571c7981dbec3c43a894fe599f2e2a167bc380df
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356976
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-01-22 15:47:19 +00:00
Greg Daniel
2cfdd7f6a4 Remove preferring cached memory for vulkan cpu write, gpu read memory.
Bug: skia:11207
Change-Id: Ieb024cb387d3ad946763115cb3ea5c1d12ca85b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357276
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-01-22 15:24:12 +00:00
Ethan Nicholas
5b9b0db5b8 SkSL vars now track their declaration instead of their initial value
This should not cause any functional changes, and is just a prerequisite
for upcoming DSL work.

Change-Id: Iea165d3b7ede39ccc9cf5f5d78f623bc883b391e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356816
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2021-01-22 15:16:32 +00:00
Brian Osman
ce75036b3e SkSL: Remove ByteCode interpreter, generator, etc.
Change-Id: Ib150e6d6d3de34a85ce8051eea843ab3b2d7ab75
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356921
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2021-01-22 14:38:41 +00:00
Brian Salomon
bacbb92d8d Revert "Revert "Reland "asyncRescaleAndRead supports unpremul results on GPU"""
This reverts commit 7f296c421e.

Bug: skia:11019
Change-Id: Ia6aa029abc0cf6a3ccd5467e67e5faa2c0239955
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/353616
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-01-22 14:21:01 +00:00
John Stiles
7d5b90aead Factor out modifier-token parsing into helper function.
Change-Id: I45a53e70c7be9d1e5d060ed78e2cc9603a2a4637
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356918
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-01-22 14:09:49 +00:00
Mike Reed
e02d7f844b More hiding of legacy drawImage calls
Also cleanup some of the duplicate code in SkRecords

Bug: skia:7650
Change-Id: I4d3167a892c126c19a54002beab25c9a6c96fa5d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357000
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-01-22 13:53:42 +00:00
John Stiles
3727917611 Squelch Metal warnings about unused _globals/_out.
Change-Id: I84e546184d1ce8261602346d2c91c580b30e9b6d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357001
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
2021-01-22 13:48:49 +00:00
skia-autoroll
450f8565c7 Roll Chromium from dac687f4cbf2 to 465f56090c50 (418 revisions)
dac687f4cb..465f56090c

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: I9b7c286d01b4ca178c987b38fcf6e4878d884f2d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357003
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-01-22 06:05:00 +00:00
skia-autoroll
a27bf726cc Roll ANGLE from f0286e636456 to ff5f715e5c4a (11 revisions)
f0286e6364..ff5f715e5c

2021-01-22 stevenan@google.com Properly fail upon program binary version mismatch
2021-01-22 timvp@google.com Capture/Replay: Capture all indexed buffer bindings during MEC
2021-01-21 cnorthrop@google.com Tests: Add Subway Surfers trace
2021-01-21 timvp@google.com Vulkan: Flush if sync object is pending during SyncVk::getStatus()
2021-01-21 timvp@google.com Capture/Replay: Erase texture from mCachedTextureLevelData
2021-01-21 penghuang@chromium.org Do not make context current during context deletion.
2021-01-21 syoussefi@chromium.org Vulkan: Remove swiftshader workaround for missing gl_Position
2021-01-21 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 3180f85f9bcd to f646afdb8929 (2 revisions)
2021-01-21 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 132575638f37 to 67fb6a8435bb (480 revisions)
2021-01-21 syoussefi@chromium.org Translator: Avoid vector copies with multi-replacement
2021-01-21 timvp@google.com Vulkan: Move Flush during SyncHelper::clientWait() earlier

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
Tbr: scroggo@google.com
Test: Test: CopyOutputScalingPixelTest.ScaledCopyOfDrawnFrame/48Test: Test: FenceSyncTest.BasicOperationsTest: Test: angle_perftests --gtest_filter="*subway_surfers*"
Change-Id: I3fecd794cc100839fbe3853b49e86feb3b449383
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357007
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-01-22 05:37:59 +00:00
skia-autoroll
540b049adc Roll Dawn from 762814bd9229 to db383498c5c6 (15 revisions)
https://dawn.googlesource.com/dawn.git/+log/762814bd9229..db383498c5c6

2021-01-22 jiawei.shao@intel.com Allow using DepthOnly aspect on the depth-only formats in T2T copies
2021-01-22 enga@chromium.org dawn_wire: Add an API to reclaim reserved devices and textures
2021-01-21 enga@chromium.org dawn_wire: Fix a bug with multiple injected devices
2021-01-21 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from afb8cfb2544b to 6761160dc149 (7 revisions)
2021-01-21 enga@chromium.org Add cron-linux-clang-rel-x64 for running cron jobs on CI
2021-01-21 rharrison@chromium.org Adding stage input/output reflection to inspector path
2021-01-21 dsinclair@chromium.org Update vertex index decoration names.
2021-01-21 cwallez@chromium.org Vulkan: Enable barrier validation using VK_EXT_validation_features.
2021-01-21 bclayton@google.com TextureFormatUtils: Remove unused functions
2021-01-21 bclayton@google.com Convert StorageTextureValidationTests to WGSL
2021-01-21 cwallez@chromium.org Vulkan: Add support for layer extensions.
2021-01-21 cwallez@chromium.org Vulkan: Fix layout of Sampled+ROStorage texture.
2021-01-21 cwallez@chromium.org Vulkan: Use ityp::bitset for Instance/DeviceExtSet
2021-01-21 cwallez@chromium.org Use SubresourceStorage to track per-subresource state.
2021-01-21 cwallez@chromium.org EnumMaskIterator: ASSERT when the mask is too big.

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from afb8cfb2544b to 6761160dc149

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 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: sarahmashay@google.com
Change-Id: Idbe9c5cb336fc891384dc31705b4fde8dc33d086
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357006
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-01-22 05:31:29 +00:00
skia-autoroll
da1892aae3 Roll SwiftShader from b3e5c440d239 to 22f14a877953 (5 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/b3e5c440d239..22f14a877953

2021-01-21 capn@google.com Implement non-void indirect Reactor Call() support
2021-01-21 amaiorano@google.com Make RoutineT::getEntry() type safe
2021-01-21 swiftshader.regress@gmail.com Regres: Update test lists @ b3e5c440
2021-01-21 capn@google.com Target macOS 10.12 when building LLVM
2021-01-21 capn@google.com Use aligned allocation for classes with aligned members

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: I3d5772c7b195b1fa53bc4c1649626e29332642ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357004
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-01-22 05:11:19 +00:00
Chris Dalton
e465205938 Remove the offthread triangulation from GrPathTessellateOp
Rather than copying these triangles twice, we can run "pathToPolys"
during onPrePrepare and "polysToTriangles" during onPrepare.

Also adds a benchmark for normal and inner-fan triangulation.

Bug: skia:10419
Change-Id: Id301afde5de11d93ae026e75e42ac03a50867687
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/355177
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-01-22 03:59:29 +00:00
Jorge Betancourt
c09761f576 [SkottieView] handle calls to setSource after first animation initialization
Change-Id: I8fdb9142e1dd67f9418f8a5fc13518a2c2c11566
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/355662
Reviewed-by: Tyler Freeman <fuego@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2021-01-21 23:41:28 +00:00
Brian Osman
e89d8ea20b Update particle system to use skvm, rather than ByteCode
This was the last remaining user of ByteCode. The skvm solution
is faster, and lets us delete the ByteCode system.

Testing on 15 instances of sinusoidal_emitter (90k particles):
  - ByteCode                     ~9   ms
  - ByteCode (older, optimized): ~5.5 ms
  - skvm                         ~2.1 ms

Change-Id: Ia2e5c9ab2d36c97e59af28a6f989bf212889e439
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356919
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2021-01-21 23:07:29 +00:00
John Stiles
f7410bd413 Remove unnecessary _out pointer in Metal.
Like _globals, it's not actually necessary to indirect through a
separate pointer at all. The output struct is now passed by reference
and the additional pointer variable is removed.

(Additionally, renamed _skGlobals back to _globals.)

Change-Id: Id089a20cb751cdaedc48462a52da78ee43783611
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/355632
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-01-21 22:30:39 +00:00
Chris Dalton
37d16f1352 Remove GrTriangulator::fIsLinear
I think it makes sense for the class functions to not have internal side
effects. Meaning, you can call pathToPolys and polysToTriangles all you
want without worrying about internal state.

Bug: skia:10419
Change-Id: I5e2136719bbf65a6a8e4c032c1c1326f0a9a98c3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356496
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2021-01-21 21:55:19 +00:00
Chris Dalton
d5384791a9 GrTriangulator cleanups
Replace "pathToTriangles" with "pathToPolys, polysToTriangles". This
will allow the tessellator to do pathToPolys in onPrePrepare and
polysToTriangles in onPrepare.

Don't make countPoints and polysToTriangles virtual. This is a step
toward moving the outer mesh of GrAATriangulator back out of the
class, which seems to match the style better.

Bug: skia:10419
Change-Id: Id6d22dcc2da0af84b9cb46fb36ead4c2e30d5c32
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/355176
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-01-21 21:54:11 +00:00
Robert Phillips
94e67916e6 Add new lazytiling GM and update GrTextureEffect
This GM tests out the GrTextureEffect with non-normalizable textures.

Change-Id: I5b0ffc43241a29d64516d07a4388668f224ffefe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/355676
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-01-21 20:57:20 +00:00
Nathaniel Nifong
110367dcfc Fix most remaining wasm gm unit tests by correctly providing gl context
The basic problem was that WasmContextInfo shadowed non-virtual members
of ContextInfo. the tests, which work with that type, end up calling the
super class's methods which return null for directContext()

The context created and stored in WasmContextInfo would have worked if it
could be returned, but I've opted to go with what looks like a more
canonical way to test a new backend, that is to create a platform-
specific subclass of GLTestContext, and let GrContextFactory create the
GL context.

Bug:skia:10869

Change-Id: Ie9e1142cf2e7268242ff9aab70f76151714850a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/355116
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-01-21 20:46:19 +00:00
Tyler Denniston
8a37fb2c60 [svg] Implement SourceAlpha input for filter effects
https://www.w3.org/TR/SVG11/filters.html#SourceAlpha

This is the last "trivial" filter input type.

Bug: skia:10841
Change-Id: I96a7c9ccd318dec3b2b3ddd656be714b6b8fc59e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356838
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2021-01-21 19:34:39 +00:00
Kevin Lubick
cff854282d [canvaskit] Include types in docker build
Change-Id: I8ed83eb2bc71d9de7d0a4ac2092b06d9271551a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356917
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2021-01-21 19:27:29 +00:00
Tyler Denniston
c7e482441e [svg] Several filter helper tweaks
- Allow resolving inputs without modifying their colorspace
- Add helper to get the colorspace of a particular input
- Make resolveColorspace() virtual and add filter context to its
  signature

Bug: skia:10841
Change-Id: I2e226ec26205f527c2d171140072f106ec35fbe0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356416
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2021-01-21 19:23:39 +00:00
John Stiles
b5db4825b8 Improve consistency of SPIR-V code generation.
The SPIR-V code generator would sometimes invoke helper functions in an
unsequenced way, causing the output to vary across different compilers
or optimization settings. This CL explicitly sequences these operations,
which should make the output consistent across platforms.

Change-Id: Iaaf75b80e7495768d73dd6afa5b6d03f9cf3f262
Bug: skia:11175
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356844
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-21 19:01:49 +00:00
Mike Reed
bc4d88a07e Update legacy shader context to take sampling
Just more internal cleanup/reorg, including passing around the (few)
fields we use from paint, rather than an entire paint, in the legacy
shader context. This was motivated (partly) to ensure that we don't
accidentally refer to getFilterQuality() downstream.

Bug: skia:7650
Change-Id: I69031dcb74e02c77bc4d6166fdb377262ae77046
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356842
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-01-21 18:58:59 +00:00
Kevin Lubick
6de1e52d0b [canvaskit] Properly downsample 4x4 matrices.
Also address feedback from Tuesday.

Change-Id: I4497e4112c758a071c834045d20a009397184254
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356837
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2021-01-21 18:14:04 +00:00
Brian Salomon
982127b7d5 Make render task targets be just a proxy.
Change-Id: I09548cc22b13bc0b9b5f77cf1f20c1505a529c51
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356760
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2021-01-21 17:16:06 +00:00
Mike Klein
25788c3179 three small fixes for w-parameter
I wrote this looking for places where we treat w differently from z.
None of these are an urgent problem today, but 2) could become one, and
all good to fix if only for consistency.

1) Recycle w's register when it dies in the interpreter.
   If we don't recycle w's register slot when w dies, we'll keep
   thinking w's alive and keep that slot around in case it's used.
   This is only an inefficiency, but nice to avoid when we can.

2) Don't allow spilling w when looking for an unused register.
   This is a JIT bug fix, avoiding the possibility of clobbering w with
   dst(),x,y,z or a temporary when we need to use it.  Doesn't look like
   it's happening today, but could sneak in.

3) Allow aliasing w and dst().
   This is for completeness, moot today... store128 is the only op using
   w and doesn't use dst(), let alone try to alias them.

Change-Id: I1f22e67f8793be018282bc3e793412e1d1abd7a5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356797
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2021-01-21 17:02:29 +00:00
Mike Klein
1ed173438d baby's first use of st2/4
This isn't really how I intended to use these, but we might as well
check if the registers happen to already be lined up how we'd like them.
And it happens quite often... I didn't gather detailed numbers, but both
sides of the "are we lined up?" conditions are being hit lots and lots
of times, in both store64 and store128.

Also rewrote the scalar flow of store128 to mirror store64.  The old
code was just fine, but this makes it easier to follow the conditions of
when we can use st4.  (This does remind me that we could also use
single-lane st2/st4/ld2/ld4 instructions to handle the scalar paths.)

Change-Id: Id2c94f68e5ea14031f7a23bdc76583dff4a7b65f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356436
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2021-01-21 16:52:09 +00:00
Mike Klein
230cd50238 close out simple assembler TODO
This should be the same amount of work in Assembler::bytes()
with one fewer field to track... might as well!

Change-Id: I54ca919983f11d218255817dbc4db292e7972409
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356796
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2021-01-21 16:49:29 +00:00
John Stiles
e0d023562b Remove obsolete reference to Flex lexer.
We use our own custom lexer now.

Change-Id: I6a2a408094ba37c2eef7092f5a5caa107938613b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356476
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-01-21 13:45:35 +00:00
skia-autoroll
87a055b020 Roll ANGLE from 382f016dd3b6 to f0286e636456 (15 revisions)
382f016dd3..f0286e6364

2021-01-21 syoussefi@chromium.org Translator: Stop allocating TIntermSequence
2021-01-21 sunnyps@chromium.org Support specifying array slice for D3D11 texture EGLImage
2021-01-20 syoussefi@chromium.org Rename ShaderVariable::structName to structOrBlockName
2021-01-20 geofflang@google.com EGL: Respect eglMakeCurrent with a null context.
2021-01-20 penghuang@chromium.org Support switch surfaces for external context.
2021-01-20 jmadill@chromium.org Capture/Replay tests: Use failure exit code.
2021-01-20 syoussefi@chromium.org Vulkan: Emulate R32F images with R32UI
2021-01-20 jmadill@chromium.org Capture/Replay: Don't serialize compile resources string.
2021-01-20 mpichlinski@opera.com Make metal_shader_cache_file_hooking a data_deps
2021-01-20 syoussefi@chromium.org Vulkan: Simplify RewriteCubeMapSamplersAs2DArray
2021-01-20 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from dd50a3bce3ca to 3180f85f9bcd (11 revisions)
2021-01-20 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 8da0f82baf35 to 22be66d40712 (2 revisions)
2021-01-20 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from f3626a1bfa8f to 132575638f37 (396 revisions)
2021-01-20 syoussefi@chromium.org Vulkan: Redo RewriteAtomicCounters
2021-01-20 syoussefi@chromium.org Suppress incomplete texture tests on mac/arm

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
Tbr: scroggo@google.com
Test: Test: D3DTextureTest.TextureArrayImage*
Change-Id: I6fd3e711e587cdf89d43a2b695b57cd1a3770a64
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356598
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-01-21 05:30:56 +00:00
skia-autoroll
0775ed1a70 Roll Chromium from 78d95924cc6a to dac687f4cbf2 (517 revisions)
78d95924cc..dac687f4cb

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: I13e60502fd9789a02d62ba86a597ef9653163fe3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356599
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-01-21 05:30:55 +00:00
skia-autoroll
3c142940b9 Roll Dawn from 311a17a8feae to 762814bd9229 (7 revisions)
https://dawn.googlesource.com/dawn.git/+log/311a17a8feae..762814bd9229

2021-01-20 cwallez@chromium.org ityp_array: Allow using a T whose underlying type is signed.
2021-01-20 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from ed14524b1e81 to afb8cfb2544b (1 revision)
2021-01-20 cwallez@chromium.org Vulkan: Fix texture barriers for readonly storage.
2021-01-20 cwallez@chromium.org Vulkan: Fix buffer barriers for readonly storage.
2021-01-20 cwallez@chromium.org Vulkan: use VK_EXT_debug_utils instead of deprecated extensions.
2021-01-20 senorblanco@chromium.org Implement a glCopyImageSubData() workaround for OpenGL ES 3.1
2021-01-20 jiawei.shao@intel.com Implement WaitableEvent and WorkerTaskPool for multi-threaded tasks

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from ed14524b1e81 to afb8cfb2544b

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 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: sarahmashay@google.com
Change-Id: I1b0a9babb9a83cedf53868b78e77c20e85b40ee0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356597
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-01-21 05:03:55 +00:00
skia-autoroll
bf18fa2ec7 Roll SwiftShader from 89fd1480b47e to b3e5c440d239 (5 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/89fd1480b47e..b3e5c440d239

2021-01-21 nicolascapens@google.com Enable and require C++17 compilation
2021-01-20 srisser@google.com Implement VK_KHR_depth_stencil_resolve
2021-01-20 amaiorano@google.com Move reusable Vulkan code from VulkanBenchmarks to new VulkanWrapper library
2021-01-20 amaiorano@google.com VulkanBenchmarks: factor out code into separate files
2021-01-20 capn@google.com Fix always performing early depth test when requested

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: Ia0d0924d1765633285b7b1e279b04306073f9dae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356596
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-01-21 05:01:25 +00:00
Mike Reed
821a84558b remove dead code from old drawimage virtuals
Bug: skia:7650
Change-Id: Ie6bce2130519655645b7c5602d364cd0e1d6fdf3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356358
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-01-21 01:26:15 +00:00
Adlai Holler
08f5311ae1 Detemplatize render task clustering
This simplifies our world and opens the door for more optimization.

Bug: skia:10877
Change-Id: I3c721f12a23bfa73dbdf1e02d9c77d7c6a889aa0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356309
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-01-21 00:00:16 +00:00
Brian Osman
14d336eeb7 Remove "death" functions from particle system
Without the "spawn another effect" binding (that was recently removed),
these serve no purpose.

Change-Id: Ica8cc3f444c6b749c634c41453501edfff9d9a23
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356417
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-01-20 23:27:03 +00:00
Chris Dalton
5501b59f16 Reland "Disable the MSAA atlas mode for CCPR"
This is a reland of 97c476ecb7

Original change's description:
> Disable the MSAA atlas mode for CCPR
>
> We have a long term path rendering plan that uses dynamic MSAA instead.
> This CL is a test to see if we can drop support for CCPR now.
>
> Change-Id: I1bff3ca3143a6b453b65a7932a1805c195922805
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/354036
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

Change-Id: Ied3390d7df0b01d5e9d565247f5aed0addb5ab8f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356336
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-01-20 23:16:23 +00:00
Brian Salomon
6d717d401a GrQuadUtils: Handle degenerate persp quads where edges intersect outside quad
We were replacing points with the intersection of opposite edges.
Because of the distance tolerance we're using that may fall outside
of the original quad. Detect those cases and use averages of
intersection points instead.

Bug: chromium:1167277
Change-Id: I36b172f19339839bb21c060ddfe8109c184e9327
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356311
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-01-20 23:01:23 +00:00
Mike Reed
c8f44ca25c Enable new virtuals in flutter
Bug: skia:7650
Change-Id: I6a58e525e8ecf26d70290f6ad03689fe9e6e7db5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356359
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-01-20 22:40:43 +00:00
Mike Klein
dd069a9188 add interleaved load and store instructions
store64 and store128 will use the st?.4s instructions,
and load64/load128 the ld?.4s.  The tricky bit for both
of course is that they load and store more than a single
register, and that those registers need to be adjacent.

Change-Id: I613d06cbcc6e00bfc16b1a2c88412dbbbb1c55ed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356344
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2021-01-20 20:49:03 +00:00
John Stiles
8a9da73687 Fix overzealous optimization of short-circuits.
The previous implementation assumed that SkSL expressions do not have
side effects and so treated either side of a Boolean expression as
short-circuitable. That is, `foo() && false` and `false && foo()` would
both be optimized to `false`, eliminating the `foo()` call.

We now check for side effects first. An expression like `expr && false`
can only be optimized to `false` if `expr` has no side effects. (If
`expr` does have side effects, the expression is left as-is.)

Change-Id: I473cf026a8afe35d6a8d9518498f2b26d8996e60
Bug: skia:11162
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356357
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>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-01-20 20:24:27 +00:00