Commit Graph

51234 Commits

Author SHA1 Message Date
Greg Daniel
b8949bde33 Update attachment unique key to handle format and protected.
Previously we didn't have the format in the key since this was only used
for stencil which we always pick the same format for.

Bug: skia:10727
Change-Id: I3744846eb74d6b9a66990747cf17f6e881fc6eac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324708
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-10-12 20:03:03 +00:00
Michael Ludwig
5ea4a5427d Take crop rect into account for input bounds/reverse filter bounds
The crop rect was already applied for output bounds / forward filter
bounds. However, it also is applied to the output of filterImage so it's
also a constraint on the target output that's passed through the filter
dag during an input/reverse bounds query.

When there aren't other content hints provided, the device clip bounds
used as the target can be much bigger than the crop rect, so this will
help reduce layer size for a filtered layer.

Once cropping is handled as its own image filter, this will happen
naturally as part of the crop filter's input/output bounds implementation.

Bug: skia:9296
Change-Id: I662b3d083e6797d426a5f7bb9d69454dda737184
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323676
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-10-12 19:55:33 +00:00
Mike Klein
840e8ea740 power up skvx::map
Rewrite map() to allow any number of arguments,
now also used for 2-argument (pow) and 3-argument (fma) operations.

I left a note about fma()... I can't understand why, but calling as
map(fmaf, x,y,z) ends up with scalar calls to fmaf(), but with the
lambda indirection we see perfect vector codegen.

I had to break map() back into two parts. I don't see any way to pass
both a variadic number of arguments and play our trick with the default
std::index_sequence parameter.  The lane lambda similarly exists only to
split up the expansion of the Rest... type pack from the I... index
pack; you can't use two pack expansions in the same expression.

Change-Id: Ia156a7fd846237f687d6018a7f95550c9fd4a56d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325736
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-10-12 19:43:33 +00:00
Brian Salomon
21f8b51099 Revert "Revert "Use ManagedBackendTexture in place of TestUtils backend texture helpers.""
This reverts commit f625e4ce45.

Change-Id: Id73c53ec7ab8d4a5951712dc150d86e6349addbf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325658
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-10-12 19:30:43 +00:00
Adlai Holler
4aa4c6014d Migrate gpu resource methods to GrDirectContext
Cut & paste job

Change-Id: I92e7d1ca5fdf7a7f9961b77a6088f06ed401cc2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325616
Auto-Submit: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-10-12 18:36:57 +00:00
John Stiles
01bdceb869 Rename SkTArray::allocCntForTest to capacity.
A change made in the spirit of not being weird. C++ containers typically
expose their capacities to non-test code, with a function "capacity."

Change-Id: Icc7e175a20aff53ef9e144ac9620ced29ef5e95a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325657
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-10-12 18:31:27 +00:00
Adlai Holler
3a508e94ef Migrate resource cache methods to GrDirectContext
Cut and paste job.

Change-Id: If9b7e0f74b16b2559dc4149f81720df96b09761e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325461
Auto-Submit: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-10-12 18:11:07 +00:00
Brian Salomon
30c9b4cfb0 Remove SkSurface::MakeFromBackendTextureAsRenderTarget
Bug: skia:9832
Change-Id: I4cb6f8abdb58ac37e9304a4c484e6cac4a25f0d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324890
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-10-12 17:57:37 +00:00
Adlai Holler
61a591ca18 Migrate releaseResourcesAndAbandonContext to GrDirectContext
The call order here is a little weird – it could use some refactoring
but for now it's just a cut-and-paste job.

Change-Id: I931493a421f7fd1df69f0c47055b90a2996c7dc3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325459
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
2020-10-12 17:20:57 +00:00
John Stiles
f972313fa1 Add test for disabling the inliner.
This golden verifies that when the inline threshold is zero, inlining is
not performed.

