Commit Graph

59988 Commits

Author SHA1 Message Date
Jim Van Verth
ab4d4ae9e2 Revert "[graphite] Move Graphite into Skia base directories."
This reverts commit ae5e846047.

Reason for revert: Breaking Google3

Original change's description:
> [graphite] Move Graphite into Skia base directories.
>
> Change-Id: Ie0fb74f3766a8b33387c145bd1151344c25808cb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528708
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

Change-Id: Ia57992a22c42b17216b40fd29452865f957fb802
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528653
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-04-09 01:02:26 +00:00
Arman Uguray
6b6015ff79 [sksl][wgsl] Function pipeline input/output injection
Pipeline stage inputs and outputs are not declared in global-scope but
rather as a parameter/return of the program entry point function. Thus
that references any one of these parameters must obtain them via a
function argument.

* All references to pipeline input/output variables are resolved as the
first codegen step. All functions that either reference or call a
function that directly or indirectly references such a variable gets
synthesized input/output parameters.

* Pipeline stage outputs are passed via pointer to allow mutation by
subroutines.

* If the main function requires the SK_MAINCOORDS_BUILTIN, we now make
sure that sk_FragCoords is declared, even if not directly referenced by
code.

Bug: skia:13092
Change-Id: Ie538566a074e8cc9ce8594946a56d311ac5e7270
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526759
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
2022-04-08 21:05:10 +00:00
Herb Derby
8bea0504d9 check the mask type is in range
I tried fixing this before, but still had UB because I assigned
the value to the enum before checking the range. Check the range
before assigning the value to the enum.

Bug: oss-fuzz:46251

Change-Id: I7d58d67063896645d7a38453eab1c20b8489afaf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528881
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-04-08 20:49:58 +00:00
Jim Van Verth
ae5e846047 [graphite] Move Graphite into Skia base directories.
Change-Id: Ie0fb74f3766a8b33387c145bd1151344c25808cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528708
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-04-08 20:46:40 +00:00
Greg Daniel
3680698e9f Add basic Vulkan setup and draw example program.
Change-Id: Ib3ff7d6f67e5c6389da5c0b640bd2396d7615501
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527506
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-04-08 18:26:21 +00:00
Ethan Nicholas
885c1d3048 Removed Position::Capture
It was decided that being able to report positions from C++ code is not
worth the cost of having all of these captures everywhere.

Change-Id: I94981d9f780bd95df8b56198210c9cdd5f16239c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528366
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-04-08 17:26:24 +00:00
Kevin Lubick
a9f6ceebed [bazel] Add executable for skslc
This ports the GN skia_executable [1] and adds third_party
Bazel rules for spirv_cross, translated from [2]. spirv_cross,
unlike spirv_tools, did not have pre-made Bazel rules.

This binary compiles and links with

    bazelisk build //tools/skslc --config=clang

[1] ad324a31e6/BUILD.gn (L712)
[2] ad324a31e6/third_party/spirv-cross/BUILD.gn (L10)

Change-Id: I4abd51889552153fc7e64a5f7f3d9f0f597524e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528044
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-04-08 17:25:24 +00:00
Kevin Lubick
7c18d94692 [infra] Update dep of infra repo
We need to pick up changes to gazelle
https://skia-review.googlesource.com/c/buildbot/+/528697

$ go get go.skia.org/infra@dc0abbc759
$ go mod download
$ make -C infra/bots train
$ make -C bazel gazelle_update_repo
$ make -C bazel generate

The last step was just to make sure no current BUILD.bazel
files changed as a result of updating Gazelle (they did not)

Change-Id: I01b009cdc9af850cebf4f5632a6bd7e371d1a6e4
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528816
Reviewed-by: Ravi Mistry <rmistry@google.com>
2022-04-08 17:25:24 +00:00
skia-autoroll
153294e7cb Roll SK Tool from cf1c3632ad54 to c0cf9855d48e
https://skia.googlesource.com/buildbot.git/+log/cf1c3632ad54..c0cf9855d48e

