Commit Graph

56741 Commits

Author SHA1 Message Date
Robert Phillips
461c539a04 Move several more PathRenderers to skgpu::v1 namespace
Bug: skia:11837
Change-Id: Ifa1da88aafcaa96e0e885facaeb849cc9963bcfe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439938
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-08-17 22:19:11 +00:00
John Stiles
fdcf153f6c Fix crash when inverse() is passed a constant variable.
Optimization for inverse() uses some custom logic which neglected to
look up the value of a constant variable before assuming it was a
FloatLiteral; our tests were not exercising this case.

Change-Id: Idc8f2cc24f6a8df7234062f5f15e8c39a08457e5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440260
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-08-17 21:11:24 +00:00
John Stiles
bc9222b615 Add caps bit for inverse-hyperbolic support.
HLSL doesn't expose asinh/acosh/atanh intrinsics.

Change-Id: I116728adb9a9643034b962a1af44767782fac775
Bug: skia:12352
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440259
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-08-17 21:06:29 +00:00
John Stiles
39822cf1e6 Add transpose() to public ES3 API.
We don't have compile-time optimization for this intrinsic yet, but
otherwise everything is working as expected.

Change-Id: Id9c678699baa1d9867848459bf680cc40f29b4bd
Bug: skia:12202
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440257
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-08-17 20:57:40 +00:00
John Stiles
7020699e38 Simplify declaration of transpose() built-in.
We can use the generic $squareMat type to replace three declarations
with one, saving a bit of memory. For the non-square versions of
transpose, we need to continue using individual declarations as the
input and output types don't match.