Change-Id: Icad6e1faed569dd1b2469874be3b9e635ad0b9ad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325656
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-10-12 17:14:07 +00:00
John Stiles
d34d56e279 Clean up SkSL inliner and allow it to be disabled.
- When fInlineThreshold is zero, the inliner doesn't need to run at all.
- Inlining functionality outside of `analyze` can be made private now;
  it's not referenced by the IRGenerator any more.

Change-Id: If61fd8998bc024201bf4489b7aa48ac4d117e449
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325617
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-10-12 16:54:37 +00:00
John Stiles
e497a08065 Reland "Remove inliner from IR generation stage."
This reverts commit 941fc7174f.

Reason for revert: performance now seems to be roughly equal or better
(~1%) over several trials.
Nanobench: http://screen/A8e8sojaXBgbMgF

Original change's description:
> Revert "Remove inliner from IR generation stage."
>
> This reverts commit 21d7778cb5.
>
> Reason for revert: Pinpoint absolutely hates this change
>
> Original change's description:
> > Remove inliner from IR generation stage.
> >
> > There is no need to inline code during IR generation, as the optimizer
> > can now handle this.
> >
> > Change-Id: If272bfb98e945a75ec91fb4aa026e5631ac51b5b
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315971
> > Commit-Queue: John Stiles <johnstiles@google.com>
> > Commit-Queue: Brian Osman <brianosman@google.com>
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Auto-Submit: John Stiles <johnstiles@google.com>
>
> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
>
> Change-Id: I62c235415bcdc92a088e2a7f9c3d7dbf7e1bf669
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317976
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

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

Change-Id: I6189806c678283188f4b67ee61e5886f88c2d6fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324891
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-12 16:53:27 +00:00
skia-autoroll
79995e2bf7 Roll ANGLE from 3df629c55d89 to 0f55e3e5d266 (62 revisions)
3df629c55d..0f55e3e5d2