2022-04-08 jcgregorio@google.com Remove auth.NewDefaultLegacyTokenSource and auth.NewLegacyTokenSource.
2022-04-08 kjlubick@google.com [gazelle] Add support for absolute labels

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 jcgregorio@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: jcgregorio@google.com
Change-Id: I89e2788ed8fd79d13266d5bbfaaeb70f96040a87
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528797
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-08 15:44:37 +00:00
Ben Wagner
4a21a5a5bb Avoid calling longjmp with arm64 ASAN.
Bug: skia:13155
Change-Id: Ic3666d2b3cb2b1911551e47e2d42331228482000
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528596
Auto-Submit: Ben Wagner <bungeman@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2022-04-08 15:01:55 +00:00
Julia Lavrova
55c56abac3 Simplify the most commont paint case
Change-Id: Ie6efa0cdcf682ad7ea5c1d4ca6232af6224a68f4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527282
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2022-04-08 14:20:38 +00:00
Kevin Lubick
9b7db63e6f [bazel] Sketch out changes for Mac toolchain
Change-Id: Idae84d8d9538012e5cfb75a1a477dbc72a4da5bc
Bug: skia:13125
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526264
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2022-04-08 13:35:44 +00:00
John Stiles
1a5a320547 Use writeComposite to build uniform matrices.
`writeComposite` can write and deduplicate constants, so it's preferable
to manually emitting an OpCompositeConstruct opcode.

Change-Id: I0c4ac8f8a456c8561c0b6a90cd316934f20895e8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528638
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-08 13:18:20 +00:00
John Stiles
89bdf0f872 Use writeComposite to vectorize scalars.
`writeComposite` can write and deduplicate constants, so it's preferable
to manually emitting an OpCompositeConstruct opcode.

Change-Id: Ie5c23af76822da762eadac8ff0ab0c6cc0febd31
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528637
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-08 13:17:26 +00:00
John Stiles
699dd5ae4a Replace composite vectors of literals with OpConstantComposite.
Some GPUs (Adrenos in particular) perform noticeably better when we
use OpConstantComposite instead of OpCompositeConstruct. This also gives
us some deduplication of redundant ops.

Change-Id: I53b7a3e1cf61e51647a661a08ff4c7b53ee60f10
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528636
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-04-08 12:54:51 +00:00
Kevin Lubick
c002866c71 [infra] Avoid timeouts in CreateDockerImage_Skia_WASM_Release
Change-Id: Ia167a4ed2697374d140d989134ec6ac66b01f023
Bug: skia:13128
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528696
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2022-04-08 12:26:54 +00:00
Florin Malita
bac12aa8be Fix public.bzl formatting
Change-Id: I62877dc18c4895624eb6ffc2756f45a287fc008a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528698
Commit-Queue: Florin Malita <fmalita@chromium.org>
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2022-04-08 12:23:07 +00:00
skia-autoroll
2672fa0f93 Roll ANGLE from 7a9856f672c0 to 3cea7fcc01ce (9 revisions)
7a9856f672..3cea7fcc01