Change-Id: I8b3046dd0eb7d976ba2b62bf04c79dcf14113c90
Bug: skia:12202
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440177
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-08-17 20:47:39 +00:00
John Stiles
5e3c1f4f89 Improve testing of transpose() intrinsic.
This intrinsic uses non-square matrices, so it will be useful in
confirming that we can use ES3 types in sksl_public intrinsics. Bulking
up this test (which we don't run in SkSLTest today) is a good first
step.

Change-Id: I8178f13d5ca376d7cae3d1a4350b2bc0397efb1f
Bug: skia:12348
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440256
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-08-17 20:44:59 +00:00
John Stiles
de8602df95 Enable nonsquare matrix support in Direct3D.
This was accidentally missed in http://review.skia.org/403078.

Change-Id: I0eda81d8225942e1b3dfee4bfcb01ba591b40707
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440258
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2021-08-17 20:26:18 +00:00
Jim Van Verth
1068df7fba Metal: Reduce load ops on clears.
For every clear action we were performing a Clear load action and
then a Load, which is unnecessary. For clears we now create a
RenderCommandEncoder with a Clear load action, and reset the descriptor
to Load for future creation.

Bug: skia:12086
Change-Id: I3dd20a1b251d6683a8d49cc5a034716419becd91
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439941
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2021-08-17 20:22:42 +00:00
Robert Phillips
41ebbd71b1 Move triangulators and tessellators into gpu/geometry
This is the other half of making everything in gpu/ops be v1-only.

Bug: skia:11837
Change-Id: I5d77a499ef02eba69208d5bd634650433d02f6fb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440216
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-08-17 19:25:25 +00:00
Kyle Carlstrom
7609f7f27d Create Vec2ExpressionAnimator
Change-Id: I056eb5ca61c14dd58c2edeadcd122f383094fcb9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439976
Commit-Queue: Kyle Carlstrom <kylecarlstrom@google.com>
Commit-Queue: Avinash Parchuri <aparchur@google.com>
Reviewed-by: Avinash Parchuri <aparchur@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-08-17 18:36:12 +00:00
Michael Ludwig
03f17cd210 Revert "Correctly downgrade per-entry filter/mm local variables"
This reverts commit 628c91302d.

Reason for revert: causing layout test failures?

Original change's description:
> Correctly downgrade per-entry filter/mm local variables
>
> If skia-renderer submitted a non-AA pixel-aligned rect with local coords
> and identical texture domain, but with filter = bilerp, the batch
> ctor would correctly identify that the netFilter could be dropped to NN,
> but never updated the filter local var. Later, this value is used to
> decide if the domain/subset is necessary and since it erroneously thinks
> it's still bilerp, the subset is preserved.
>
> By changing filter to match the downgraded filter quality, these quads
> will automatically become non-AA, non-clamped texture draws, meaning
> that the varying texture coords are passed directly to sample(), so they
> remain in high precision on devices like the Mali 400.
>
> Bug: chromium:1125298
> Change-Id: I79f3d33246b6f897449c2a09015e1eb7a3e968b1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439778
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Auto-Submit: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,michaelludwig@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com

Change-Id: Iec686d90985e73f53a830a09ee675b6b8160ab85
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1125298
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440236
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2021-08-17 18:28:08 +00:00
Leon Scroggins
957ed75731 Revert "Update bots' NDK to r23"
This reverts commit 3bce5d1397.

Reason for revert: Speculative fix for ASAN failures on waterfall

Original change's description:
> Update bots' NDK to r23
>
> Bug: skia:12273
> Bug: skia:10754
>
> The latest version (r23) includes APIs from Android 12. It also allows
> referencing enums and structs even if __ANDROID_API__ is not set to the
> level that included them. This allows code to reference them and use
> dlsym to access the methods. This will ultimately allow Skia (or client
> - in this case Flutter) to use a single build to use the NDK APIs if
> present and fail gracefully if not.
>
> With r23, the Mac version of the NDK is now in a DMG, so rewrite its
> script to properly download, mount, and eject it.
>
> Also update the path to asan_device_setup. (See
> Iae6515b7e78c7660b4fb9fe32fd969ba563c4517.)
>
> Change-Id: I4b2eb4f49a1d45a3c18d2399f6b8006668c310ea
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439336
> Reviewed-by: Eric Boren <borenet@google.com>
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Commit-Queue: Leon Scroggins <scroggo@google.com>

TBR=borenet@google.com,djsollen@google.com,scroggo@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com

Change-Id: I77f803c51cba6672958210b5270b8b4301e12301
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:12273
Bug: skia:10754
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440176
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2021-08-17 17:40:47 +00:00
John Stiles
823c504999 Include non-ES2 numeric types in the root symbol table.
Previously, we hid non-ES2 numeric types from Runtime Effect code by
only including them in the private symbol table. Now, they are present
in the root symbol table, but marked with a new flag that identifies
them as disallowed in ES2.

The IR generator now enforces that strict-ES2 code doesn't contain types
that aren't allowed. This has two benefits:
- Intrinsic functions in sksl_public can now reference these types
- Error reporting is nicer

Change-Id: I32375de4efdcb57b74a8a1692fb2ee315a003336
Bug: skia:12348, skia:11115
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439997
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-08-17 17:36:43 +00:00
John Stiles
fd5068a1ed Add tests for ES3 types embedded in structs and arrays.
Change-Id: I97986c45599274441660d1e947592768960c6d27
Bug: skia:12348
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439949
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-08-17 17:11:47 +00:00
John Stiles
fdde20d3ec Use generation() to detect ES3 support.
Desktop GLSL 1.30 supports the things we currently consider as "ES3
only"--nonsquare matrices, derivatives, and unsigned integers.

Change-Id: I4b5a844cf3aabee6b6d2c562e78859a29efc36fc
Bug: skia:12347
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439937
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-08-17 17:09:50 +00:00
Robert Phillips
17dc658f29 Move Software and Small PathRenderers to skgpu::v1 namespace
Bug: skia:11837
Change-Id: Ia34f1840aaa7360ea9a3ca40fef5cb96b68c6ca3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439781
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-08-17 16:52:47 +00:00
John Stiles
059798f40e Test that Runtime Effects cannot use non-ES2 types.
Surprisingly, we didn't actually have a preexisting test covering this.
Error reporting is lackluster in this CL but will be improved in the
followup.

Change-Id: I0b1cdb5a82f066af6b9d3fd9c39748080c2e18c0
Bug: skia:12348
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439996
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-08-17 15:10:02 +00:00
Brian Salomon
3dbd159d09 Fix a couple Wshadow warnings
Change-Id: I04da5871c668b1ed9ca8db7fdcbfe06a70ee227f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440079
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-08-17 15:09:14 +00:00
Julia Lavrova
c87e9516c3 SkText: refactoring in process
Change-Id: Iac594eeba2e15549a6b2cea2489cf123f7440c79
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438700
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2021-08-17 14:57:15 +00:00
Leon Scroggins III
3bce5d1397 Update bots' NDK to r23
Bug: skia:12273
Bug: skia:10754

The latest version (r23) includes APIs from Android 12. It also allows
referencing enums and structs even if __ANDROID_API__ is not set to the
level that included them. This allows code to reference them and use
dlsym to access the methods. This will ultimately allow Skia (or client
- in this case Flutter) to use a single build to use the NDK APIs if
present and fail gracefully if not.

With r23, the Mac version of the NDK is now in a DMG, so rewrite its
script to properly download, mount, and eject it.

Also update the path to asan_device_setup. (See
Iae6515b7e78c7660b4fb9fe32fd969ba563c4517.)

Change-Id: I4b2eb4f49a1d45a3c18d2399f6b8006668c310ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439336
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2021-08-17 14:44:36 +00:00
Greg Daniel
c26565755d Add additional abanoned checks in read pixels.
The checks for PMUPM conversions can cause us to abanon the context when
work is submitted to the GPU for its tests. So after calling that
function we need to make sure we're still in a valid state.

Bug: chromium:1205797
Change-Id: I652da7fc9bb230fcd141c890d312fce37fc42e22
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439817
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-08-17 14:18:45 +00:00
Brian Salomon
159005a196 Remove legacy GPU dither code
Bug: b/195281495
Change-Id: I76fcbc6997b1abc1b3bc7d662406c86c24b7920e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439939
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-08-17 13:47:47 +00:00
Michael Ludwig
628c91302d Correctly downgrade per-entry filter/mm local variables
If skia-renderer submitted a non-AA pixel-aligned rect with local coords
and identical texture domain, but with filter = bilerp, the batch
ctor would correctly identify that the netFilter could be dropped to NN,
but never updated the filter local var. Later, this value is used to
decide if the domain/subset is necessary and since it erroneously thinks
it's still bilerp, the subset is preserved.

By changing filter to match the downgraded filter quality, these quads
will automatically become non-AA, non-clamped texture draws, meaning
that the varying texture coords are passed directly to sample(), so they
remain in high precision on devices like the Mali 400.

Bug: chromium:1125298
Change-Id: I79f3d33246b6f897449c2a09015e1eb7a3e968b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439778
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-08-17 13:38:56 +00:00
Robert Phillips
168296b5a2 Reroute SurfaceContext factories through RecordingContextPriv
Bug: skia:11837
Change-Id: Ib00ccc78d6394ad85781dc1de090c2fe0e83c01f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439736
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-08-17 13:36:57 +00:00
John Stiles
4498aa8ac7 Fix rewrite_includes to work in both Python 2 and 3.
This is patterned after http://review.skia.org/439776, but uses the
`six` library for Python 2/3 cross-compatibility.

Change-Id: If64c48c35d86b83c77316bb5536be6e7bd24c967
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439936
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-08-17 11:53:50 +00:00
skia-autoroll
3ed2d0eab2 Roll ANGLE from a835912f83aa to 0be285c6ee72 (2 revisions)
a835912f83..0be285c6ee

2021-08-16 natsu@google.com Vulkan: Flush read RT if color attachment is the read buffer
2021-08-16 gert.wollny@collabora.com Capture/Replay: Force count and length in CaptureShaderSource

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 borenet@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: borenet@google.com
Test: Test: EGLSurfaceTest.BlitBetweenSurfaces/*
Change-Id: I78153f6c192ae6ae8df41cfa046bb2baf6ee5316
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440016
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-08-17 05:26:14 +00:00
skia-autoroll
9c790c5cb7 Roll SwiftShader from 526b987888fb to 803ceb58c92c (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/526b987888fb..803ceb58c92c

2021-08-16 sugoi@google.com Xcb: Check if geom is valid before using it
2021-08-16 capn@google.com Fix integer overflow in vertex buffer access robustness check

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 borenet@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: borenet@google.com
Change-Id: I1f421671aac30b94b6129f9569b5013c48b1b0e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440018
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-08-17 05:24:17 +00:00
skia-autoroll
f828f54afe Roll Dawn from 0becd0585721 to e7e8d5c48611 (3 revisions)
https://dawn.googlesource.com/dawn.git/+log/0becd0585721..e7e8d5c48611

2021-08-16 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 06c86a551ed6 to 91181b906f3b (1 revision)
2021-08-16 bajones@chromium.org Remove deprecated depth texture sampling path
2021-08-16 cwallez@chromium.org Fix CMake build on macOS

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from 06c86a551ed6 to 91181b906f3b

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

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/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-Debug-Dawn
Bug: None
Tbr: jrprice@google.com
Change-Id: I152c940004eb1b645d5c66f211995ae77ddbb7cf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440017
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-08-17 05:17:45 +00:00
Brian Osman
9ded59bbad Revert "Update rewrite_includes.py for python3"
This reverts commit bd40fb55bb.

Reason for revert: I give up.

Original change's description:
> Update rewrite_includes.py for python3
>
> Change-Id: Ib1b6f8c17554f8121bd2351b5b214e1b2a79f758
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439776
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

TBR=kjlubick@google.com,brianosman@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com

Change-Id: I6be08249f805cce00d35e28e457fe5628b447629
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439940
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-08-16 21:31:04 +00:00
Kevin Lubick
7f7b6ab276 [infra] Update PRESUBMIT.py to run under Python3
No real changes, unlike https://skia-review.googlesource.com/c/buildbot/+/439856/

Change-Id: I9b83cc0d1ee207fad0747c663469b4bae61b2049
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439780
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2021-08-16 20:00:46 +00:00
Brian Osman
bd40fb55bb Update rewrite_includes.py for python3
Change-Id: Ib1b6f8c17554f8121bd2351b5b214e1b2a79f758
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439776
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-08-16 19:07:20 +00:00
John Stiles
7d99ba2503 Enable variable-shadow warnings.
This will prevent us from reusing a variable name from an outer scope
within an inner scope; this is a common source of confusion or bugs.
There are two special cases where shadowing is still allowed.

- Constructor arguments that match class member variables, e.g.:

    MyCtor(int value) : value(value) {}

- Lambdas where the outside variable is not accessible in the inner
  scope, e.g.:

    void Fn(int x) {
        auto lambda = [] { int x = 123; };  /* outer x not captured */
    }