2020-10-12 lexa.knyazev@gmail.com Reland "Remove redundant BlendStateArray tracking"
2020-10-12 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 51b03d58fb17 to e72c6099f946 (5 revisions)
2020-10-12 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from 0046c31f2f96 to 9d4b40ae645e (10 revisions)
2020-10-12 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 77bfcdcde874 to efbcef254191 (569 revisions)
2020-10-12 syoussefi@chromium.org Reland: "4 Vulkan content defined CLs."
2020-10-10 jmadill@chromium.org Sync extended dirty bit on texture copies.
2020-10-10 jmadill@chromium.org Revert 4 Vulkan content defined CLs.
2020-10-10 jmadill@chromium.org Suppress more tests on Intel/GL/Mac.
2020-10-10 syoussefi@chromium.org Vulkan: Avoid content restore by detecting no-op stencil
2020-10-10 syoussefi@chromium.org Vulkan: Clear depth by shader if depthClamp not supported
2020-10-10 syoussefi@chromium.org Vulkan: Restore at the end of RP if write-after-invalidate
2020-10-10 syoussefi@chromium.org Vulkan: Use depthClamp to clear depth where available
2020-10-10 syoussefi@chromium.org Vulkan: Boilerplace for vkCmdSetScissor
2020-10-10 syoussefi@chromium.org Vulkan: Invalidate/restore depth/stencil separately.
2020-10-10 timvp@google.com Metal: Disable fence sync extension on Nvidia
2020-10-09 syoussefi@chromium.org Vulkan: Support invalidate of MSRTT attachments
2020-10-09 timvp@google.com Vulkan: Call onColorDraw in resolveColorWithSubpass
2020-10-09 jmadill@chromium.org trigger.py: Append user tag.
2020-10-09 jonahr@google.com Add perf-alert monitoring instruction to docs
2020-10-09 cclao@google.com Vulkan: DepthStencil layout should use both early and late stages
2020-10-09 liaoyuke@chromium.org Declare ozone_platform_gbm when angle doesn't have build
2020-10-09 syoussefi@chromium.org Remove gaps in Framebuffer::DirtyBits
2020-10-09 syoussefi@chromium.org Vulkan: Move content-defined tracking to ImageHelper
2020-10-09 jmadill@chromium.org Suppress Mac/GL test failures with standalone runner.
2020-10-09 gbiv@chromium.org fix an instance of bugprone-unused-return-value
2020-10-09 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from fc8264854c53 to c2553a315f5c (5 revisions)
2020-10-09 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 952149303d06 to 51b03d58fb17 (2 revisions)
2020-10-09 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from 24184fe81c6f to 0046c31f2f96 (2 revisions)
2020-10-09 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Loader from dc8a96d60b6b to 14ad927e679a (2 revisions)
2020-10-09 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 090102a7065c to 77bfcdcde874 (466 revisions)
2020-10-09 kainino@chromium.org Suppress gl_test failures on Mac ARM64 (Apple DTK)
2020-10-08 geofflang@google.com GL: Work around Mac glBindBufferRange issue.
2020-10-08 timvp@google.com Target the "absl" component for component builds.
2020-10-08 timvp@google.com Suppress TransformFeedbackTest.RecordAndDrawWithScissorTest
2020-10-08 jmadill@chromium.org Support RGB -> BGRX copies in copySubImage.
2020-10-08 timvp@google.com Vulkan: Disable vkCreateDevice-physical-device-features-not-retrieved
2020-10-08 timvp@google.com Vulkan: Disable UNASSIGNED-CoreValidation-DevLimit-MissingQueryCount
2020-10-08 ianelliott@google.com Document how to revert/reland a CL
2020-10-08 syoussefi@chromium.org Vulkan: Add resolve/unresolve counters
2020-10-08 syoussefi@chromium.org Pass in Command::Clear to framebuffer syncState
2020-10-08 lehoangq@gmail.com Metal: Implement fence sync
2020-10-08 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from e171d8431cfa to 24184fe81c6f (3 revisions)
2020-10-08 angle-autoroll@skia-public.iam.gserviceaccount.com Roll glslang from bacaef3237c5 to 2067d1a93e6e (8 revisions)
2020-10-08 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Loader from a638f3acae94 to dc8a96d60b6b (2 revisions)
2020-10-08 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 635de036d766 to 952149303d06 (2 revisions)
2020-10-08 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from a5a8696e5087 to 090102a7065c (466 revisions)
2020-10-08 syoussefi@chromium.org Add a test for deferred clears and 0-sized scissor clears
2020-10-07 geofflang@google.com Ensure a CGL context is current for WindowSurfaceCGL.
2020-10-07 timvp@google.com Skip GLES1ConformanceTest.SpotExpDir for Win+Vulkan
2020-10-07 jmadill@chromium.org Fix debug message formatting.
2020-10-07 liaoyuke@chromium.org Roll Chromium manually from edbb6564c87b to a5a8696e5087 (458 revisions)
2020-10-07 jmadill@chromium.org Move entry point enum utils to common.
2020-10-07 cclao@google.com Vulkan: Remove depth stencil access out of RenderPassDesc
2020-10-07 ianelliott@google.com DisplayNULL::makeCurrent() must install DebugAnnotator
2020-10-07 sdefresne@chromium.org build: Remove no-op calls to set_sources_assignment_filter
2020-10-07 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from 63cc22d645ba to fc8264854c53 (1 revision)
2020-10-07 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Tools from 14289452a832 to 1abaced34b84 (1 revision)
2020-10-07 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from afe6ca45b6da to 635de036d766 (3 revisions)
2020-10-07 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from c7d7610581df to e171d8431cfa (1 revision)
2020-10-07 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Loader from 3610ce9fa2d8 to a638f3acae94 (3 revisions)
2020-10-07 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from 02da53e45d9e to 618e41c871d6 (7 revisions)
2020-10-07 syoussefi@chromium.org Add emulated format clear perf test

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 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: robertphillips@google.com
Test: Test: CQTest: Test: GLES1ConformanceTest.SpotExpDir/ES1_VulkanTest: Test: TransformFeedbackTest.RecordAndDrawWithScissorTestTest: Test: angle_end2end_tests on OSX 10.15
Change-Id: Id41abc7a9b42c7d9caae62837fa951f2a98d50bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325507
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-12 16:42:37 +00:00
Chris Dalton
9213e610ed Disable the tessellation atlas on non-direct contexts
The atlas is not compatible with DDL. This is a temporary fix that will
allow us to finally enable tessellation. In the near future we plan to
remove the atlas entirely by implementing SkRegion batching and
reordering instead.

