Commit Graph

60004 Commits

Author SHA1 Message Date
Jim Van Verth
42f710f3fa Reland "[graphite] Move Graphite into Skia base directories."
This is a reland of commit ae5e846047

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: Ia575fd49206ad0b665a6a9153317e738bb321446
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529059
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-04-11 18:37:20 +00:00
Arman Uguray
5d594e4af4 [sksl][wgsl] Enable WGSL codegen in skslc
* Wire up the WGSLCodeGenerator to SkSLCompiler.
* Wire up build rules to generate WGSL from unit tests.
* Include HelloWorld.sksl as the first complete program.

Bug: skia:13092
Change-Id: I283cf5971b6856126b9fc23340afacff5cc54697
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526760
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
2022-04-11 18:32:46 +00:00
Robert Phillips
d8e15701e1 [graphite] Add UniformExpectationsValidator
Bug: skia:12701
Change-Id: Iaac8b6fd0f2d9d1f8d5771f8204047a9127184c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528041
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-04-11 17:46:57 +00:00
John Stiles
471fd2eb09 Revert "[sksl] Make sksl tracing optional"
This reverts commit 6bc4bdf645.

Reason for revert: Android roll

Original change's description:
> [sksl] Make sksl tracing optional
>
> This removes the required dependency on our JSON code. In the Bazel
> rules, this dependency is pushed down into sksl instead of required
> by the cc_binary rules.
>
> It adds a stub version of SkVMDebugTrace.cpp and removes
> SkVMDebugTracePlayer unless the appropriate GN or Bazel flag
> is set (skia_enable_sksl_tracing and enable_sksl_tracing,
> respectively). There was an existing #define that CanvasKit
> used (CK_INCLUDE_SKSL_TRACE) and this was changed to
> SKSL_ENABLE_TRACING.
>
> Users of //:skia_core no longer need to specify a JSON dep,
> if sksl needs it (e.g. for tracing), then it will specify
> the dependency.
>
> Change-Id: I2fcd29cde118fc391c269ba2d8f8a40a6f164c99
> Bug: skia:12541
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528837
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: Kevin Lubick <kjlubick@google.com>

Bug: skia:12541
Change-Id: Icf75495f19e409d96925ca4dca9e839eca4057ec
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529129
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-04-11 17:42:17 +00:00
John Stiles
d459e5c70f Revert "[bazel] Unify boolean flags to be enable*"
This reverts commit 02986aed2a.

Reason for revert: Android roll

Original change's description:
> [bazel] Unify boolean flags to be enable*
>
> I think they read better when it is enable_foo. I have to
> do less double-negation in my head if they are set to false
> then.
>
> Change-Id: I53bc5575c11d489029904965d991abc5a9d0fd89
> Bug: skia:12541
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528838
> Reviewed-by: Ben Wagner <bungeman@google.com>

Bug: skia:12541
Change-Id: I63f827c41ddc8a149cd190179ad099ff8671579a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529128
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-04-11 17:41:29 +00:00
Kevin Lubick
02986aed2a [bazel] Unify boolean flags to be enable*
I think they read better when it is enable_foo. I have to
do less double-negation in my head if they are set to false
then.

Change-Id: I53bc5575c11d489029904965d991abc5a9d0fd89
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528838
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-04-11 15:48:39 +00:00
Kevin Lubick
6bc4bdf645 [sksl] Make sksl tracing optional
This removes the required dependency on our JSON code. In the Bazel
rules, this dependency is pushed down into sksl instead of required
by the cc_binary rules.

It adds a stub version of SkVMDebugTrace.cpp and removes
SkVMDebugTracePlayer unless the appropriate GN or Bazel flag
is set (skia_enable_sksl_tracing and enable_sksl_tracing,
respectively). There was an existing #define that CanvasKit
used (CK_INCLUDE_SKSL_TRACE) and this was changed to
SKSL_ENABLE_TRACING.

Users of //:skia_core no longer need to specify a JSON dep,
if sksl needs it (e.g. for tracing), then it will specify
the dependency.

