Commit Graph

54590 Commits

Author SHA1 Message Date
Brian Salomon
785a3262d1 Don't elide GrMatrixEffect if matrix is identity.
This ensures an effect setup code path that calls GrMatrix::Make()
doesn't produce an identity and non-identity shader variant.

Change-Id: I4d17395ed1b5bfd2bf9ceac68e85756c18eb2d2f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396018
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-13 20:28:07 +00:00
Brian Osman
8ed8081e0c GrSkSLFP no longer needs a GrContext
Change-Id: Iee1ea7ee2d545138a8243c373f7a163f7120548d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396337
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-04-13 20:00:27 +00:00
Dominik Röttsches
ac04d95061 Factor out COLRv1 transforms to separate function
Preparation for optimizing the case of PaintGlyph + PaintSolid /
PaintGradient so that the remainder of the colrv1_draw_paint() function
can be turned into configuring an SkPaint.

Perform canvas CTM concatenation at the end of the function instead of
in each individual case as before.

No functional changes.

Bug: 11851
Change-Id: I04a77134d406f1625efebd5f623cfdbcca19b7cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396036
Commit-Queue: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Dominik Röttsches <drott@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
2021-04-13 19:59:07 +00:00
Brian Osman
debcbbf6a8 Flip the arguments to sample() when passing both coords and a color
A subset of these signatures will be available to public SkSL, and
structured in a way that really pushes the coords as the primary
argument (and color as an optional one). In any case, I find this
ordering more natural.

Change-Id: I7b3bc962c5b305b9eeed1ae11ae1dc2ce7269364
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396021
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-04-13 19:06:07 +00:00
Brian Salomon
4bbb29070c Concatenate matrices when GrMatrixEffect wraps another GrMatrixEffect
Bug: skia:11844
Change-Id: I13165fb17b06371854a4911c5d91bf2415d4df2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396017
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-13 19:04:47 +00:00
Albert Chaulk
52b9e815eb Rework gaussian blur to take advantage of GPU sampling.
The GPU will provide a linear mix of two texels as part of sampling.
We do have to change sampling from nearest to linear, but cutting the number
of texture lookups in half should more than make up for that - texture
fetches tend to be slow operations and the hardware has been optimized for
linear texture fetches.

Bug: skia:11796
Change-Id: Id6fc3e3cdd2491c841b31fe97ca718d6916f27be
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/390796
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-13 18:17:07 +00:00
Brian Salomon
71283238d1 Reland "Remove code to push pixmaps to backend textures from GrGpu classes"
This is a reland of 45889d1269

Original change's description:
> Remove code to push pixmaps to backend textures from GrGpu classes
>
> Replace GrGpu::updateBackendTexture with narrower method that clears
> a backend texture.
>
> Creation of data for a solid color compressed texture is lifted up to
> GrDirectContext and goes through updateCompressedBackendTexture.
>
> Bug: skia:11786
> Change-Id: I1d617623df5e65686f30e57c361a64f78d77f7bd
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/392836
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

Bug: skia:11786
Change-Id: Ibf85794a33e68acb17f0fb704f6815cd6460b3f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396098
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-13 17:35:37 +00:00
Chris Dalton
2517ce39ca Add usesMSAASurface to GrMeshDrawOp::Target
Also switches GrFillRRectOp to call usesMSAASurface.

Bug: skia:11396
Change-Id: I66d0ee2c6dc76819efc0f3283f6e1a0af11f23f7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395136
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-04-13 16:50:00 +00:00
Brian Salomon
34012d7eee Revert "Remove code to push pixmaps to backend textures from GrGpu classes"
This reverts commit 45889d1269.

Reason for revert: compressed texture assertion on D3D bot

Original change's description:
> Remove code to push pixmaps to backend textures from GrGpu classes
>
> Replace GrGpu::updateBackendTexture with narrower method that clears
> a backend texture.
>
> Creation of data for a solid color compressed texture is lifted up to
> GrDirectContext and goes through updateCompressedBackendTexture.
>
> Bug: skia:11786
> Change-Id: I1d617623df5e65686f30e57c361a64f78d77f7bd
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/392836
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ie58f52245c44c77f09742b0cb590cc97b97e6e37
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11786
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396097
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-13 16:17:42 +00:00
John Stiles
3738ef531b Move code generators to codegen/ directory.
We are up to having seven distinct types of codegen, and will soon have
an 8th (DSL C++).

