Commit Graph

47679 Commits

Author SHA1 Message Date
Greg Daniel
e52c9784f0 Add GrD3DCommandList class.
This doesn't do much except creates the new class.

Change-Id: I157abaddd173bf1b6ab5eba2539e90c4d530a273
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278469
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-03-23 18:58:27 +00:00
Brian Osman
0b22f3bc53 Remove workaround for ANGLE + NVPR + Persistent Shader Cache
ANGLE no longer supports NVPR, so this isn't necessary.

Change-Id: I68e720f17238c960e6f6ca07fe108f5fefed7705
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278467
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-03-23 18:48:53 +00:00
Robert Phillips
709e2408fe Revert "Make TessellationTestOp and GrPipelineDynamicStateTestOp surface their programInfos at record time"
This reverts commit bc0fe058f8.

Reason for revert: red

Original change's description:
> Make TessellationTestOp and GrPipelineDynamicStateTestOp surface their programInfos at record time
> 
> These aren't high priority but it would be nice to have all the ops go through the same system.
> 
> Bug: skia:9455
> Change-Id: Idbd8b0829faf12703c82f5a016f5b0e7c3efb762
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277757
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: I579ad16f144d17afaec9ee1b9000eaaa5c04228c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9455
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278508
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-03-23 18:29:33 +00:00
Mike Reed
165b68ebb6 Add onProgram to ModeColorFilter
Change-Id: Id82cfc632f378054f5ecded2c5a77d2824982288
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278420
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-03-23 18:21:33 +00:00
Mike Reed
cb1a2df616 skvm for picture-shader
After this, it appears that the only remaining shaders w/o skvm are:
- perlinnoise
- lighting
- runtime (sksl)

EmptyShader doesn't, but it is supposed to return failure.

Change-Id: Iab2393e1846b92089de837614ba1fb5543a76432
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278419
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-03-23 18:02:53 +00:00
Robert Phillips
bc0fe058f8 Make TessellationTestOp and GrPipelineDynamicStateTestOp surface their programInfos at record time
These aren't high priority but it would be nice to have all the ops go through the same system.

Bug: skia:9455
Change-Id: Idbd8b0829faf12703c82f5a016f5b0e7c3efb762
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277757
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-03-23 17:39:23 +00:00
Mike Klein
913a6f5508 impl A8/G8 skvm image shaders
Update the shader convention to pass unpremul paint color instead of
premul, still in dst color space.  This is what A8 image shaders need,
and it's cheaper to premul if we end up needing that than to unpremul.

Change-Id: I25d0ef60433670513e2cd24a385d74a506e8af58
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278496
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-03-23 17:22:33 +00:00
Mike Klein
a434e0feb0 pass paint color and full dst info to shaders
- SkImageShader and SkRuntimeEffect will need the paint color
  - SkPictureShader will want the dst color type

Most of the interesting changes are in SkVMBlitter.cpp.

Incidentally factors Builder::uniformPremul() out of SkColorShader.
I thought I'd use it in SkVMBlitter, but ended up not using it.

For now I pass the real SkAlphaType to shaders, not a masked version.
Probably harmless, maybe useful... let's find out.

No diffs.

Change-Id: I49c2639f6a8d2d6a45eaceed9d8c33dbc0d9a538
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278484
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-03-23 17:21:43 +00:00
Julia Lavrova
99ede42ffe Some bengali text does not have cluster index in ascending order
Bug: skia:10050
Change-Id: Ia8933d43e9c08687e52398528460b98eb5d59935
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277464
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2020-03-23 16:23:43 +00:00
skia-recreate-skps
15fc10269d Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=rmistry@google.com
NO_MERGE_BUILDS

Change-Id: Id266b0c1776d0e305020770588992b3f371f0f53
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278491
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-03-23 16:08:33 +00:00
skia-autoroll
4098719375 Roll third_party/externals/angle2 cb7e7387e61f..31e36a631345 (2 commits)
cb7e7387e6..31e36a6313

git log cb7e7387e61f..31e36a631345 --date=short --first-parent --format='%ad %ae %s'
2020-03-23 lexa.knyazev@gmail.com Reland "Refactor BitCount"
2020-03-23 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader 1c9f24263e6c..22d73d15e778 (1 commits)