Change-Id: I2fcd29cde118fc391c269ba2d8f8a40a6f164c99
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528837
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-04-11 15:22:41 +00:00
Michael Ludwig
b1be53d4b3 [graphite] Track draw usage per clip element
Bug: skia:12698
Change-Id: I326a4bc34fde675e9fc7ad7835558ce6f307d268
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527842
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-04-11 15:20:06 +00:00
Joe Gregorio
7216659f71 Add RTX3060 Win10 jobs.
Change-Id: I007c6e45eaa2d9a8e091f9b1ee235af26c938581
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/521840
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
2022-04-11 15:09:11 +00:00
John Stiles
44409c070a Distinguish between unscoped blocks and compound statements.
Previously, we used unscoped blocks for two similar functions:
- Rewrite one statement as two simpler statements:
  `int a, b;` -> `int a; int b;`
- Group together multiple statements without braces. e.g. the inliner
  uses unscoped Blocks to rearrange statements.

Conceptually, these are different from the debugger's perspective. The
compound statements should be treated as one unit; the grouped
statements should be treated individually (and the enclosing Block
should be ignored). A Block now contains a BlockKind enum to
distinguish between these cases.

Change-Id: Ie14a570bb46992689fb96b8fd3b67f2ca6e5239f
Bug: skia:13189
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528655
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-11 14:34:07 +00:00
John Stiles
0b6e91f51e Add tests for debugging nested blocks and switch statements.
Change-Id: If3d7e222023efb957eba66adc1f9ca601c2ffd67
Bug: skia:13189
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528916
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-04-11 14:34:07 +00:00
Aditya Kushwah
b79b801c50 Plumbing label string through GrSurfaceProxy.
This CL defines a const label string in GrSurfaceProxy and have the
constructors accept it. The label string is then plumbed through the
system for other components to accept it.

Bug: chromium:1164111
Change-Id: I5a7f7708707e3d486eb1f8931db4c49afba5a33b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525236
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-04-11 14:29:33 +00:00
skia-autoroll
9abf676368 Roll ANGLE from 3cea7fcc01ce to 1b94c585682b (6 revisions)
3cea7fcc01..1b94c58568

2022-04-10 jmadill@chromium.org Revert "Vulkan: Switch loader to new driver files env var."
2022-04-09 bsheedy@chromium.org Fix pointer sscanf for ChromeOS
2022-04-08 penghuang@chromium.org Fix crashes in gl::VertexArray::detachBuffer() and onDestory()
2022-04-08 jmadill@chromium.org Vulkan: Fix descriptorSet perf counter values.
2022-04-08 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from d09282e5c609 to d15c42482560 (2 revisions)
2022-04-08 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 64472fba3112 to a01c0c749d0a (448 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 armansito@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: armansito@google.com
Change-Id: I1d3cf63020e7ec89063bb84a0e5b6c1cdc14f82f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529017
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-11 05:24:38 +00:00
skia-autoroll
755b945ea3 Roll Chromium from 4938e2e781e3 to 4064ec2bcf25 (609 revisions)
4938e2e781..4064ec2bcf

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 armansito@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: armansito@google.com
Change-Id: Idfe4263c4761e27dbc1df07fa9dbca1371c381ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529018
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-11 04:53:37 +00:00
skia-autoroll
2c4f5f24d6 Roll SK Tool from c0cf9855d48e to f1ae235a9cc8
https://skia.googlesource.com/buildbot.git/+log/c0cf9855d48e..f1ae235a9cc8

2022-04-10 skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com Update CIPD Packages

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 erikrose@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: erikrose@google.com
Change-Id: Id90abe553bb78243a122abc16c403bccc99d56f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529016
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-11 04:25:06 +00:00
skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com
1a668363fd Update SKP version
Automatic commit by the RecreateSKPs bot.

Change-Id: I8d0d2a82b3b60d674b9c339af6fa7b1a0f1a380e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528957
Commit-Queue: skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Bot-Commit: skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2022-04-10 08:23:09 +00:00
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