Change-Id: I6758328390c234ba1d5c30c118199dbc820af52a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395817
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-04-13 15:34:24 +00:00
Chris Dalton
da2b0f43a2 Move the decision for useMSAASurface to GrOpsTask
Bug: skia:11396
Change-Id: Ic0f7b2b43c7c383381b2447385019d50660eb53c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/393777
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-04-13 15:31:14 +00:00
Florin Malita
8bad8f76c3 [androidkit] Register native methods explicitly
Use RegisterNatives() to bind native methods, instead of relying on
dynamic linker naming conventions.

Change-Id: I602f2efe73e3b9c3c7dfaf7af2307dcfb4cd935e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396016
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-04-13 15:29:19 +00:00
John Stiles
7134646ebd Migrate SkSLExternalFunction to the ir/ directory.
Change-Id: I8ca4fbba551624c61a4ebe7a4716750fe0b48196
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395818
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-04-13 14:17:16 +00:00
Jim Van Verth
3473b4e724 Rename D3D descriptor methods to be clearer
Change-Id: I047c4397fba87ce5db6f422162f942ac0ca0b0b9
Bug: skia:10446
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395816
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-04-13 14:04:04 +00:00
Florin Malita
2a650cc795 [androidkit] Split Canvas backing store into Surface
Add a Surface abstraction to manage the canvas backing store (equivalent
to SkSurface).

This allows relieving Canvas of buffer management duties - we can now
focus solely on rendering APIs at this level.

At the moment, only a Bitmap-backed surface is implemented -- but other
native surface types will be added.

Also relocate native code to 'src'.

Change-Id: I46738472536cf24524428dbd36969f2b99d251e3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395536
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2021-04-13 13:56:04 +00:00
Brian Salomon
45889d1269 Remove code to push pixmaps to backend textures from GrGpu classes
Replace GrGpu::updateBackendTexture with narrower method that clears
a backend texture.

Creation of data for a solid color compressed texture is lifted up to
GrDirectContext and goes through updateCompressedBackendTexture.

Bug: skia:11786
Change-Id: I1d617623df5e65686f30e57c361a64f78d77f7bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/392836
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-13 13:32:44 +00:00
John Stiles
04d4969bd2 Fix apparent typo for 0-component swizzles.
Noticed during code read-through; unaware of any actual issues caused by
this.

Change-Id: I455e7fbc3a1d83f6319aaed1518d382ec231c8be
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395836
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-04-13 13:20:54 +00:00
skia-autoroll
be8db7845b Roll Dawn from edb79bafba1f to e19004566464 (11 revisions)
https://dawn.googlesource.com/dawn.git/+log/edb79bafba1f..e19004566464

2021-04-13 cwallez@chromium.org dawn_wire: Add support for injecting/reserving swapchains
2021-04-12 senorblanco@chromium.org OpenGL: Refactor texture uploads.
2021-04-12 bclayton@google.com Reenable D3D12 tests that failed with TINT_UNIMPLEMENTED
2021-04-12 bclayton@google.com Reenable D3D12 tests that failed with 'tint_first_vertex_index not found'
2021-04-12 bclayton@google.com Reenable D3D12 tests that failed with 'unsupported struct member decoration'
2021-04-12 bclayton@google.com Reenable D3D12 tests that failed with 'runtime array not supported yet'
2021-04-12 bclayton@google.com Reenable D3D12 texture tests with tint generator
2021-04-12 bclayton@google.com Reenable D3D12 test OpArrayLengthTest with tint generator
2021-04-12 bclayton@google.com Reenable D3D12 test TwoComputeInModule with tint generator
2021-04-12 bclayton@google.com Reenable D3D12 tests that use workgroup storage
2021-04-12 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from c8ffbe43a7b3 to c3bbb4d079e4 (1 revision)

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from c8ffbe43a7b3 to c3bbb4d079e4

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

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

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: alanbaker@google.com
Change-Id: Ia0b5abd740ab4f76e10569f791ae4e594007e7ed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395936
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-13 05:02:24 +00:00
skia-autoroll
aa6cf3f4b8 Roll ANGLE from f92eb43ce917 to 15f4925ac3a6 (10 revisions)
f92eb43ce9..15f4925ac3