Bug: skia:10419
Change-Id: Ie2d1bda31c12cda8ecd4889004483f679f5ba7e9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324976
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-10-12 16:33:07 +00:00
Brian Salomon
f625e4ce45 Revert "Use ManagedBackendTexture in place of TestUtils backend texture helpers."
This reverts commit 5ee0556048.

Reason for revert: breaking bots

Original change's description:
> Use ManagedBackendTexture in place of TestUtils backend texture helpers.
>
> Unify on a single family of helpers for making backend textures.
>
> Stresses callback systems in more tests by avoiding artificial
> flush/submit/syncs.
>
> some misc test cleanup along the way.
>
> Change-Id: Ia692e8927ba97b391ee77ea06ebf437a555617b2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324710
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

Change-Id: I7d4fc9412c870ae13f7498671379b871dbf5a6c4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325619
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-10-12 16:19:49 +00:00
Florin Malita
3bfeab7d95 Reland [svg] Add svg_tool
A simple svg -> png converter, to demonstrate basic API usage.

TBR=

Change-Id: Id723946e2c1cbdaf324a24202279cb6a6d7082b6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325460
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2020-10-12 16:18:27 +00:00
John Stiles
0f37907ac7 Undo call-count fix for intrinsic functions.
This CL is conceptually a revert of http://review.skia.org/320258,
although the code has changed shape a bit since that CL was landed.

This fix was too aggressive, and can lead to functions being dead-
stripped while they still have an active reference.

Change-Id: I6ce8b0ad9cc2a42e8be8cb10d3a8219149eca6aa
Bug: skia:10776
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325462
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2020-10-12 15:58:27 +00:00
Ethan Nicholas
5194a7018a moved SkSL FunctionReference/TypeReference data into IRNode
Change-Id: Ie3982e22c764455f3ae11472f6d1cacf4e9f64ba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325458
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-12 15:54:13 +00:00
Brian Salomon
5ee0556048 Use ManagedBackendTexture in place of TestUtils backend texture helpers.
Unify on a single family of helpers for making backend textures.

Stresses callback systems in more tests by avoiding artificial
flush/submit/syncs.

some misc test cleanup along the way.