2022-04-07 abdolrashidi@google.com Split Context ResourceUseList to RP Commandbuffers
2022-04-07 gman@chromium.org Metal: Remove Unused IOSurface code
2022-04-07 jmadill@chromium.org Vulkan: Switch loader to new driver files env var.
2022-04-07 syoussefi@chromium.org Vulkan: Fix invalidation of non-existing aspects
2022-04-07 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from d3cc7d7ac0c3 to d09282e5c609 (6 revisions)
2022-04-07 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 6f6eb80eab19 to 64472fba3112 (509 revisions)
2022-04-07 kkinnunen@apple.com Support ANGLE_PREFERRED_DEVICE on CGL
2022-04-07 jmadill@chromium.org Update perf tests arguments.
2022-04-07 senorblanco@chromium.org D3D: remove NV GetDimensions() workaround for image load/store.

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 djsollen@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: djsollen@google.com
Change-Id: I4f9c742624c5d0edd28c00ae19f6f35cdd490697
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528657
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-08 05:25:09 +00:00
skia-autoroll
734d6007a1 Roll Chromium from 0562ac6ce66f to 4938e2e781e3 (490 revisions)
0562ac6ce6..4938e2e781

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 djsollen@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: djsollen@google.com
Change-Id: I1e63d76724d7f100a5842a143a368c6e8a108176
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528656
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-08 05:09:42 +00:00
skia-autoroll
afd54aaeda Roll SwiftShader from d09282e5c609 to d15c42482560 (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/d09282e5c609..d15c42482560

2022-04-07 cwallez@google.com VkImage::copy remove the isEntireRow/Slice optimizations
2022-04-07 swiftshader.regress@gmail.com Regres: Update test lists @ d09282e5

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 djsollen@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: djsollen@google.com
Change-Id: I2335a489eee2485daefdaa41f537a551d9a65317
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528659
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-08 04:48:43 +00:00
Jim Van Verth
3871479bdb [graphite] Move all graphite classes under skgpu::graphite.
Change-Id: I484067cb1f6025dc9e6770c51c99bfc2c5925652
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528365
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-04-08 00:42:37 +00:00
John Stiles
9ef12d72cf Optimize saturation code again.
This adopts a trick from SkVM to avoid sorting entirely.

Change-Id: I586c8a3613b48241842a7d8eba1c9d68a4717f83
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528368
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-04-07 21:36:07 +00:00
Florin Malita
b1ea9a1a9d Export EGL sources/headers in public.bzl
Change-Id: If34725d63f60c2128faf68e38f1b329a54ac2bbe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528367
Commit-Queue: Florin Malita <fmalita@chromium.org>
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-04-07 21:12:44 +00:00
Greg Daniel
719239cd69 Move all Ganesh source files into ganesh subdirectory.
Change-Id: I238d29ba0250224fa593845ae65192653f58faff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528156
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-04-07 21:06:50 +00:00
Ethan Nicholas
f125d4e7a0 Improved SkSL Block and Do position tracking
Blocks did not previously track their position, creating problems
reporting some errors (which will be improved in followup CLs). Fixing
block positions changed the reporting of do loop errors, requiring do
loop position tracking to be updated as part of this change.

Change-Id: I3bd048a62d912914edf679f42607de1b5eafc2b9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528045
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-04-07 21:03:19 +00:00
Kevin Lubick
503a2bd982 Update Skia to use the new combined Dawn+Tint repo
Includes a manual roll of Dawn, as well as tweaks to the Tint build
overrides.

Dawn needs git in order to generate a header that has the
version of Dawn compiled in. If we use Dawn's GN rules to
build it, we need git to generate that file.

Our (now updated) Bazel rules to build Dawn do not need to
do this because we (Skia) do not use this file [1]

[1] https://dawn.googlesource.com/dawn/+/088a600b03679cd20991f145173a573ed9c03480/src/dawn/common/BUILD.gn#177

Change-Id: Id19fdbb9b53fdad2397a0044a4a314b1444faeb0
Cq-Include-Trybots: luci.skia.skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn,Build-Win-Clang-x86_64-Release-Dawn
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528157
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-04-07 20:31:14 +00:00
John Stiles
442a5d9365 Reduce complexity in set-color-saturation.
Caveat: on my machine, Nanobench doesn't detect any change (pro or con)
on this CL.

I'm working under the assumption that function calls have a non-zero
cost--they may be inlined (bloating code size), or not (incurring the
costs of a function call, register push/popping, etc). This CL avoids
making six calls to $blend_set_color_saturation by using two half3
variables. These half3s are used to swizzle the result--they contain two
zeros and a one, so multiplying them by a scalar will put the result in
the desired component. I've also made some very minor simplifications to
the math that were made possible by reordering.

Change-Id: I0c1ef88d165365376078846324be8bb723548512
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528043
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-04-07 20:17:34 +00:00
Brian Osman
1843bee81d Reland "Set GN's script_executable to "python3""
This is a reland of commit 6f0d2bf494

Includes a fix for iOS codesigning script to be python3 compatible.

Original change's description:
> Set GN's script_executable to "python3"
>
> In some environments, GN would end up running scripts with python2.
> This change requires that python3 be in the path, but is the safest
> way to guarantee that all scripts are run correctly.
>
> Change-Id: Ifc2601ff9c9f3705ac7f1057a26a87a61211ff67
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528337
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

Change-Id: I785909f3c7d51d6fd1c90114d01f114be76981f2
Cq-Include-Trybots: luci.skia.skia.primary:Build-Mac-Clang-arm64-Debug-iOS
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528441
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-04-07 20:11:27 +00:00
Kevin Lubick
d3d0ee3dc2 [debugger] Fix missing audit trails
Change-Id: I337aebf72715339ec0280bab0916968ccbe7f481
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528516
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-04-07 19:52:09 +00:00
John Stiles
8397365524 Optimize away same-value ternaries.
A ternary of the form `anything ? value : value` can be reduced to a
comma-expression of the form `anything, value`. This seems like a rare
case in real code, but it's easy enough to detect with our existing
toolbox.

The `anything` test-expression will be eliminated from the expression
if it has no side effects, using our existing constant-folding rules
for the comma expression.

Change-Id: I1285b04cd6a08f1bed614aa1aa6f37ea2447de91
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528439
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-07 19:37:00 +00:00
John Stiles
b617bced6e Use OpConstantComposite when vectorizing in SPIR-V.
Previously, when we vectorized scalars, we would not place them in the
constant buffer, so we could emit simple vectors like (0,0,0) or (1,1,1)
more than once. Now, we use `writeConstructorSplat` to vectorize, which
knows how to write constants.

Change-Id: Ic97c0ce5415fd46ff8c7fb7dac9205844633ef3a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527921
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-04-07 18:28:18 +00:00
Ben Wagner
43ac2e3740 Don't use destroyed values in SkArenaAllocWithReset
Found with `MSAN_OPTIONS=poison_in_dtor=1`. Avoid using fields after
`this` has been destroyed.

Change-Id: I3a772ca053c03520268a7e0328402365b5592c40
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528438
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-04-07 16:56:40 +00:00
Arman Uguray
f3bf819705 This is a reland of commit f379b259a5
GCC warnings caused by missing integer cast from enum class in format
specifier have been fixed.

Original change's description:
> [sksl][wgsl] Implement codegen for simplest complete program
>
> - Implemented much of the statement/expression/program-element
>   parsing/dispatch boilerplate with support for only those expressions
>   that are necessary to successfully compile shared/HelloWorld.sksl
>
> - Implemented functions and fragment/vertex program entry points
>
> Most of the code for HelloWorld.sksl is now generated, however the
> output program is still missing a correct propagation of varying stage
> inputs and output parameters to subroutines.
>
> Bug: skia:13092
> Change-Id: Ic51af5a041761f58234d45e3746206ed080e0910
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526758
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: Arman Uguray <armansito@google.com>

Bug: skia:13092
Change-Id: I414f0e8b9bd95bd1a74a9a9eb5ae08fbac13fcae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528436
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
2022-04-07 16:46:07 +00:00
Jim Van Verth
5200b52fd5 [graphite] Rename Metal classes to skgpu::graphite::Mtl<Class>
Change-Id: I76a01cf18583fab619459f258119b780ff978be5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527840
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-04-07 16:21:32 +00:00
Brian Osman
df277b9737 Revert "Set GN's script_executable to "python3""
This reverts commit 6f0d2bf494.

Reason for revert: iOS code signing still requires python2

Original change's description:
> Set GN's script_executable to "python3"
>
> In some environments, GN would end up running scripts with python2.
> This change requires that python3 be in the path, but is the safest
> way to guarantee that all scripts are run correctly.
>
> Change-Id: Ifc2601ff9c9f3705ac7f1057a26a87a61211ff67
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528337
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

Change-Id: I0cd53a48da3a0782803cf6cb1f877376462b2df4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528437
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-04-07 16:15:00 +00:00
Brian Osman
6f0d2bf494 Set GN's script_executable to "python3"
In some environments, GN would end up running scripts with python2.
This change requires that python3 be in the path, but is the safest
way to guarantee that all scripts are run correctly.

Change-Id: Ifc2601ff9c9f3705ac7f1057a26a87a61211ff67
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528337
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-04-07 15:23:30 +00:00
Florin Malita
ad324a31e6 [skottie] Remove legacy whitespace guard
No longer used.

Change-Id: Id68a8d4340bc685c938ab22619f2b4067b3f9206
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528163
Commit-Queue: Florin Malita <fmalita@chromium.org>
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2022-04-07 15:06:48 +00:00
Kevin Lubick
eabed6ac67 [infra] Update GCC Docker images to have Python3
Change-Id: I870cc04f9b45a77caa39b0996420fec622a79cf5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528336
Reviewed-by: Brian Osman <brianosman@google.com>
2022-04-07 13:54:52 +00:00
John Stiles
541bfa05b5 Replace mix with ternaries in blend_overlay.
Using mix() reduced precision in the HSLC blend code, even when the
lerp value was always 0 or 1. Out of an abundance of caution, replacing
mix() here with ternaries as well.

Change-Id: I07d8270f9d4982dce88f0df3ec291d188aa07733
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528162
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-04-07 13:39:08 +00:00
John Stiles
c71922cd88 Reduce color fringes on blend_hue and blend_saturation.
Today I learned that `mix(a, b, 1)` can reduce precision. Ternaries do
not suffer from this problem.

Change-Id: I58814d00193ccbff53960030d163d31c49234f6c
Bug: skia:9320
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528161
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-04-07 13:39:08 +00:00
John Stiles
d43a882ac3 Simplify control flow in blend_set_color_luminance.
The inliner can do a better job with functions that only have a single
return by eliding a temp variable. In this case, it was simple to adapt.

Change-Id: I9a5ee26cf546db1b2647cdf95d4cdba6649ea19b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528160
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-04-07 13:39:08 +00:00
John Stiles
0043e8c240 Remove dehydration powers from skslc.
`sksl-precompile` is now exclusively in charge of dehydration.

Change-Id: I8b21c2ab5cbef9c8d963060e8e6499ee6289d10a
Bug: skia:13164
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528159
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-07 13:33:47 +00:00
Ethan Nicholas
cb13c892af Added range highlighting to SkSL error reports
SkSL errors now identify the specific range of code they are describing,
rather than just the line number.

Change-Id: Ifabb3148476f9b4cd8e532f23e5b38e1cf33a87e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528039
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-04-07 13:29:48 +00:00
Eric Boren
b019e94c44 [infra] Remove UpdateGoDeps
Bug: skia:10389
Change-Id: Ie2cbca0663227815ceca8734737515228376c8d0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528036
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2022-04-07 13:28:34 +00:00
Derek Sollenberger
9f3c6bce48 Revert "[sksl][wgsl] Implement codegen for simplest complete program"
This reverts commit f379b259a5.

Reason for revert: breaking the linux GCC x86 and x86_64 builders

Original change's description:
> [sksl][wgsl] Implement codegen for simplest complete program
>
> - Implemented much of the statement/expression/program-element
>   parsing/dispatch boilerplate with support for only those expressions
>   that are necessary to successfully compile shared/HelloWorld.sksl
>
> - Implemented functions and fragment/vertex program entry points
>
> Most of the code for HelloWorld.sksl is now generated, however the
> output program is still missing a correct propagation of varying stage
> inputs and output parameters to subroutines.
>
> Bug: skia:13092
> Change-Id: Ic51af5a041761f58234d45e3746206ed080e0910
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526758
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: Arman Uguray <armansito@google.com>

Bug: skia:13092
Change-Id: Ib92f8637acf011fd7c9274a906dcb43952b881e4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528298
Auto-Submit: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-04-07 13:08:21 +00:00
Kevin Lubick
f0fdce0b42 [includes] Add pragma for SkTypes.h
IWYU doesn't always understand that we want defines to come from
certain files, so we add a pragma to force it.

This also adds an extra entry to known_good_builds so I don't miss
this type of thing again when building locally.

Change-Id: I2321ea95edfc6a4506d51a011983965eb9bdf1c0
Bug: skia:13052
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528164
Reviewed-by: John Stiles <johnstiles@google.com>
Owners-Override: Kevin Lubick <kjlubick@google.com>
2022-04-07 13:04:14 +00:00
skia-autoroll
56b10759be Roll ANGLE from 366f60116e94 to 7a9856f672c0 (8 revisions)
366f60116e..7a9856f672

2022-04-07 ynovikov@chromium.org Report durations of all flaky retries in JSON test output
2022-04-06 nazabris@microsoft.com GL: Unbind textures from FBO after calls to frameBufferTexture2D
2022-04-06 cnorthrop@google.com Update validation of glFramebufferTextureLayer for cube maps
2022-04-06 cnorthrop@google.com Tests: Add Aztec Ruins High trace
2022-04-06 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 1b159f6cdecb to d3cc7d7ac0c3 (1 revision)
2022-04-06 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 3c01a5c3bc2f to 6f6eb80eab19 (52 revisions)
2022-04-06 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from c32f123be7eb to 3c01a5c3bc2f (107 revisions)
2022-04-06 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from f39b4372b8a8 to c32f123be7eb (777 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 djsollen@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: djsollen@google.com
Test: Test: DrawBuffersTestES3.CubeMapArrayTextures
Test: Test: DrawBuffersTestES3.CubeMapTextures
Test: Test: angle_perftests --gtest_filter="*aztec_ruins_high*"
Change-Id: I9afdb8c653204db683a1f462726f5eb01fd34ab8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528123
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-07 08:16:06 +00:00
skia-autoroll
e4d4c9362b Roll SwiftShader from d3cc7d7ac0c3 to d09282e5c609 (6 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/d3cc7d7ac0c3..d09282e5c609

2022-04-07 sugoi@google.com Temporarily fix failing dEQP tests
2022-04-06 sugoi@google.com Update Vulkan headers to version 1.3.211
2022-04-06 sugoi@google.com Fix reading 0 sized scissor array
2022-04-06 capn@google.com Only build WSI support for XCB surfaces when xcb.h is found
2022-04-06 capn@google.com Use 'discard' to denote terminated or demoted invocations
2022-04-06 swiftshader.regress@gmail.com Regres: Update test lists @ d3cc7d7a

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 djsollen@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: djsollen@google.com
Change-Id: I9651d673fcce82e3fa49e9f175f398fc798a913a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528124
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-07 05:00:42 +00:00
skia-autoroll
2f9daaeb6e Roll Chromium from f51ea03e7c88 to 0562ac6ce66f (453 revisions)
f51ea03e7c..0562ac6ce6

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 djsollen@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: djsollen@google.com
Change-Id: Ib5585c90ed008b3542e93ce3e6fbc9d0d0c6d671
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528122
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-07 04:56:45 +00:00
Arman Uguray
f379b259a5 [sksl][wgsl] Implement codegen for simplest complete program
- Implemented much of the statement/expression/program-element
  parsing/dispatch boilerplate with support for only those expressions
  that are necessary to successfully compile shared/HelloWorld.sksl

- Implemented functions and fragment/vertex program entry points

Most of the code for HelloWorld.sksl is now generated, however the
output program is still missing a correct propagation of varying stage
inputs and output parameters to subroutines.

Bug: skia:13092
Change-Id: Ic51af5a041761f58234d45e3746206ed080e0910
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526758
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
2022-04-06 22:11:11 +00:00