2021-04-13 nicolascapens@google.com Restore EGL_EXT_buffer_age for SwiftShader Vulkan
2021-04-13 syoussefi@chromium.org Vulkan: More perf warning for vertex format conversion
2021-04-12 doughorn@google.com Reland "Fix multithreaded crash on draw commands on D3D11 backend."
2021-04-12 sunnyps@chromium.org Ignore internal format attribute for YUV D3D11 EGLImages
2021-04-12 syoussefi@chromium.org Remove EvqBaseVertex and EvqBaseInstance qualifiers
2021-04-12 stevensd@chromium.org Ignore subclass when finding GPU PCI devices
2021-04-12 jmadill@chromium.org infra: Remove named vs_toolchain cache.
2021-04-12 jmadill@chromium.org DEPS: Include a pinned version of depot_tools.
2021-04-12 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 4c0f888d7ef8 to 77edad299907 (1 revision)
2021-04-12 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 920c6c5ffe65 to 497fa2f8d899 (507 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 brianosman@google.com on the revert to ensure that a human
is aware of the problem.

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

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Tbr: brianosman@google.com
Change-Id: Idb39e313dd004dee1fd4b0d14d7d4b0c75bda30e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395787
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-13 04:57:04 +00:00
skia-autoroll
3627aff89c Roll Chromium from 5368f81b40a5 to f9ddd1cf5caa (949 revisions)
5368f81b40..f9ddd1cf5c

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

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

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

Cq-Include-Trybots: skia/skia.primary: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: brianosman@google.com
Change-Id: I3527df913522e7e466f5d49070f3cc1071c50e9e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395786
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-13 04:45:24 +00:00
Mike Reed
e58231ae8f Removed unused SkInterpolator
Bug: skia:11852
Change-Id: I7a9eb2e0594bc1bdf6e7ba5355b6f00cc177253f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395476
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-04-13 00:50:11 +00:00
John Stiles
06203df0e4 Replace three mix() calls with one swizzled mix().
Not a big deal, just a tiny simplification.

Change-Id: I34e1404d79e22449f19a22ccf2cf6ffd98acf879
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395727
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2021-04-12 22:18:01 +00:00
Ethan Nicholas
8455893840 SkSL DSL matrix support
Change-Id: I9d43346df1a7611726f69ea54b4236e32d11d20c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395696
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-04-12 22:03:31 +00:00
Chris Dalton
b0fed1dc21 Move the decision for useMultisampleFBO to GrGLOpsRenderPass
Bug: skia:11396
Change-Id: I5548784d735a11a8ca7afc7eb5a731966ec1a0b7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/393776
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-04-12 21:44:21 +00:00
Brian Salomon
56892dc933 Favor GrRRectFillOp in reduced shader mode.
Bug: skia:11844
Change-Id: I959966d9c2366c249bbdb3b78d47d0e29e9e43f1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395719
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-12 21:01:51 +00:00
skia-autoroll
d276cdfdee Roll SK Tool from 79153d607903 to 7b892cc5882d
https://skia.googlesource.com/buildbot.git/+log/79153d607903..7b892cc5882d

2021-04-12 borenet@google.com [sk] Add release-branch subcommand

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 report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

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

Tbr: jcgregorio@google.com
Change-Id: Ib0a487ed3fc2455c2f15713751c8f80e7a77c85e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395778
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-12 20:10:51 +00:00
Brian Osman
962e6140ac Add ivec GLSL type aliases to runtime effects
Also add unit test of all GLSL type aliases.

Bug: skia:10679
Change-Id: I93e21621c11adfe3f114d0c55fb8043518e62696
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395718
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-04-12 16:55:41 +00:00
Brian Salomon
e9f22657c3 Make reducedShaderMode a shader cap
Allows GrProcessors to change behavior based on cap.

Bug: skia:11844
Change-Id: I4378c47c50a9bf33fa7461c6b9c522413e932bcd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395717
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2021-04-12 16:55:01 +00:00
John Stiles
d02615698e Fix assertion when performing type-coercion with enums.
In http://review.skia.org/393397, I replaced a Constructor::Convert call
with a call directly to ConstructorCompoundCast::Make.

This worked fine if the input expression was actually a compound, but
if it was not, the code would assert/crash. The fuzzer detected this
error right away. (Enums are not considered to be a scalar, a vector or
a matrix in SkSL.)

Change-Id: Ie0df4c5771ff4f4d8f5251d4703e9c3516b6baad
Bug: oss-fuzz:33113
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395720
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-04-12 16:40:31 +00:00
Dominik Röttsches
e14d72500f Avoid unnecessary saveLayer() in COLRv1 paint operations
Most of the COLRv1 paint operations only need the clip and matrix to be
kept on SkCanvas, only PaintComposite needs a full saveLayer().
Adjust calls accordingly.

Bug: skia:11851
Change-Id: I85b3c27495c78306457e17fea8062c957e2f3b05
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395617
Auto-Submit: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2021-04-12 16:06:11 +00:00
Ethan Nicholas
ee49efcc91 Added DSL fragmentProcessor and Sample function
Change-Id: I76348d151fbf27454a6f60e4f5f7e1774731e61b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395216
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2021-04-12 14:29:51 +00:00
John Stiles
67e52cf47d Remove last vestiges of u_skRTWidth.
This was not used anywhere. (u_skRTHeight, on the other hand, is used to
support Y-flipped surfaces.)

Change-Id: I0cb803e8f82834715a47366a00c8ec913ee3c6e5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394898
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-04-12 14:15:01 +00:00
John Stiles
cc6492ba9c Detect version breaks in the persistent cache at compile time.
The persistent cache stores the struct `SkSL::Program::Inputs` on disk
as a binary blob. If the struct changes size or shape in any way, this
causes a compatibility break in the cache files and we need to increment
kCurrentVersion to invalidate them. We will now automatically detect any
change to Inputs which causes its size to differ and static_assert.

Change-Id: Ie8b9958029c209f2c763f5bea78fcaa8bc3444d7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394897
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-04-12 14:11:59 +00:00
John Stiles
f2c2d3020e Migrate PersistentCacheUtils logic into a cpp file.
This code is not performance-sensitive, and there doesn't seem to be any
benefit to making it header-only.

Change-Id: Ic83be5cbb96f08c18a144954be7453aaabaa5a72
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394900
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-04-12 14:09:59 +00:00
John Stiles
652e863019 Remove redundant check for division-by-zero.
ConstantFolder::Simplify already makes this check internally (see
SkSLConstantFolder:387). We don't need to do it here as well.
The `errors/DivideByZero.sksl` test reports the same errors as before.

Change-Id: If82d24b3c8613574b069cce0116aad4e789964c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395416
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-04-12 13:59:59 +00:00
John Stiles
97186dc957 Fix various fuzzer-generated tests.
Two of the tests are now (correctly) detected as invalid code, but were
previously checked into /shared/ because they compiled when the fuzzer
first reported them (that is, after the crash was fixed). These have
been moved into the /errors/ test folder.

One of the tests was only generating an error because its main function
was named `a` instead of `main`, so I renamed it to `main`.

Change-Id: I1a2346fb16e304b0c66ff377a3f9bf7e7ee89ba9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394899
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-04-12 13:44:59 +00:00
Eric Boren
a3f684b381 [infra] Roll SK tool to fix Mac
Bug: skia:11850
Change-Id: I3eed3d07481b6dd27e3c51d25d64b69ee8a16280
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395537
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2021-04-12 13:28:49 +00:00
John Stiles
0f7019723f Optimize Block in response to Pinpoint findings.
Pinpoint discovered some regressions in Block::Make.

Block::Make attempts to identify Blocks that contain zero or one actual
Statements; in that case it can avoid allocating a Block and just return
the Statement. The original logic which did this check worked by
removing the empty Statements from the array, then shrinking the array.
For a large array of nested Statements, this could end up taking a
nontrivial amount of time as it would scan every statement for
emptiness.

I've rewritten this logic to be more efficient; it now stops as soon as
two non-empty Statements are found, and makes no attempt to eliminate
empty statements. It's more lines of code, but much less work.

If this doesn't resolve Pinpoint's woes we can remove this logic
altogether, as its only value is to avoid an unnecessary allocation and
generate slightly-smaller but overall equivalent IR.

Change-Id: I2d18a0e09df266629d63b6796f40501d8610f756
Bug: chromium:1187973, chromium:1187991, chromium:1188002, chromium:1188025
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395417
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-04-12 13:17:39 +00:00
skia-autoroll
87a7c9ee15 Roll SwiftShader from 4c0f888d7ef8 to 77edad299907 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/4c0f888d7ef8..77edad299907

2021-04-09 capn@google.com Remove the OpenGL ES 1.1 build target

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

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

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

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: brianosman@google.com
Change-Id: If44298c3eeb5face6a3f83f32f383bb2f8277fc1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395458
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-12 05:20:26 +00:00
skia-autoroll
3e21d68a66 Roll ANGLE from 4340fcfaa8d0 to f92eb43ce917 (16 revisions)
4340fcfaa8..f92eb43ce9

2021-04-11 m.maiya@samsung.com Vulkan: All builtins of gl_out needs to be considered as active
2021-04-10 syoussefi@chromium.org Vulkan: Use RGBA16_FLOAT for buffer format fallback
2021-04-10 ianelliott@google.com Vulkan: damage rectangles must never be pre-rotated
2021-04-10 ianelliott@google.com Vulkan: Warn for unsupported vertex attrib format
2021-04-10 syoussefi@chromium.org Remove unused translator option bits
2021-04-10 ynovikov@chromium.org Really fix iOS build
2021-04-09 ianelliott@google.com Add TextureType::Buffer to RecordBindTextureTypeError()
2021-04-09 jmadill@chromium.org Android: Call getExternalStorageDirectory natively.
2021-04-09 ynovikov@chromium.org Skip TracePerfTest.Run/native_real_gangster_crime on Linux AMD
2021-04-09 syoussefi@chromium.org Add tests that use, then update, then use buffers
2021-04-09 cclao@google.com Vulkan: Add featue flag to force highp to mediump in fragment shader.
2021-04-09 timvp@google.com Fix angle_expose_non_conformant_extensions_and_versions
2021-04-09 m.maiya@samsung.com Consider AOSP ANGLE path as well during SHA generation
2021-04-09 syoussefi@chromium.org Translator: Validate multi-declarations are separated
2021-04-09 syoussefi@chromium.org Remove unused translator option bit
2021-04-09 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 6cad7c765c8b to 920c6c5ffe65 (341 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 brianosman@google.com on the revert to ensure that a human
is aware of the problem.

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

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Tbr: brianosman@google.com
Test: Test: dEQP-GLES31.functional.tessellation.shader_input_output.gl_position_tcs_to_tes
Change-Id: I70b44bfb7334cbb9a4e06c80c171ff65a4443637
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394970
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-12 04:59:26 +00:00
skia-autoroll
03dee45321 Roll Dawn from 4a7c120456ad to edb79bafba1f (8 revisions)
https://dawn.googlesource.com/dawn.git/+log/4a7c120456ad..edb79bafba1f

2021-04-10 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 6f7986d9b543 to c8ffbe43a7b3 (2 revisions)
2021-04-09 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from c76ec15b4589 to 6f7986d9b543 (15 revisions)
2021-04-09 hob@chromium.org Remove dummy extension types
2021-04-09 bclayton@google.com ShaderModule: Keep the tint::Source::File alive
2021-04-09 bclayton@google.com Tweak BindGroupTests to workaround FXC bug
2021-04-09 cwallez@chromium.org D3D12: Implement initial surface-based swapchains
2021-04-09 cwallez@chromium.org Fix D3D12 Sampler Heap tests to reference their bindings in WGSL
2021-04-09 jiawei.shao@intel.com Report error when plane0 is not a valid object in CreateExternalTexture

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from c76ec15b4589 to c8ffbe43a7b3

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 report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: jrprice@google.com
Change-Id: If08330c0a4583de23d043cd2f2a13e9abd77adab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394971
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-12 04:51:36 +00:00
Florin Malita
062743a859 [androidkit] Bind canvas to native Bitmap
Wrap native Bitmap pixels using JNIGraphis APIs.

Add finalizer to clean up.

Change-Id: I22ba54e65a9cdf498e97afefe8bcc6cd88db0c95
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394816
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-04-11 18:08:30 +00:00
skia-recreate-skps
a56e553d58 Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=rmistry@google.com
NO_MERGE_BUILDS

Change-Id: Ibbdb434ab5bf43dc89aa061d83df96f63abb9e74
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394966
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2021-04-11 09:06:59 +00:00
skia-autoroll
ee7a854b61 Roll SK Tool from 2035342cd489 to 6f229e984aa9
https://skia.googlesource.com/buildbot.git/+log/2035342cd489..6f229e984aa9

2021-04-09 lovisolo@google.com Update Puppeteer to v8.0.0 everywhere.
2021-04-09 lovisolo@google.com [bazel] sk_page macro: Fix cache busting bug.
2021-04-09 lovisolo@google.com [infra-sk] Fix app-sk demo page and add Puppeteer test.
2021-04-09 lovisolo@google.com Update BUILD files with Gazelle.
2021-04-09 jcgregorio@google.com [docsy] Add redirects for old URLs.
2021-04-09 kjlubick@google.com [gold] Make goldpushk and web use //go/now
2021-04-09 jcgregorio@google.com fix Infra-PerCommit-CreateDockerImage
2021-04-09 jcgregorio@google.com [perf] Remove gitauth calls from frontend.go.
2021-04-09 jcgregorio@google.com [perf] Push GCS file access into an interface.
2021-04-09 borenet@google.com [autoroll] Add SK tool into Skia roller
2021-04-09 jcgregorio@google.com Switch infra to Go 1.16.3

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

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

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

Tbr: lovisolo@google.com
Change-Id: I7a0a78edd49998318d25fca57917d358b9d5eb49
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395396
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-10 14:27:17 +00:00
Adlai Holler
fe91974471 Check budget for task reordering and report stats
In this CL we don't actually bail and use the record-time-ordered
DAG in this case, but we at least will see which perf bots with
reordering turned on are going over budget.

Bug: skia:10877
Change-Id: I38666166f15a7c168eadf262f7e975822c4308db
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394158
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-04-10 13:16:27 +00:00
Adlai Holler
cd2f96dd68 Add GrResourceAllocator::makeBudgetHeadroom
This allows the caller to decide whether a plan is feasible before
committing to it. In this CL the drawing manager doesn't actually
call it, but we test it. We'll call it in a follow-up CL

Bug: skia:10877
Change-Id: Ie3a6c14a0196f595c522a0c961aba7b10c980711
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394157
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-04-09 22:52:07 +00:00
Adlai Holler
ee2837ba09 Split GrResourceAllocator::assign into two methods
A follow-up CL allows the user to check the budget headroom
in between these two steps.

Bug: skia:10877
Change-Id: Ie0e6f23029065158b2eadb0dc26caf32f54433e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394999
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-04-09 21:40:27 +00:00
John Stiles
d3a1df8da7 Remove sk_Height and sk_Width.
These builtins have been obsolete for a long time; they were only
implemented on the GLSL backend. These values are provided in
u_skRTHeight and u_skRTWidth instead. (See GrGLSLProgramBuilder's
addRTHeightUniform and addRTWidthUniform.)

Change-Id: I8cceca348cbf9071939618f913693c316d35dbc6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395001
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-04-09 21:01:27 +00:00
Herb Derby
97abbee827 render RSXForm using SkGlyphRunList
Encode the RSXForm text blob data into the SkGlyphRuns. Change
SkBaseDevice's drawGlyphRunList() to break up glyph runs with
TSXForm information into single glyph runs. Add
a virtual onDrawGlyphRunList() = 0 so drawGlyphRunList can use
it to render SkGlyphRunLists per device.

Change-Id: I7250460f7b4be2f820e4bb8ca4223654a9d9d145
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395098
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-04-09 20:23:47 +00:00
Brian Salomon
91216d5b65 Add "reduced shader" testing mode.
Currently doesn't do anything other than add new configs that set
a GrContextOption that becomes available in GrCaps. Runs new configs
on Perf/Test bots (MTL/iPhone11 and GL/Ubuntu).

Bug: skia:11844
Change-Id: I58586cae0980e52701abd1633dbc79b381f6015b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394996
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-09 20:15:37 +00:00