Change-Id: Ia692e8927ba97b391ee77ea06ebf437a555617b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324710
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-10-12 15:28:52 +00:00
Florin Malita
0f02d0b822 [svg] Add public.bzl defs for SVG source sets
Change-Id: I2c690b1e079494a3e1217330c3791d29bc37e27c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325337
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
2020-10-12 15:23:57 +00:00
Ben Wagner
52c277ba3c Update site favicon to new theme.
Change-Id: I9666a2358489cf2492515ea2dab5cc8dcf475bb5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324884
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-10-12 15:23:48 +00:00
Ethan Nicholas
ceb6214a55 moved SkSL InlineMarker and UnresolvedFunction data into IRNode
Change-Id: I05b940c69b7756d41277626fc3eef06003d133c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324886
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-12 14:29:37 +00:00
skia-autoroll
c67948d2c0 Roll SwiftShader from 952149303d06 to e72c6099f946 (7 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/952149303d06..e72c6099f946

2020-10-11 natsu@google.com Revert "Update virlg_hw path to reflect Minigbm"
2020-10-10 swiftshader.regress@gmail.com Regres: Update test lists @ 139f5c35
2020-10-10 natsu@google.com Update virlg_hw path to reflect Minigbm
2020-10-09 capn@google.com Fix depth bias calculations
2020-10-09 capn@google.com Move interpolant clamping out of interpolate()
2020-10-09 bclayton@google.com SpirvShaderDebugger: Fix store() of arrays
2020-10-09 bclayton@google.com SpirvShaderDebugger: Improve ASSERT() messages

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/+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: robertphillips@google.com
Change-Id: I3c36d28ffedb99aa231d78c9bde1a205193f4d13
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325320
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-12 14:04:27 +00:00
Matthew Leibowitz
07055b5e25 Parse out the orientation in the SubIFD of EXIF
Orientation information is sometimes stored in
the SubIFD section of EXIF, so read that. This is
just a matter of searching for the SubIFD offset
value in the EXIF tags and then parsing the
values from there onwards. The data format is
the same as the EXIF data.

The images are not under any copyright as I made
them up locally specifically for these tests.

Bug: skia:10799

Change-Id: I5384ffc1c4a9a0c7d3fc8510ef4da2f278cb8b97
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323217
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2020-10-12 13:50:27 +00:00
Robert Phillips
91c752a014 Revert "[svg] Add svg_tool"
This reverts commit 2531de9926.

Reason for revert: Breaking some builds

Original change's description:
> [svg] Add svg_tool
>
> A simple svg -> png converter, to demonstrate basic API usage.
>
> TBR=
> Change-Id: I34417c437b91e97811f5db512a9e79aa5cc099b8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325336
> Reviewed-by: Florin Malita <fmalita@google.com>
> Commit-Queue: Florin Malita <fmalita@google.com>
> Commit-Queue: Florin Malita <fmalita@chromium.org>

TBR=fmalita@chromium.org,fmalita@google.com,tdenniston@google.com

Change-Id: I59117a1764a3a98bd910a3a76a44d9bba8bc2de4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325456
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-10-12 13:49:49 +00:00
Florin Malita
2531de9926 [svg] Add svg_tool
A simple svg -> png converter, to demonstrate basic API usage.

TBR=
Change-Id: I34417c437b91e97811f5db512a9e79aa5cc099b8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325336
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-10-12 02:24:36 +00:00
skia-recreate-skps
d71dc2d25b Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=rmistry@google.com
NO_MERGE_BUILDS

Change-Id: Idba7ae9346115893f3847c39671cc37e4beaa23a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325216
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-10-11 06:26:35 +00:00
Brian Salomon
aa64c352b3 Remove legacy gpu blur util code
TBR:michaelludwig@google.com

Bug: skia:10818
Change-Id: I1326aa017c0ed000efee1b9e0372a12976ba09eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324895
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
2020-10-10 12:52:04 +00:00
John Stiles
13fc260c70 Reject struct vardecls with modifiers.
These aren't allowed in GLSL, and typically don't make sense.

Change-Id: I0afca0df638590466922a809e91ef0be35b13ca8
Bug: skia:10765
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324816
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2020-10-09 22:34:23 +00:00
Chris Dalton
61003cde76 Add support for WEBGL_multi_draw_instanced_base_vertex_base_instance
Bug: skia:10419
Change-Id: I82238c3115daa0c1879fe18a8f8af8199194be80
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319936
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-10-09 22:12:03 +00:00
Brian Salomon
e4e0aad937 VulkanWindowContext uses sample-able swap VkImages when available.
MSAA now requires this.

Removes last use of SkSurface::MakeFromBackendTextureAsRenderTarget.

Bug: skia:9832
Change-Id: I2837aa0dd9e2cc999c5aac194816777bca477abe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324889
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-10-09 21:53:43 +00:00
Kevin Lubick
4f18a0c51e [canvaskit] Add job to compile GMTests js/wasm
Next step is to add the following task:
Test-Ubuntu18-EMCC-Golo-GPU-QuadroP400-wasm-Release-All-WasmGMTests_WebGL2

Bug: skia:10812
Change-Id: Ibe45b7205cebd30f0e7904ea6d93a01ea3df87fe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324617
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2020-10-09 20:41:43 +00:00
Jim Van Verth
023f2e776e Use push constants cap in Metal.
* Sets the cap and uses it for verifying vertex/fragmentBytes size instead
of a magic number.
* Also makes maxPushConstantsSize unsigned to avoid warnings and
unnecessary casting.

Change-Id: I2aaea853604eb3c652ddbae3adb0168a4e41799a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324880
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-10-09 20:34:13 +00:00
Brian Osman
88cda17bbe Reorganization of IR generator's API and interaction with compiler
- Move all of IR generator's fields private (except for fContext, which
  is used ~everywhere).