Change-Id: I073bdaf7c530fc958fc13ce68464cf345a2f5358
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439497
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-08-16 18:06:06 +00:00
John Stiles
13c9f6690e Fix additional cases of variable shadowing.
These changes will allow us to enable shadowed-variable warnings.

Change-Id: I24ee7e198c1c77b58836237c37557c00452680e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439476
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-08-16 17:47:14 +00:00
Ben Wagner
7f4abe85a6 Extract parse_space_separated_languages
A bit too much logic in an attribute switch case which can be given a
better name. This function remains specialized until such time as it may
need to be generalized.

Change-Id: Idc5f7653cb8706d2c54c23a858b320266d4f989e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439737
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-08-16 16:54:14 +00:00
John Stiles
9a6f3990af Avoid type shadowing warnings in SkVM.
We intend for these types to shadow, but we can avoid getting a warning
by declaring the types in a separate namespace, then explicitly bringing
those different-namespaced types into our function with `using`.

Change-Id: Ie38b6408c2850699f3389d91d8542be255caa51a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439496
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-08-16 15:37:39 +00:00
skia-autoroll
32475751b4 Roll ANGLE from d20afde45f07 to a835912f83aa (3 revisions)
d20afde45f..a835912f83

2021-08-16 jmadill@chromium.org Texture: Mark initialized after syncState.
2021-08-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 4d36e22f8cc6 to 510c98092bc0 (6 revisions)
2021-08-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 30bbd66599a2 to aeae79104c34 (422 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 borenet@google.com,robertphillips@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: borenet@google.com,robertphillips@google.com
Change-Id: I12d1cd3750a2f16f679704b3aeb9e33dda9e6530
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439604
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-08-16 15:11:44 +00:00
Brian Osman
eb0f29dba2 SkSL: Allow invoking children (shaders, etc) like functions
Previously, you would declare child objects (shaders, colorFilters, etc.)
and "sample" them like this:

    uniform shader input;
    uniform colorFilter filter;
    half4 main(float2 coord) {
        half4 inColor = sample(input, coord);
        return sample(filter, inColor);
    }

With the new syntax, those child objects become directly callable,
reflecting the way that Skia assembles all parts of the paint (as functions)
in the overall fragment shader:

    uniform shader input;
    uniform colorFilter filter;
    half4 main(float2 coord) {
        half4 inColor = input(coord);
        return filter(inColor);
    }

Bug: skia:12302
Change-Id: Ia12351964dc5d2300660187933188e738671cd83
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436517
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-08-16 14:52:51 +00:00
John Stiles
c18ee4e55a Honor component type in Metal matrix helper functions.
Right now, Metal forces types to full precision. The matrix helper
functions previously baked in that assumption by hard-coding "floatX".
Now, they honor the component type; if this->typeName() started
returning "half", our helper functions would be named with "halfX". This
would allow half-precision and full-precision helpers to coexist.

Change-Id: I1679e6e76d2cf3c27fd69c42a92fb24bff6b69ec
Bug: skia:12339
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439396
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-08-16 14:34:15 +00:00
Greg Daniel
e56d31fd56 Update LazySurfaceDesc to take a GrTextureType.
Bug: skia:12342
Change-Id: Ic57f3f30bc7d0a9d932eb4ac1c28b87b3b544ce4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439282
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-08-16 14:17:58 +00:00
James Zern
7d095952c2 update libwebp to v1.2.1
https://chromium.googlesource.com/webm/libwebp/+log/v1.2.0..v1.2.1

- 7/20/2021: version 1.2.1
  This is a binary compatible release.
  * minor lossless encoder improvements and x86 color conversion speed up
  * add ARM64 simulator support to xcframeworkbuild.sh (#510)
  * further security related hardening in libwebp & examples
    (issues: #497, #508, #518)
    (chromium: #1196480, #1196773, #1196775, #1196777, #1196778, #1196850)
    (oss-fuzz: #28658, #28978)
  * toolchain updates and bug fixes (#498, #501, #502, #504, #505, #506, #509,
                                     #533)
  * use more inclusive language within the source (#507)

Bug: b/188435220
Change-Id: I7e01c96d3598c8738fb11d541b9a078b6f29fbc0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/434197
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2021-08-16 13:57:40 +00:00
Nigel Tao
55ca4e692d Check out third_party/wuffs' "release/c" mirror
This is similar to Chromium's https://crrev.com/c/3086053 commit. Skia
only uses the C form of Wuffs-the-library and not other parts of Wuffs.
The wuffs-mirror-release-c repository excludes everything but that C
form, so it is much smaller and changes much less frequently.

Change-Id: I0d996a4ab52464f64a30345a8431c1fd45e31463
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439536
Auto-Submit: Nigel Tao <nigeltao@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2021-08-16 13:54:19 +00:00
skia-autoroll
7b2af606d3 Roll ANGLE from 728baa5089f8 to d20afde45f07 (3 revisions)
728baa5089..d20afde45f

2021-08-14 syoussefi@chromium.org Vulkan: Retain precision of uniform variables
2021-08-13 lexa.knyazev@gmail.com Validate texStorage dimensions with compressed formats
2021-08-13 kbr@chromium.org In WebGL, constrain base level of compressed textures.

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 borenet@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: borenet@google.com
Change-Id: I84475da29b0666bc0efb1cfbaeb2ebcd9c0f5b2b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439596
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-08-16 05:26:11 +00:00
skia-autoroll
fc3bee1232 Roll Dawn from e5dd6746bdbf to 0becd0585721 (1 revision)
https://dawn.googlesource.com/dawn.git/+log/e5dd6746bdbf..0becd0585721

2021-08-13 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 8094553c8a45 to 06c86a551ed6 (2 revisions)

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from 8094553c8a45 to 06c86a551ed6

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

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/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-Debug-Dawn
Bug: None
Tbr: jrprice@google.com
Change-Id: Ib1aab0fc8ea0c81f144867aa19fd6f164f9bb3b9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439597
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-08-16 04:46:42 +00:00
skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com
6b9c7bb814 Update SKP version
Automatic commit by the RecreateSKPs bot.

Change-Id: I1ca5ace9fe087819957aa1d3fd3281f57db736bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439517
Reviewed-by: skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2021-08-15 07:52:14 +00:00
John Stiles
b1f34bf3c2 Fix cases of variable shadowing in /src/.
If we manage to fix all the existing cases of variable shadowing, we
could enable -Wshadow.

Change-Id: Ibebddec324c1b6615c8ec3d118e55d1e59757fbe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439398
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2021-08-14 15:34:33 +00:00
John Stiles
72171b75ed Fix mipmap validity check.
We were accidentally checking mip-level zero on every iteration through
the loop, instead of iterating over each mip level.

Change-Id: I79ecd0f66b66490be08799f28febe4402222ec78
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439397
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-08-14 13:06:44 +00:00
Ethan Nicholas
abe39f5cb9 Fixed DSL build when threadlocals are not available
This version of the method was only used when threadlocals are
unavailable, so our normal buildbots didn't catch the name mismatch.

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

Change-Id: I58ed254c8bca62b1aa56ac26ca767d91eb67458c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439284
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-08-14 00:57:36 +00:00
Ethan Nicholas
da44b579f5 Removed missing file from sksl.gni
sksl.gni still had a reference to a now-deleted file, which is
presumably the cause of the current build failures.

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

Change-Id: I3a7d4514e338ca0810a21413e900248b1a2153e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439283
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-08-13 23:49:25 +00:00
Greg Daniel
0e9d34d33c Reland "Remove GrBackendFormat's textureType use from isFormatTexturable call."
This reverts commit d90777ada3.

Reason for revert: relanding with fix to GrBackendTexture

Original change's description:
> Revert "Remove GrBackendFormat's textureType use from isFormatTexturable call."
>
> This reverts commit 832c817bc8.
>
> Reason for revert: uninitialized value in GrBackendTexture
>
> Original change's description:
> > Remove GrBackendFormat's textureType use from isFormatTexturable call.
> >
> > The goal of this change was to remove the use of GrBackendFormat::textureType()
> > from GrCaps::isFormatTexturable call. Instead we will always pass in a
> > GrTextureType into this call.
> >
> > To do this a lot of plumbing of GrTextureType was added to various call
> > sites. However, this CL halts the plubming up at the proxy level where we
> > get it from the GrBackendFormat still. Future CLs will continue removing
> > these call sites and others that use GrBackendFormat::textureType().
> >
> > Bug: skia:12342
> > Change-Id: Ic0f02b9c7f7402405623b8aa31aa32a9a7c22297
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439277
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
>
> Change-Id: I354bbbf00be7a86c480009f3e7b36a8777a6bf3a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:12342
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439338
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

# Not skipping CQ checks because this is a reland.

Bug: skia:12342
Change-Id: I151196f149f9e191d2975b8fe81334f4f8720744
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439339
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-08-13 22:37:13 +00:00
Ethan Nicholas
4a5e22a8c8 Further unified error handling between SkSL and DSL
This eliminates the SkSL ErrorReporter class and funnels everything
through the DSL ErrorHandler. Since the DSL error handler can be
changed, this required a number of updates to ensure that things work
properly in the face of custom error handlers. There is probably more
work to be done in that area, but this at least passes all existing
tests.

Change-Id: Iaee27b79fc4ed426c484ccab257c09d28619ead5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438116
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-08-13 22:26:10 +00:00