Created with:
  gclient setdep -r third_party/externals/angle2@31e36a631345

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 robertphillips@google.com,brianosman@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/+/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian9-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: None
Tbr: robertphillips@google.com,brianosman@google.com
Change-Id: Ic34429611278eb739560390ff19d207b9ad40ab5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278486
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-23 15:36:04 +00:00
Robert Phillips
cad8fba253 Make GrFillRRectOp a GrMeshDrawOp
I don't know why this wasn't always a meshDrawOp. Bringing it into the fold reduces some of the boiler plate code and centralizes things.

Bug: skia:9455
Change-Id: Icd71907c3dc2ecefe4a2040293f94884678bbf45
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278179
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-03-23 15:01:43 +00:00
Brian Salomon
8d1dcd7d98 Specialize scale+translate transforms for explicitly sampled FPs.
This is to support using YUV->RGB in more places where we would incur a
full 3x3 matrix multiply for each plane in the fragment shader without
this.

Change-Id: I27c2a403429c36662eba91f61b08e5331ec678b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278356
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-23 15:00:33 +00:00
Mike Klein
973236fcd4 remove dither TODO
This TODO is done: since we moved dither up into the shader color
pipeline, this implementation now does make sense for unpremul dsts.

Wanted to get this out of the way before threading through an
SkColorInfo so I'm not tempted to break it once I have the dst
SkAlphaType available.  :)

Change-Id: I0bce99649bed9e0051ccd6a69775716e38a458f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278480
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-03-23 14:35:53 +00:00
Mike Klein
4d1a90b26e smarter SkColorInfo::isOpaque()
We already look at the alpha type.
We can look at the color type too.

This doesn't likely matter very often, as we usually have
kOpaque_SkAlphaType for opaque SkColorTypes, but might as
well toss this in there for completeness.

Change-Id: Ie164acc9294dee115d8e0637e3186a301ebe58f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278479
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-03-23 14:28:33 +00:00
Eric Boren
0f9d5bdd7f [infra] Fix lottie-ci bots to use the correct asset name
Broken in https://skia-review.googlesource.com/c/skia/+/276641

