Commit Graph

60346 Commits

Author SHA1 Message Date
John Stiles
59c906795c Remove InlineMarker IR node.
This node was only used to detect recursion while inlining. We no longer
need to do this, because we disallow recursion in all programs.

The removal of one IRNode per inlined function actually allows for
slightly more aggressive inlining, since we restrict inlining based on
IRNode consumption. This allows the "ExponentialGrowth" tests to inline
a bit more deeply than before.

Change-Id: I894dbb1ca3096bb785b67facb01cc9c630f694c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534780
Reviewed-by: Arman Uguray <armansito@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-29 17:40:58 +00:00
skia-autoroll
aa409fc34a Roll vulkan-deps from c9e605688988 to 88693e6bf86c (3 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/c9e605688988..88693e6bf86c

Also rolling transitive DEPS:
  https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Cross from 6ae7ddb92a24 to a9d23d765238

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

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

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn;skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE
Bug: None
Tbr: bsalomon@google.com
Change-Id: If9ecca1f4fa666a2483d2e7539f6b95de660582b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535334
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-29 17:36:02 +00:00
Brian Salomon
8d7fb5f6de SkPicturePlayback uses a versioned SkReadBuffer
Bug: skia:13036
Change-Id: I31f3f01d2dcd28d38a5a281942d52a538a3f9e0c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535536
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-04-29 17:30:38 +00:00
Arman Uguray
0c3dda058c [ganesh][dawn] Support blocking on async WebGPU events in WASM
The `wgpu::Device::Tick()` function is not available when the Dawn
backend is compiled using emsdk to target WebAssembly. As an
alternative, this CL introduces code that takes advantage of
emscripten's Asyncify feature to yield execution to the browser's event
loop and allowing it to execute async tasks from blocking Skia code.

* Introduced the GrDawnAsyncWait class which abstracts over Asyncify vs
wgpu::Device::Tick depending on the platform and implements common
busy-wait boilerplate.
* Refactored the fence management in GrDawnGpu to make use of
GrDawnAsyncWait. The GPUQueue.onSubmittedWorkDone is now handled by a
callback on GrDawnGpu instead of per-fence callbacks since the latter
cannot easily prevent a use-after-free if a fence is destroyed before
the callback runs.

Bug: skia:12512
Change-Id: I255e92ec87c799dc7a50bd034a815c0aaca0ef5f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/530736
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
2022-04-29 17:02:12 +00:00
Brian Salomon
1a62f30069 Update to newer LLVM for Windows builds
Change-Id: I23b8c5a37a7ccaddccc042f8a4f70a2e29a41211
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535399
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-04-29 16:22:29 +00:00
Brian Salomon
51e0309094 Disable no-declaration-after-statement
This warning is about pre-C99 where declarations had to preceed
statements.

Change-Id: Ie029ebc0d2857d2d73c1395b8046e733765d8b17
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535439
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-04-29 15:42:12 +00:00
Kevin Lubick
88c15aeb94 [includes] Enforce IWYU on //example
Change-Id: I26136f1a3960eafd6e48c733c16ca35d20534df6
Bug: skia:13052
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535395
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-04-29 15:39:33 +00:00
Brian Salomon
efb32fe3c0 Fix -Wunused-but-set-variable warnings
Change-Id: I5a044983e3de84901f29bddca5503167edc8fcee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535436
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-04-29 15:20:59 +00:00
Robert Phillips
6a42397383 [graphite] Add support for the ImageShader's local matrix
Unsurprisingly, this makes more of the GMs and SKPs look correct.

It isn't added exactly as we would like going forward though. I
believe we would prefer something that munges the matrix and then
calls a child.

Bug: skia:12701
Change-Id: Ib50246a8d575a8a2489afdb7e5f6032a22637bd2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535116
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-04-29 15:12:31 +00:00
Brian Osman
5576a8144b Make program link errors non-fatal when using cached binaries
Change-Id: I9a5f3bc84cca209f914c7e40a5fbdc72f1460f47
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535403
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2022-04-29 15:11:28 +00:00
Kevin Lubick
00de8cc000 Reland "[includes] Remove SkColorSpace include from SkImageInfo"
This is a reland of commit 2151fa37fa

New client fixes:
 - https://crrev.com/c/3616345

Original change's description:
> [includes] Remove SkColorSpace include from SkImageInfo
>
> See also https://skia-review.googlesource.com/c/skia/+/525639
>
> This should be landed when clients have been fixed.
>  - https://github.com/flutter/engine/pull/32532
>  - https://github.com/flutter/engine/pull/32382
>  - http://cl/438808657
>  - http://cl/438803822
>  - http://cl/438807456
>  - http://cl/438808026
>  - http://cl/438821192
>  - https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17542295
>
> Change-Id: I04beeb2e2b6132c40508c98f4f281981dadbb0d4
> Bug: skia:13052
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526416
> Commit-Queue: Kevin Lubick <kjlubick@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

Canary-Chromium-CL: 3616345
Bug: skia:13052
Change-Id: I670d3d0d0bab2a86559d9a1184cb36ef008196f3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535357
Reviewed-by: Brian Salomon <bsalomon@google.com>
2022-04-29 14:56:15 +00:00
Brian Salomon
022334eaa7 Revert "Reland "Add anisotropic option to SkSamplingOptions.""
This reverts commit e6f23f98de.

Reason for revert: skps busted

Original change's description:
> Reland "Add anisotropic option to SkSamplingOptions."
>
> This is a reland of commit 9be2d572d4
>
> Original change's description:
> > Add anisotropic option to SkSamplingOptions.
> >
> > Implement on GPU.
> >
> > Bug: skia:13036
> > Change-Id: I35d760596c4f8faaec27fccf284b70802fcf3f9b
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524757
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
>
> Bug: skia:13036
> Change-Id: I3e411aae389dc880ce32bba78852705059fb88b0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535197
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

Bug: skia:13036
Change-Id: I583704990e4690ddd86923468c8cb742c1a819c2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535402
Auto-Submit: Brian Salomon <bsalomon@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-04-29 14:35:04 +00:00
Robert Phillips
7539324051 [graphite] Add 565 format support
Bug: skia:12701
Change-Id: Ia51c9086c20d28af2fea254658730d9bd4179605
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535396
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-04-29 14:18:58 +00:00
Brian Salomon
e6f23f98de Reland "Add anisotropic option to SkSamplingOptions."
This is a reland of commit 9be2d572d4

Original change's description:
> Add anisotropic option to SkSamplingOptions.
>
> Implement on GPU.
>
> Bug: skia:13036
> Change-Id: I35d760596c4f8faaec27fccf284b70802fcf3f9b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524757
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>

Bug: skia:13036
Change-Id: I3e411aae389dc880ce32bba78852705059fb88b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535197
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-04-29 14:18:22 +00:00
Kevin Lubick
3f8806ce0f [infra] Remove Win7 fyi jobs
Change-Id: I3a14d1790adecbcf742424dcf369cb1ee32d1f31
Bug: 1316545
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535326
Reviewed-by: Brian Salomon <bsalomon@google.com>
2022-04-29 13:36:13 +00:00
Kevin Lubick
0b6cef82dc [bazel] Point to vk_mem_alloc from DEPS
To make it easier to use the G3 version of this dep,
we make a reference to it in the WORKSPACE.bazel, so
we can refer to this external dep with the @ notation.

I would like to do this for all of our third party
deps, but one at a time.

Change-Id: I03e0beca124225e0faf1232278dae641da8a3e4d
Bug: skia:13240, skia:13211
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535358
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2022-04-29 12:45:56 +00:00
Brandon DeRosier
4230297004 Specify VMA include relative to source root
This is to help unblock the Skia->Flutter roll after https://skia.googlesource.com/skia.git/+/3b51120a92aa83ab7e465c6437bce23e0c094546.

See also: https://github.com/flutter/flutter/issues/102806#issuecomment-1112998932

Change-Id: I3fd061e495478efccda70d4c3e1647b7c6f375e4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535356
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2022-04-29 11:35:32 +00:00
skia-autoroll
02ac5088ce Roll SwiftShader from b92f7acb7e81 to adef92e7b4c6 (4 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/b92f7acb7e81..adef92e7b4c6

2022-04-28 capn@google.com Fix CMake build using Clang 13 compiler
2022-04-28 capn@google.com Remove 'partial precision' intrinsics
2022-04-28 capn@google.com Run the MemorySanitizer pass after optimizations
2022-04-28 capn@google.com Revert to using LLVM's O0 pipeline for coroutines

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

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

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: bsalomon@google.com
Change-Id: Ie4e77dc8fdaeb4c80947cf516f8beae88d5fc1e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535075
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-29 08:14:28 +00:00
skia-autoroll
d474cb835e Roll ANGLE from f9729598a6a0 to 2c58e7a5bab7 (2 revisions)
f9729598a6..2c58e7a5ba

2022-04-29 brianosman@google.com Reduce console spam from Metal shader translation
2022-04-28 cnorthrop@google.com Revert "Make SPIRV optional for Metal backend"

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

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

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Tbr: bsalomon@google.com
Change-Id: Ib2316e01962c3cbdef2f364827d37b2b042074e6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535074
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-29 05:28:43 +00:00
skia-autoroll
5807b020ce Roll Chromium from 8b65ae5339f2 to 2aa54824f810 (514 revisions)
8b65ae5339..2aa54824f8

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

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

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary: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: bsalomon@google.com
Change-Id: I1d7f6ffe8a71cd15a768abb1d165d5de37f4d91f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535317
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-29 05:27:14 +00:00
skia-autoroll
1dfcb58102 Roll vulkan-deps from 62a883c73abb to c9e605688988 (1 revision)
https://chromium.googlesource.com/vulkan-deps.git/+log/62a883c73abb..c9e605688988

Also rolling transitive DEPS:
  https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools from 671f6e633f42 to 46492aa45ae5

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

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

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn;skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE
Bug: None
Tbr: bsalomon@google.com
Change-Id: I23d099a57204e5134dec24ed684b6e6daa587568
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535318
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-29 04:57:58 +00:00
Greg Daniel
3b51120a92 Use DEPS to pull in VulkanMemoryAllocator.
Also updated the gn_to_bp.py to handle using the DEPSed vk_mem_alloc.h.
When rolled into Android we will copy the vk_mem_alloc.h from a local
DEPS checkout into a vma_android folder that will be checked into the
skia that lands with Android. We are using vma_android folder instead
of the current third_party/vulkanmemoryallocator folder because we
soon plan to move the latter into src/ instead of third_party. So just
using a different directory allows us to avoid doing an additional
change to the auto roller.

Bug: skia:13240
Bug: skia:13242
Change-Id: Ia344e13e3f7c7efecc2e6a97a96820f3ae58b5c2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531318
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2022-04-28 22:59:02 +00:00
Kevin Lubick
cadb3a33e1 Revert "[includes] Remove SkColorSpace include from SkImageInfo"
This reverts commit 2151fa37fa.

Reason for revert: Breaking Chrome

Original change's description:
> [includes] Remove SkColorSpace include from SkImageInfo
>
> See also https://skia-review.googlesource.com/c/skia/+/525639
>
> This should be landed when clients have been fixed.
>  - https://github.com/flutter/engine/pull/32532
>  - https://github.com/flutter/engine/pull/32382
>  - http://cl/438808657
>  - http://cl/438803822
>  - http://cl/438807456
>  - http://cl/438808026
>  - http://cl/438821192
>  - https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17542295
>
> Change-Id: I04beeb2e2b6132c40508c98f4f281981dadbb0d4
> Bug: skia:13052
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526416
> Commit-Queue: Kevin Lubick <kjlubick@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

Bug: skia:13052
Change-Id: I8a9108a333eebefdfa864c757d8c395a6b59335c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535296
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Kevin Lubick <kjlubick@google.com>
2022-04-28 22:56:15 +00:00
John Stiles
c4eedcf76d Avoid String::printf on a hot path.
Generating unique names is expensive! The inliner does it a lot. There
are two pain points:
- Assemble a candidate name with String::printf
- Use SymbolTable::lookup to make sure that name isn't taken already

Previously, these steps took roughly the same amount of time on my
machine. Afterwards, SymbolTable::lookup takes the vast majority of the
time spent in uniqueName. (Further optimizing symbol lookup is a Hard
Problem--trying to design something better than the current
implementation in the general case is not easy.)

This change gives nanobench a 1-3% win on my Macbook Pro.

median	mean
192µs	196µs	sksl_medium (before)
185µs	189µs	sksl_medium (after)

414µs	424µs	sksl_large  (before)
406µs	413µs	sksl_large  (after)

Change-Id: I8e0f7f053d124827a4d50a5006129e541a20c70d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534520
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-04-28 22:52:45 +00:00
John Stiles
240c55f97b Remove recursion checks from inliner.
We no longer allow recursive code anywhere, so the inliner doesn't need
to guard against recursion.

Change-Id: I1cd39e215d0b93b8a5b578eb20854075f7e48ed5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534779
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-28 22:13:07 +00:00
John Stiles
294aaf9457 Remove IWYU pragma.
Change-Id: Ibc8bf4d49a020f20dfcc775fb4996558127ac830
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535123
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-04-28 21:27:30 +00:00
John Stiles
cfcc11bd98 Move recursion tests into general /errors/ directory.
We enforce no-recursion in all programs now, not just Runtime Effects.

Change-Id: I3737329e4526fa1b7fdbb47ccb959f78f507f665
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535119
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-04-28 21:25:41 +00:00
John Stiles
aa34e0face Check for recursion or too-deep function-call chains everywhere.
Previously, we allowed non-ES2 programs to contain recursion. However,
most GPU backends don't actually allow recursion at all. Now SkSL bans
it regardless of the strict-ES2-enforcement setting.

Change-Id: I572a30cafc39fe1791038a92d7e5c5d9bafa99aa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534777
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-04-28 21:22:25 +00:00
skia-autoroll
7255ea38b1 Roll ANGLE from 95c1ff52b110 to f9729598a6a0 (20 revisions)
95c1ff52b1..f9729598a6

2022-04-28 jmadill@chromium.org Revert "Fix commit ID gathering on Android builds."
2022-04-28 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 4f93dbdc6060 to 1963b94c99e8 (2 revisions)
2022-04-28 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from f88fc3b53c52 to b92f7acb7e81 (3 revisions)
2022-04-28 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from c7e51a124fab to 1e97e6cd1c3c (915 revisions)
2022-04-27 cclao@google.com Vulkan: Move pruneOrphanedBufferBlocks to last
2022-04-27 syoussefi@chromium.org Vulkan: Fix SemaphoreCount best practice warning
2022-04-27 cclao@google.com Vulkan: Remove API access for mTotalBufferToImageCopySizen
2022-04-27 lexa.knyazev@gmail.com Add forceDepthAttachmentInitOnClear frontend workaround
2022-04-27 brianosman@google.com Make SPIRV optional for Metal backend
2022-04-27 syoussefi@chromium.org Vulkan: Work around Qualcomm imprecision with dithering
2022-04-27 j.vigil@samsung.com Enable SINGLE_BUFFER with eglCreateWindowSurface
2022-04-27 doughorn@google.com Fix commit ID gathering on Android builds.
2022-04-27 romanl@google.com Run a smoke test in each shard and crash on timeouts.
2022-04-27 yuxinhu@google.com Add build arg to automatically attach renderdoc
2022-04-27 syoussefi@chromium.org Vulkan: Optimize away eglSwapBuffers for single buffer surfaces
2022-04-27 cclao@google.com Perf Tests: Compute GPU time periodically
2022-04-27 romanl@google.com Android perf tests shards 20->6 (only --smoke-test-mode)
2022-04-27 romanl@google.com Log runTests so that it shows up in logcat dumps.
2022-04-27 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 5f5faa3a2aad to f88fc3b53c52 (4 revisions)
2022-04-27 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from f685346e2e51 to 4f93dbdc6060 (2 revisions)

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

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

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Tbr: bsalomon@google.com,brianosman@google.com
Test: Test: Run script on Android infra, verify hash is gathered properly.
Test: Test: angle_end2end_test --gtest_filter=EGLSingleBufferTest
Change-Id: I94a59b5f42b2262dce69d921f1c63dea967e463e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535067
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-28 21:20:33 +00:00
James Godfrey-Kittle
f9c89a443d [graphite] Add UploadBufferManager class.
This class manages and suballocates buffers used to upload textures. It
maintains a reusable, suballocated buffer for small allocations, and
creates dedicated buffers for any allocation larger than its set
reusable buffer size.

Change-Id: If7877faed870afbc85635ae47553000fa3487aba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534941
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: James Godfrey-Kittle <jamesgk@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2022-04-28 20:59:14 +00:00
Kevin Lubick
4a479495f8 [bazel] Add initial docs for bazel use (and .bazelrc tips)
Change-Id: I6da8f5ad6e172d01a451607ac01693407aced858
Bug: skia:12541
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534976
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2022-04-28 20:48:21 +00:00
Kevin Lubick
2151fa37fa [includes] Remove SkColorSpace include from SkImageInfo
See also https://skia-review.googlesource.com/c/skia/+/525639

This should be landed when clients have been fixed.
 - https://github.com/flutter/engine/pull/32532
 - https://github.com/flutter/engine/pull/32382
 - http://cl/438808657
 - http://cl/438803822
 - http://cl/438807456
 - http://cl/438808026
 - http://cl/438821192
 - https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17542295

Change-Id: I04beeb2e2b6132c40508c98f4f281981dadbb0d4
Bug: skia:13052
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526416
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2022-04-28 20:48:11 +00:00
Brian Osman
23d333bdd6 Add support for ANGLE's Metal backend
- Disables MSL via SPIRV (we don't have the necessary DEPS)
- Adds new context type, configs, etc...
- Minor tweaks to the ANGLE test context code

Bug: angleproject:7155
Bug: skia:13272
Change-Id: I258ed19abba01ad96cfe6fca46b558af2340880e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534569
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-04-28 19:53:18 +00:00
Michael Ludwig
664e2c8bfa Improve legibility of release note
Bug: skia:13263
Change-Id: I1a1bff427964c9d0899a533ce7add1829e980c19
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534566
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-28 19:52:38 +00:00
Michael Ludwig
f3330fd6d2 Remove total edges uniform from fixed count stroke tessellator
The uniform was dependent on all paths, and patches, written from an
op's batch. But this isn't compatible with graphite's data flow since
the stroke render step would need to provide uniforms before sorting
that could produce an equivalent batch of paths.

That said, the only real limit on the vertex count is from the max
size of the vertex ID or fallback buffer. These are constants. Assuming
that the CPU computes the required segments equivalently to the GPU,
then we'd never apply the clamping under typical usage, since the
draw call would use just enough vertices anyways.

Bug: skia:12703, skia:13056
Change-Id: I708ef4bc48beb9c23cba6cba7930f05057b4c323
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/530678
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2022-04-28 19:48:00 +00:00
Robert Phillips
0dfc3f9cab [graphite] Rename Dev2Local to LocalCoords
This renaming makes the SnippetRequirementFlags just say what is needed.
Not how Graphite implements it.

Bug: skia:12701
Change-Id: I0506c55775c29c30d55c696c4c1f71e91156a5a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534761
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-04-28 19:42:08 +00:00
Michael Ludwig
582c84c848 Remove unused clip atlas cap
This referred to CCPR's atlas and is not actually related to the current
clip atlas. Nothing was checking for this cap, and my guess is it could
have been cleaned up when CCPR was removed.

Change-Id: If276a123a1d9ccf7301bf26f65ff3f4fbe97b3e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534521
Reviewed-by: Brian Salomon <bsalomon@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-04-28 19:17:44 +00:00
Herb Derby
8aef5432c8 Make SkNoDrawCanvas not draw slugs instead of assert
Bug: chromium:1320216
Change-Id: I99117a02869ed861cc4b97796789268ccdc192c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534942
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-04-28 18:15:28 +00:00
Eric Boren
82fffb916c [infra] Fix go.sum
I just ran `go mod download`

Change-Id: Ic9b07bfa6da2e0c75e9f2580f8c71f23a361e6de
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535117
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2022-04-28 18:01:34 +00:00
Herb Derby
3444f8344a Combine remaining SubRuns to the final set
Change-Id: Ic31eb4d5e138bdeb0adb266f196ddbfd915a2d7b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534196
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-04-28 17:46:37 +00:00
Kevin Lubick
62f57a02b3 [includes] Enforce IWYU on src/utils
Client changes:
 - cl/443664347
 - cl/444232853
 - http://ag/17915718
 - http://ag/17913178
 - https://crrev.com/c/3602239

Change-Id: I16bcdbbe2b13bbf52f007b0f131e9ee0c14ed237
Bug: skia:13052
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532257
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-04-28 17:32:20 +00:00
skia-autoroll
84b0178e3e Roll vulkan-deps from 1963b94c99e8 to 62a883c73abb (2 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/1963b94c99e8..62a883c73abb

Also rolling transitive DEPS:
  https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Cross from c52333b984c5 to 6ae7ddb92a24

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

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

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn;skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE
Bug: None
Tbr: bsalomon@google.com
Change-Id: Idd5faa67ac5aecab14b8fd493dea275df6b6d025
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535058
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-28 16:11:31 +00:00
skia-autoroll
326a57f5f0 Roll SK Tool from b85ff320de08 to c65e91812e6c
https://skia.googlesource.com/buildbot.git/+log/b85ff320de08..c65e91812e6c

2022-04-28 jcgregorio@google.com [compui] Don't run swarming on comp-ui machines.
2022-04-27 rmistry@google.com Fix audit issues
2022-04-27 borenet@google.com [bcid] Add "secrets" CLI tool and go/secret package

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

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

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Tbr: borenet@google.com
Change-Id: Ia8ff4115b3178f51c41b56a5ef2c5abaf2264878
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535057
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-28 15:57:47 +00:00
Jim Van Verth
07aafcf5c9 [graphite] Move more shared types into AtlasTypes.
Bug: skia:13118
Change-Id: Ibfcc8df522a87f8ddf6e185121c0844d453b2012
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534139
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2022-04-28 15:37:59 +00:00
Michael Ludwig
5ce8f07271 Try to normalize tangents more robustly in stroke tessellators
I noticed the old version of cosine_between_vectors was causing issues
after https://skia-review.googlesource.com/c/skia/+/532014 landed, which
had the effect that tan0 and tan1 tended to be larger for lines.

That said, I could find instances of the same visual glitches on other
devices before that change landed, so depending on the hardware we were
running into issues either way.

This changes the cosine function to assume the tangents are already
normalized, and restructures the curve evaluation logic to assume that
as well. This is a reduction in work that hopefully makes up for the
work of always normalizing tan0 and tan1, whereas before the cosine_
function attempted to avoid that, and do a single inversesqrt call.

From a precision standpoint, just switching to calling normalize() on
tan0 and tan1 before getting the cosine improves the problem compared
to the precision required to store (dot(tan0,tan0)*dot(tan1,tan1))
before normalization. However, I also added some additional logic for
when coordinates get very large to try and scale the two end points of
the line to a more normalized exponent range. Since it returns the unit
vector, it should be equivalent but more accurate.

Bug: skia:11268, skia:12703, skia:13056
Change-Id: I34b6e1df1f57a8913443d75ed78710fcd27731e6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532777
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-04-28 15:13:35 +00:00
John Stiles
d663bdb900 Replace bytewise copy loop with memcpy.
Using memcpy gives the optimizer more latitude to do smart things.
SkStrAppendU64 already had memcpy here; I just copy-pasted the code
over from there.

Change-Id: Id63881122acf544cb4457e708438ffb14479abdc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534938
Reviewed-by: Ben Wagner <bungeman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-28 15:04:55 +00:00
Robert Phillips
8c11cb04a2 [graphite] Remove all ParamParamKey data payloads
I had left these in as examples but we want to minimize data payloads.

Bug: skia:12701
Change-Id: I1fc6b882b9be98fe1c2ff6421a647116dbd431c0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532764
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-04-28 14:58:04 +00:00
Kevin Lubick
437eb76421 [infra] Regenerate tasks
Change-Id: I5f965ea46c16c9cc57ef4cce27ffa6cf726dd8e5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534939
Reviewed-by: Ravi Mistry <rmistry@google.com>
2022-04-28 14:43:39 +00:00
Michael Ludwig
607eb39b6f Delete HW stroke tessellator variant
Bug: skia:13263
Change-Id: I9bacd0551c0f6a2fd56ee9e0a961228642595426
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534199
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
2022-04-28 14:08:45 +00:00
Robert Phillips
0326a9f27a Move skgpu::graphite::Mask to SkEnumBitMask
This will let us use this utility everywhere.

Bug: skia:12701
Change-Id: I9342d0b40a81789ed93e3ec4009e5602033d6691
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534662
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-04-28 14:04:16 +00:00