- Eliminate start() and finish(), fold this logic into convertProgram.
  The division of what was set/reset in different places was pretty
  arbitrary. Now, convertProgram does everything. Along that line, have
  it actually return the "outputs" as an IRBundle (a small collection of
  the things that the compiler needs). This seems better than the
  compiler ripping out IR generator's internals.
- IR generator's POD field initialization was a mix of in-class and
  constructor. Move all the constant initialization to declarations.
- No need to look up sk_PerVertex at start (or convertProgram) time, so
  remove fSkPerVertex, and just do the lookup when we're about to use
  it.
- IRGenerator::convertProgram is fairly long now, but all the code is in
  one place. You don't have to think about the order that three
  different member functions are called (along with the caller mutating
  the internal state between those three calls).

- In the compiler, add an AutoSource helper to manage changing and
  restoring the fSource pointer everywhere.
- Rename the loadXXXIntrinsics functions to loadXXXModule, have them
  return the module, and wrap the whole thing up in a single
  moduleForProgramKind() helper.

Change-Id: I0c9b6702f8786792963e3d9408d6619e5ab393e2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324696
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-10-09 20:29:03 +00:00
Greg Daniel
f707e9cc9d Don't set vk sampler on desc set if using immutable samplers.
This appeases a validation layer error. Its unclear if the validation
is correct saying this was an error before (since sampler param isn't
used when we have immutable samplers), but this isn't wrong either and
makes the layers not complain.

Change-Id: I88e8017df203965af0030b153ff933384a6215d6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324698
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-10-09 19:00:43 +00:00
Jorge Betancourt
d5fec1788c Fix SkottieView demo app by handling branching issues
On some devices, SkottieView would crash on startup.
CL introducing bug: https://skia-review.googlesource.com/c/skia/+/310136

This was introduced in CL:
https://skia-review.googlesource.com/c/skia/+/310136

Change-Id: Ib9010707673e055964d5f0a471338097b3bf9910
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323596
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2020-10-09 18:56:03 +00:00
Jorge Betancourt
269e43fd98 update DEPS to point at oboe commit that fixes parsing library
Not an official release, but no noticeable differences.
We can point it to the next stable release when it incorporates the fix.

b02a12d1dd

Change-Id: I7c93eb50d3ee87ea4c1180be4cbab81a94449197
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324676
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2020-10-09 18:49:18 +00:00
Brian Osman
8b43dadea2 In SPIRVCodeGenerator, use the Program's ModifiersPool
We were passing in the IR generator's which had already been reset, so
technically belonged to the *next* Program to be compiled.

Change-Id: Ib68c283591f02d1642bb7c2d9658f5caa76b0f15
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324700
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-10-09 18:45:43 +00:00
Chris Dalton
141d35cdec Simplify the inflection/rotation finding math for stroke tessellation
Bug: skia:10419
Change-Id: I7754a1f19eea8630db3ede29e1ee7c79a53091bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322041
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-10-09 18:44:14 +00:00
Michael Ludwig
7563a48787 Revert "SkDevice::drawSpecial accepts arbitrary matrix v2"
This reverts commit 7c4aca04cc.

Reason for revert: cc unit tests need to be rebased

Original change's description:
> SkDevice::drawSpecial accepts arbitrary matrix v2
>
> This opens up the door to render image filter results with an arbitrary
> matrix, so we can skip the matrix filter DAG hack. It should also let
> me simplify the handling of backdrop image filters and correctly apply
> perspective to image filters.
>
> This is essentially the same as
> https://skia-review.googlesource.com/c/skia/+/317862
> but not parented to the CL that experimented with SkImagePaint.
>
> Some of the function declaration re-org that was done in its prior CL
> has been directly integrated into this CL.
>
> Bug: skia:9545
> Change-Id: Iad882bd306f3a4064fe60cfc0526226287ea7e29
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323597
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,robertphillips@google.com,reed@google.com,michaelludwig@google.com