Change-Id: I0ba616c5b117a2deed3b7d47b2b1b659d6914e1b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278458
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2020-03-23 14:21:23 +00:00
Kevin Lubick
6f60a859c6 Fix matrix scoping issue in sample
Change-Id: Id0023a12a21957ec9236d4ffaa03134995388d60
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278456
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-03-23 13:44:53 +00:00
Eric Boren
59e7496d4e [infra] Move logic about skps/images/etc into gen_tasks
Change-Id: I72a1d6bd489994052c942b5c8f2e36806459360c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276641
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
2020-03-23 13:42:43 +00:00
skia-autoroll
f04f21a5c9 Roll third_party/externals/swiftshader 1c9f24263e6c..22d73d15e778 (1 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/1c9f24263e6c..22d73d15e778

git log 1c9f24263e6c..22d73d15e778 --date=short --first-parent --format='%ad %ae %s'
2020-03-20 amaiorano@google.com Subzero: fix CoroutineBegin generation

Created with:
  gclient setdep -r third_party/externals/swiftshader@22d73d15e778

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

Cq-Include-Trybots: skia/skia.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: robertphillips@google.com
Change-Id: I27e7ea288ee2d60d261803a7a82f59eda42cfd90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278436
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-23 04:33:03 +00:00
skia-autoroll
c23bd5e4e3 Roll ../src e0f773c501f9..be0a271f02d3 (446 commits)
e0f773c501..be0a271f02


Created with:
  gclient setdep -r ../src@be0a271f02

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 robertphillips@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/+/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
Bug: None
Tbr: robertphillips@google.com
Change-Id: I6a389b090e75edfd5635fa55a455f730529035e8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278437
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-23 04:31:23 +00:00
skia-autoroll
538e358b0d Roll third_party/externals/angle2 dadeffa315e7..cb7e7387e61f (28 commits)
dadeffa315..cb7e7387e6

git log dadeffa315e7..cb7e7387e61f --date=short --first-parent --format='%ad %ae %s'
2020-03-21 ynovikov@chromium.org Remove 32-bit Subzero GLES31 SwANGLE suppressions
2020-03-20 ynovikov@chromium.org Skip flaky SwANGLE end2end tests.
2020-03-20 geofflang@chromium.org Skip ExternalWrapTest on Ozone.
2020-03-20 m.maiya@samsung.com Vulkan: Implement EXT_shader_non_constant_global_initializers
2020-03-20 geofflang@chromium.org Implement gl[Get]MemoryObjectParameterivEXT
2020-03-20 geofflang@chromium.org Update conditions for exposing ASTC extensions.
2020-03-20 geofflang@chromium.org Remove GL_CHROMIUM_path_rendering
2020-03-20 geofflang@google.com Android.bp: Ignore unknown warning flags.
2020-03-20 sugoi@google.com ASTC: LDR support doesn't imply HDR support
2020-03-20 thakis@chromium.org Suppress two -Wunreachable-code warnings on Fuchsia in Angle.
2020-03-20 jmadill@chromium.org Vulkan: Fix Framebuffer cache depth/stencil issue.
2020-03-20 jmadill@chromium.org Add optimized rendering feedback loop tracking.
2020-03-20 cnorthrop@google.com Perf: Limit TracePerfTest to single compressed TRex
2020-03-20 m.maiya@samsung.com Add support for EXT_EGL_image_external_wrap_modes
2020-03-20 jmadill@chromium.org Remove util.gni.
2020-03-20 jmadill@chromium.org Revert "Refactor BitCount"
2020-03-20 xiaoxuan.liu@arm.com Skip updating viewport and scissor info if the same
2020-03-20 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src 18d3896a15fc..60104cd97446 (2 commits)
2020-03-20 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader bc98fbeec99b..1c9f24263e6c (2 commits)
2020-03-20 ynovikov@chromium.org Skip SwANGLE GLES31 tests which crash with 32-bit Subzero only on Windows
2020-03-20 ynovikov@chromium.org Skip flaky TransformFeedbackTest.MultiContext on Win Intel Vulkan
2020-03-19 jmadill@chromium.org Track if a Texture is bound as a sampler.
2020-03-19 lexa.knyazev@gmail.com Refactor BitCount
2020-03-19 m.maiya@samsung.com Vulkan: Use device local memory for conversion buffers that can be converted with the GPU
2020-03-19 jmadill@chromium.org Vulkan: Remove public FramebufferVk::getFramebuffer.
2020-03-19 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src 25ede1ced679..18d3896a15fc (2 commits)
2020-03-19 jian.li@arm.com Skip some tests on Mali because of a known issue
2020-03-19 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader 440fc9959f06..bc98fbeec99b (3 commits)

Created with:
  gclient setdep -r third_party/externals/angle2@cb7e7387e61f

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 egdaniel@google.com,brianosman@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/+/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian9-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: None
Tbr: egdaniel@google.com,brianosman@google.com
Change-Id: Ief63774430fcd8ee16825af5fc2ed642bb0de78e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278409
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-22 00:12:41 +00:00
Mike Reed
862818b291 add --skvm and '!' to viewer to toggle using skvm blitters
Change-Id: I71b81e89a871d9bd96534f1fb8b88fe25045685c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278417
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-03-21 19:31:11 +00:00
Mike Reed
bd1db41bd8 Add gm to test HSL modes, esp. with src-alpha
Note: the results (esp. Saturation) don't exactly match the reference
images in the W3 spec. However, if I tell viewer to be in P3 colorspace,
then the gm looks (nearly) identical to florin's codepen (when viewed
on a P3 iMac).

Change-Id: Iecf21b3078f079eb30af59d697b97b64091c585c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278416
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2020-03-21 18:10:11 +00:00
Brian Osman
7e9d6f43c1 In GrDrawVerticesOp, don't allow CPU xform with perspective matrices
This causes the other attributes (colors and local coords) to be
interpolated incorrectly.

Bug: skia:10069
Change-Id: I90e926bed564f9c39375ba1ce0c27073f97a0875
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278320
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-03-21 18:09:21 +00:00
Mike Reed
cf3594b603 Finish implementing blendmodes for skvm
Lifted directly from SkRasterPipeline_opts.h, transcribing into skvm.