Change-Id: I6a248fe9e02d71fa340ed3227e77fff097b7b08e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9545
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324704
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-10-09 17:58:45 +00:00
Brian Salomon
60003f776a Use BackendSurfaceFactory in Vk protected unit tests.
Automatically handles cleanup of backend objects.

Removes use case of MakeFromBackendTextureAsRenderTarget.

Bug: skia:9832
Change-Id: I27c2b4cae713bd605a662d38b797fd25c1add98e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324119
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-10-09 17:54:03 +00:00
Kevin Lubick
ffc20c2764 [canvaskit] Clean up some APIs related to Path factories
These were uncovered during the recent documentation fiesta.

This also adds a test for the previously untested
CanvasKit.Path.MakeFromOp API.

Bug: skia:10717
Change-Id: Icd3d31ec0f8d61bd399e76abdbf7b5c6395c4d85
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324626
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-10-09 17:42:47 +00:00
John Stiles
efe767da91 Improve performance of SymbolTable lookups.
This CL introduces two significant changes:
- unordered_map is replaced by SkTHashMap.
- The StringFragment key is replaced by a SymbolKey class, which caches
  the hash of the string.

The second change is responsible for the lion's share of the measured
performance improvement. SymbolTable::operator[] was previously re-
hashing the string every time it recursed into the parent symbol table.

Nanobench shows a fairly consistent ~8% speed improvement in both
sksl_medium and sksl_large: http://screen/3KTc27gt85HS4wK

Change-Id: Ia1010dcd40d7f7ecdce1aa5bb10c6cf6f6f11a80
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324628
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-10-09 17:39:34 +00:00
John Stiles
118706a806 Improve codegen for gradients.
Replacing `sk_OutColor = x` with `return x` in single-exit FP functions
results in fewer scratch variables in the final post-inliner output.

Change-Id: I81c081a78d0fb7dfad5230e3044027901673236c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324377
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>
2020-10-09 17:39:33 +00:00
Greg Daniel
f52bca1069 Suppress another version of the vulkan validation error.
Need the indexed version of the draw as well

Change-Id: I0b11687be1bb6126d963eb6ce99879525df2603f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324697
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-10-09 17:27:33 +00:00
Ethan Nicholas
7a95b20733 moved SkSL FieldAccess data into IRNode
Change-Id: Ib2fd8c246799a1bde566395080fe6617754644f9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324635
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-09 16:58:33 +00:00
Adlai Holler
a7a404473c Migrate abandonment & reset methods to GrDirectContext
This is pretty much just cutting & pasting the code naïvely,
but it's the safe way to go so that we don't impact the
order of events during this housekeeping.

Change-Id: I8d9f2ffb560b34fd1a8d9603174ff1f17803e447
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324619
Commit-Queue: Adlai Holler <adlai@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-10-09 16:16:43 +00:00
Ethan Nicholas
453f67ff0a SkSL enum changes
Changed a couple of SkSL enums to enum classes and rearranged things to
make their storage within IRNode type safe.

Change-Id: I6509d027d79161c1a09473e90943aae061583f20
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324624
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-09 15:54:13 +00:00
Greg Daniel
e70a30d46f Suppress vulkan validation layers bug.
This is a bug in the layers related to input attachments.

Change-Id: I1e44c45ce44bea79e7078836150237a6c63cbb36
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324625
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
2020-10-09 15:37:54 +00:00
Ethan Nicholas
444ccc6e59 more SkSL IRNode refactoring
Prefix, Postfix, and ExternalFunctionCall nodes this time around.

Change-Id: I56bc06d73274f01b67f043a6ebd23dd4c80d16e8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324621
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-09 15:22:33 +00:00