Change-Id: I777b5d86f11e571b8d7faff38a6e5b0e3c9cc6a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278376
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-03-21 17:22:01 +00:00
Brian Osman
e41fa2d5e4 Add vertices_perspective GM to demonstrate skbug/10069
Bug: skia:10069
Change-Id: I08814be483a630b0583347793e96ac628fe77bc8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278316
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-03-20 20:30:30 +00:00
Mike Reed
e965438b8e implement more blendmodes for skvm
Change-Id: Ib7286235249f9b4027c1c59c9fae268a9dffefcd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278096
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-03-20 19:59:30 +00:00
Ben Wagner
9339266839 Infer NodeType in attachDiscardableAdapter.
This makes the call sites a bit simpler, doesn't materially change
anything in an optimized build, allows NRVO, and generally fixes a
number of warnings in gcc 9 about pessimizing-move.

Change-Id: I0ea5f57db163425da728630bfa6c1add7c416bd7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278178
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-03-20 19:50:12 +00:00
Chris Dalton
664cb9ebe5 Call incNumDraws() after all draw calls in mtl
Change-Id: I4f97a86a168daa623185931c289f3dc40fdc3d91
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278264
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-03-20 19:41:39 +00:00
Chris Dalton
2c3e169183 Release deferred buffers in GrOpsRenderPass::end()
Moves the sk_sp's for deferred buffers out of the individual
subclasses and into GrOpsRenderPass. Makes sure to release these refs
during end(). This ensures the buffers can actually become purgeable
after the render pass completes.

Bug: skia:10048
Change-Id: I06838e45b85297b17277f625b313b6e07eda124f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278256
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-03-20 19:41:29 +00:00
Brian Osman
71903bd48d Remove unused (and misleading) 'instruction' from SkSLInterpreter.h
Instructions are always 8 bits (but may be used to index the array of
void* labels with threaded code).

Change-Id: Ia0ab1e654eb2949deecd67e3dc3959a53d74c4d9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278177
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-03-20 18:06:03 +00:00
Jim Van Verth
77eb96d0c2 Reland "Reland "Clear out atlases if they haven't been used in a while.""
This is a reland of 0bd00f438e

Original change's description:
> Reland "Clear out atlases if they haven't been used in a while."
> 
> This is a reland of 79007c9309
> 
> Original change's description:
> > Clear out atlases if they haven't been used in a while.
> > 
> > This will stage out atlas pages one at a time with an interval of
> > 256 flushes between them. Also removes the last page to help
> > conserve memory if text or other atlas-using systems are not in use.
> > 
> > Bug: 1058905
> > Change-Id: I8717621033068d0e24da944356d91b0f35e5373b
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276764
> > Commit-Queue: Jim Van Verth <jvanverth@google.com>
> > Reviewed-by: Herb Derby <herb@google.com>
> 
> Bug: 1058905
> Change-Id: I25b0037cb1608ae0bda641e0d0588afaf3dd47e5
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276960
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

Bug: 1058905
Change-Id: I6e6cf7b30ced25c6a5af6ad57311b2a305d7c73a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277611
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-03-20 17:58:53 +00:00
Brian Salomon
2fade72a4e Set correct coord transform visibility initially rather than update.
Aside from being simpler it also makes the matrix uniforms for
explicitly sampled FPs appear only in the FS and not both VS and FS.

Change-Id: I0f7a4e83b77decacfd0567600dd2d3bc8ce5240f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278137
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-03-20 17:44:45 +00:00
Ben Wagner
7b7b78cb9f Make SkPDFUnion a better variant.
SkPDFUnion is basically a tagged union but does some odd things around
unique_ptr and SkString. Clean up the implementation around these. This
also fixes a number of warnings given by gcc 9.

Change-Id: Iaf58b30c03f172e96a28826ddaa616bf9f655f71
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277613
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-03-20 17:30:14 +00:00
skia-autoroll
bcf5172abf Roll third_party/externals/swiftshader bc98fbeec99b..1c9f24263e6c (2 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/bc98fbeec99b..1c9f24263e6c

git log bc98fbeec99b..1c9f24263e6c --date=short --first-parent --format='%ad %ae %s'
2020-03-19 sugoi@google.com Fix float to r11g11b10 conversion
2020-03-19 amaiorano@google.com marl: manually apply partial patch to fix x86 crashes

Created with:
  gclient setdep -r third_party/externals/swiftshader@1c9f24263e6c

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

Cq-Include-Trybots: skia/skia.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: egdaniel@google.com
Change-Id: I59074f5678ab74ba73e18af9d27c0e52fc4a24b9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278117
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-20 17:30:13 +00:00
skia-autoroll
6860efc563 Roll ../src 05edc0038612..e0f773c501f9 (329 commits)
05edc00386..e0f773c501


Created with:
  gclient setdep -r ../src@e0f773c501

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 egdaniel@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/+/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
Bug: None
Tbr: egdaniel@google.com
Change-Id: I858329f69f83a54c47f916a1edd61ccb21439563
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278118
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-20 17:25:09 +00:00
Chinmay Garde
7cbcd79a4a Guard use of [id<MTLDevice> maxThreadsPerThreadgroup] behind version check.
This API was introduced in iOS 8.0.

Change-Id: Ia4c7d00696a99dd03289d2beef7a75511dc436d9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278116
Commit-Queue: Chinmay Garde <chinmaygarde@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Chinmay Garde <chinmaygarde@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-03-20 17:25:08 +00:00
Jim Van Verth
05d091935a Flesh out backend textures and rendertargets to support Direct3D.
Add GrD3DTextureInfo and GrD3DBackendSurfaceInfo, and uses those
to initialize GrBackendTexture and GrBackendRendertarget.

Bug: skia:9935
Change-Id: I4571c1b3aa8115250ff748deb8cf4a95f80f1237
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278036
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-03-20 17:12:46 +00:00
Brian Salomon
f4ba4ec796 Revert "Revert "Revert "Revert "Don't build GL on Metal, Vulkan, Dawn, Direct3D bots""""
Updated to use sentinel GL context even when GL backend is not built.

This reverts commit 1171d314ef.

Change-Id: Ia94bbe4865ddd4e898446c13886877c539f0eb0b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277976
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-20 17:11:58 +00:00
Brian Osman
85755f46a8 Delete copy constructor and assignment operator on VariableReference
Accidentally copying these by value will cause the read and write count
tracking on variables to break. (We could increment the appropriate
counts in these functions, but they're not needed, so just make them
impossible to call instead).

Change-Id: Iba45330108460acbd53529416977064331f2a9e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278016
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-03-20 14:25:25 +00:00
Sean Gilhuly
f227449715 Update Scissor code in Skia Dawn
Move scissor handling code to onSetScissorRect(). If the pipeline does
not support scissor test, set the scissor to be the pipeline bounds.

Bug: chromium:1062664
Change-Id: I2092a15b643e6f5a1e6f5609f9c45f43a42eea33
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277996
Commit-Queue: Sean Gilhuly <sgilhuly@chromium.org>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2020-03-20 12:58:45 +00:00
Brian Salomon
4b55ff097b Fix cmake angle build on linux.
Include libangle_gl_egl_sources and libangle_gl_egl_dl_sources source sets

Change-Id: I86aa7fb19eb5ec195b8ba35b46a66449e0e461f9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277738
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-03-19 21:10:56 +00:00
Chinmay Garde
f832c0ae49 Allows Skia users to disable use of API_AVAILABLE in the Metal backend.
On certain older versions of the Clang toolchain, the use of the API_AVAILABLE
macro on symbols in C++ translation units causes the visibility of those
symbols to me treated as default instead of the hidden. This causes internal
symbols to be exposed from release dylibs.

This mechanism allows users of the toolchains that have not been updated to the
latest versions to disable the use of the macro in release configurations.

Change-Id: I656361770c2011cff4c1b252761b5d0f3d89edc5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277775
Auto-Submit: Chinmay Garde <chinmaygarde@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-03-19 21:10:55 +00:00
Brian Salomon
1171d314ef Revert "Revert "Revert "Don't build GL on Metal, Vulkan, Dawn, Direct3D bots"""
This reverts commit fb27c9a25f.

Revert "Remove MoltenVK support"

Reason: TSAN Vulkan bots hanging.

This reverts commit 6cafe73da9.

Change-Id: I8ec9db35c112f3c8da8636dab2065e6f18de7d0b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277936
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-19 13:10:59 +00:00
Brian Salomon
6cafe73da9 Remove MoltenVK support
We haven't tested this in a while. Use the Metal backend instead.

Change-Id: Ic06bf4faff99950bd24e41bdea03962db99cfeee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277612
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-03-19 12:23:23 +00:00
Brian Salomon
7c94d1891f Use SkColorMatrix_RGB2YUV in image_from_yuv_textures
Change-Id: I22ce21a7d217c6929cd3a3de6525290fafa91f55
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277816
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-19 12:22:43 +00:00
Chris Dalton
fabad15705 Remove ln "-T" option from cavaskit demo
-T isn't supported on mac.

Change-Id: Ic25dd48de1cfddcccb4d4b09f12585d889e5184d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277779
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-03-19 11:12:05 +00:00
skia-autoroll
d99b64678d Roll ../src 21cbc653d600..05edc0038612 (738 commits)
21cbc653d6..05edc00386


Created with:
  gclient setdep -r ../src@05edc00386

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 egdaniel@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/+/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
Bug: None
Tbr: egdaniel@google.com
Change-Id: I19bee9ca918d49f710bfaec4a2a2f1da98ff0e04
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277897
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-19 04:49:23 +00:00
skia-autoroll
d4bc34a0ed Roll third_party/externals/angle2 d24752e63ae4..dadeffa315e7 (16 commits)
d24752e63a..dadeffa315

git log d24752e63ae4..dadeffa315e7 --date=short --first-parent --format='%ad %ae %s'
2020-03-19 jmadill@chromium.org Capture/Replay: Fix stride in compressed texture caching.
2020-03-19 jmadill@chromium.org Roll chromium_revision 86e00b5dd2..fa9d5805c4 (743688:750702)
2020-03-18 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-validation-layers/src 6cd8cbdaab99..caeb15a056a0 (15 commits)
2020-03-18 courtneygo@google.com Vulkan: Must call vkFlush while memory is mapped
2020-03-18 tobine@google.com Vulkan:Set one-time bit on all command buffers
2020-03-18 courtneygo@google.com Be sure to clear all program state at unlink
2020-03-18 jmadill@chromium.org Capture/Replay: Fix MEC Query capture.
2020-03-18 jmadill@chromium.org Capture/Replay: Fix compressed texture subImage caching.
2020-03-18 jmadill@chromium.org Capture/Replay: Use zlib to compress data files.
2020-03-17 m.maiya@samsung.com Vulkan: Request device local memory for glBuffer with GL_STATIC* usage
2020-03-17 amy.liu@arm.com Fix ShaderStorageBufferReadWriteOffset end2end test
2020-03-17 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader 3a50a43df988..440fc9959f06 (1 commits)
2020-03-17 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/glslang/src 9b620aa0c12d..4b2483ee88ab (1 commits)
2020-03-17 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-validation-layers/src be663d752e45..6cd8cbdaab99 (7 commits)
2020-03-17 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-loader/src f1d9f12a19de..64c36933d4f2 (2 commits)
2020-03-17 jmadill@chromium.org Roll third_party/zlib/ c2eb8a7f7..156be8c52 (1 commit)

Created with:
  gclient setdep -r third_party/externals/angle2@dadeffa315e7

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian9-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: None
Tbr: egdaniel@google.com
Change-Id: Id47c4614f5fa295f50adccbc25e772173280264e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277898
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-19 04:47:33 +00:00
skia-autoroll
d65a790d71 Roll third_party/externals/swiftshader 440fc9959f06..bc98fbeec99b (3 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/440fc9959f06..bc98fbeec99b

git log 440fc9959f06..bc98fbeec99b --date=short --first-parent --format='%ad %ae %s'
2020-03-18 amaiorano@google.com Subzero: fix external function calls on x86-32
2020-03-18 amaiorano@google.com Subzero: fix partially initialized ManagedStatic assert
2020-03-17 digit@google.com [vulkan]: Support multiple external semaphore implementations.

Created with:
  gclient setdep -r third_party/externals/swiftshader@bc98fbeec99b

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

Cq-Include-Trybots: skia/skia.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: egdaniel@google.com
Change-Id: I487d827d21f31afb3c6014b1db62c2fe3c2425e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277896
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-19 04:29:33 +00:00