Commit Graph

56872 Commits

Author SHA1 Message Date
Chris Dalton
2a26c50a62 Store the correct number of samples in GrProgramInfo
Bug: skia:11396
Change-Id: I9480b89635bd7a6bdff8ab4876c8eeafdbc27c8b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/442096
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2021-08-26 17:24:47 +00:00
Chris Dalton
82d081465e Use drawVertices instead of SkDraw for MSAA hairline points
Bug: skia:12356
Change-Id: I5a3fea783d7d10d53ffbd3cd34c43dc4f877b587
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440636
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-08-26 16:52:21 +00:00
John Stiles
6efab7166d Move error checking into VarDeclaration::Convert.
We had some error-checking logic in IRGenerator that could trivially
move into VarDeclaration::Convert. It's better to centralize the logic
when we can. (In PS2, I added matching assertion checks to Make.)

Change-Id: If15aeaa501274c4332c9ccec069b7e2ab1137dc9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/442240
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-08-26 16:46:14 +00:00
Herb Derby
f9e20555c2 extract common code from blur
This CL extracts the very fiddly edge case code that should be common
to both blurs. This is a single step in the progression to share
even more code.

Change-Id: I9d22cb8ae44e7ff2cb49196a3c0b464e48c21cdc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441062
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-08-26 16:25:15 +00:00
Robert Phillips
62bd633b1c Move tessellation ops to skgpu::v1 namespace
Mechanical.

Bug: skia:11837
Change-Id: Ic302ee314ad73ce034c8daac38416a8249a125a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/442276
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-08-26 15:17:52 +00:00
Michael Ludwig
3c0c185e0e Don't assume DecomposeCTM and setDeviceCoordSystem always succeed
Very originally, skif::Mapping::DecomposeCTM() and
SkBaseDevice::setDeviceCoordinateSystem assumed that if the canvas
matrix was invertible, then any scale decomposition would produce a
valid device coordinate system. This proved not to be true and fuzzers
quickly caught it, but I had attempted to address it by forcing
SkCanvas to do extra work so that the above two functions remained
unchanged.

However, it's become apparent that even making the assumption that the
product of two invertible matrices remains invertible does not always
hold true in the wonderful world of floating point math.

Instead, this rewrites DecomposeCTM and setDeviceCoordinateSystem to
return bools, allowing them to fail. This cleans up some of the earlier
checks that SkCanvas makes while computing the skif::Mapping, and it
also ensures that once we fold in the prior device's transform, the
net layer->global transform remains valid. If any of this fails, it
just gets rid of the new device and sets the clip to empty, basically
preventing drawing until the invalid layer has been restored.


Bug: chromium:1239968, chromium:1240685
Change-Id: Ib9ce8f95859e726a9eacf1154f6eef8dd3995500
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/442017
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2021-08-26 14:21:45 +00:00
John Stiles
9ef6927a99 Add script to update the SkSL fuzzer corpus automatically.
Before running this script, you'll need someone from infra team to give
your @google.com account access to the Google Cloud fuzzer repo. Once
that's been done, run this Python script and it will automatically
recreate the fuzzer corpus from our SkSL test inputs and upload it to
the cloud.

Change-Id: I804fdf7933a99b92dd1640d9af17530d4db97a4e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/442001
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-08-26 13:51:44 +00:00
Jorge Betancourt
c1727fc217 [JetSki] pass SkPaint into experimental SkText drawText calls
tests currently through jetski demo

Change-Id: I0847e98579b62104e5d9ddaa7ca008f5a75be5c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441427
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2021-08-26 13:01:51 +00:00
skia-autoroll
a3a8cba62e Roll Dawn from 6fa34f80bd4a to 2aee6eef7f07 (1 revision)
https://dawn.googlesource.com/dawn.git/+log/6fa34f80bd4a..2aee6eef7f07

2021-08-26 jiawei.shao@intel.com Refactor APICreateRenderPipelineAsync to support sync and async path

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 rharrison@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: rharrison@google.com
Change-Id: Ib380c4f7f189ce77bb41421dba1bae64a91e3160
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/442080
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-08-26 04:59:12 +00:00
skia-autoroll
7c94cf95fe Roll SK Tool from 1599676d9dea to ac56067b7a25
https://skia.googlesource.com/buildbot.git/+log/1599676d9dea..ac56067b7a25

2021-08-25 jcgregorio@google.com Log all environment variables on startup.
2021-08-25 erikrose@google.com [skolo] Stop Swarming from setting up its own startup job on shutdown.

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 rmistry@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: rmistry@google.com
Change-Id: Id9d4fcd78b749f72bc77e840cc1cf621c87ea5e6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441992
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-08-25 22:29:44 +00:00
Robert Phillips
fdafc0cbe4 Move GrAtlasRenderTask to gpu/ops and skgpu::v1 namespace
Bug: skia:11837
Change-Id: I29352c0e2c9e987b28be983c3d519a88b589baf1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/442022
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-08-25 21:39:11 +00:00
John Stiles
fbb905e70f Remove nearly-unused ASTNode description code.
The entire ASTNode is probably going away soon, but this is a decent
place to start. Checking the fuzzer logs, we had 0% coverage in here,
which makes sense because it's unreachable by any normal means.

Change-Id: I396464e3e613d46e990b629c4fc991c11f6110fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/442000
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>
2021-08-25 20:58:13 +00:00
Julia Lavrova
0f629d7f48 Positioning in chinese glyphs
+small fix for placeholder in getGlyphPositionAtCoordinate

Bug: skia:12322
Change-Id: I8f03c5c808db54fc9742e5817768db4a088bc5b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440458
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2021-08-25 20:49:48 +00:00
Chris Dalton
6fc1f025f8 Make sure to disable MSAA on ANGLE Intel
Our current intent is to disable MSAA for all of Intel, but it snuck
through on Intel.

Change-Id: I1fb5c4d88a9650556f3e64f7a3aaaa3907169c76
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/442036
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-08-25 20:45:46 +00:00
Michael Ludwig
2cede624eb Remove staging flag for raster clip aa disabling
Bug: skia:7998, chromium:1240718
Change-Id: I32a7806fca53db5c120460dcf5738cab84662926
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441542
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-08-25 20:35:53 +00:00
skia-autoroll
8ecd9e0309 Roll skcms from b3fa31431c6a to 4f7135f89d98 (1 revision)
https://skia.googlesource.com/skcms.git/+log/b3fa31431c6a..4f7135f89d98

2021-08-25 kjlubick@google.com Add OWNERS

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

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

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

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

Cq-Include-Trybots: skia/skia.primary:Canary-Chromium
Tbr: herb@google.com,brianosman@google.com
Change-Id: Ic298bff011998d2c4537fb19b3d10bb55141ed19
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441979
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-08-25 20:09:24 +00:00
John Stiles
dec5ff2286 Reland "Add ES3 intrinsics isinf/isnan to public SkSL ES3."
This reverts commit 9155b338bb.

Reason for revert: disable test for GLSL + Adreno 6xx

Original change's description:
> Revert "Add ES3 intrinsics isinf/isnan to public SkSL ES3."
>
> This reverts commit e43714f490.
>
> Reason for revert: Several Pixel (Adreno) devices failing the test
>
> Original change's description:
> > Add ES3 intrinsics isinf/isnan to public SkSL ES3.
> >
> > The ES3 spec doesn't mandate that `isnan` actually has to do anything,
> > so the Isnan test is not enabled. (It doesn't work on my personal
> > machine unless I make the NaN detectable at compile-time.)
> >
> > We do not support these functions in constant-expressions, as we
> > currently avoid optimizing anything into a non-finite value; we leave
> > expressions alone if we calculate a NaN/inf result for their value.
> >
> > Change-Id: Ibfdfb47b6e6134165c8780db570de04a916d2bfa
> > Bug: skia:12022
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441581
> > Auto-Submit: John Stiles <johnstiles@google.com>
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: John Stiles <johnstiles@google.com>
>
> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
>
> Change-Id: I89899ed391aa870350d0452bab4a0fb75bd7be38
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:12022
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441716
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

Bug: skia:12022, skia:12377
Change-Id: Ib149dbc1138feb3ee2bf6f7e31e9e8a9414560bc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441884
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-08-25 19:01:22 +00:00
Brian Salomon
ad326ae032 Ignore motion mark svg slight pixel mismatches in mtltestprecompile
Change-Id: Ia5a11580a793226253e2e294f6c43aa76fa97e8f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441882
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-08-25 18:36:22 +00:00
Michael Ludwig
a228a48d5e Silence clang-tidy warnings around SkBlockAllocator
Change-Id: I4a825c0d191f3f24d558c4331e07fe2a55832f76
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441838
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-08-25 18:34:17 +00:00
Robert Phillips
3e87a8eda9 Move GrOpsTask to gpu/ops and the the skgpu::v1 namespace
Bug: skia:11837
Change-Id: I9ee6343b5144b02e8f455df0ea01b8199a8f14e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440837
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2021-08-25 18:32:17 +00:00
Kevin Lubick
f611404816 [canvaskit] Remove the need for users to keep track of contexts.
We'll switch to the correct context when necessary (e.g. before
calls that talk to the GPU). This is achieved by adding in
calls at the JS layer to switch the context before making a call
that is known to talk to the GPU (e.g. draw calls on SkCanvas).

Another implementation that was considered was to add a C++
shim in GrGLInterface that would switch the context before
every call in the GPU - however, that seemed too difficult
and would add extra overhead if a single draw* call talks
to the GPU multiple times.

Bug: skia:12255
Change-Id: I96e4c6b41a5bfcc9913aeaca7ccb125358048ad3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432136
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-08-25 18:23:06 +00:00
Jim Van Verth
96cd8a0f71 Disable use of StoreAndMultisampleResolve on Mac.
We're seeing a significant perf hit when running on Mac msaa8, so
disabling for now.

Bug: skia:12376
Change-Id: Ic785e99b2ae42aeb54f8313114d82202b645b273
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441881
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-08-25 17:59:20 +00:00
John Stiles
43ac7e6315 Fix parsing error with SPIR-V negating a uint.
Our SPIR-V code generator did not implement support for negating a uint.
However, this is something that GLSL allows (as does the rest of SkSL).
I checked glslang and it uses OpSNegate here. The SPIR-V docs indicate
that OpSNegate allows any type of integer, and the validator lets it
pass, so we now use OpSNegate here as well.

http://screen/33mkq92uxAT5Xu8
http://screen/4YBTh3gCWz8eZx7
http://screen/388HtXyytcN5vLZ

Change-Id: I8c142018fd5e162dcd051abe1bc5d69a6e034794
Bug: oss-fuzz:37627
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441880
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-08-25 17:52:50 +00:00
skia-autoroll
b61014d310 Roll ANGLE from 3408ea3ea402 to 47279c726e5a (7 revisions)
3408ea3ea4..47279c726e

2021-08-25 lexa.knyazev@gmail.com Adjust compressed texture validation; add test
2021-08-25 tikuta@chromium.org remove swarming_client
2021-08-25 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 6aad52e1aef6 to e32890c54793 (1 revision)
2021-08-25 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 2136fe7a73f0 to f03e89d82d9f (870 revisions)
2021-08-25 gert.wollny@collabora.com Capture/Replay: further rework of replay script:
2021-08-25 cnorthrop@google.com FrameCapture: Only finish contexts that have been current
2021-08-25 cnorthrop@google.com FrameCapture: Add more helpful texture errors

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 herb@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: herb@google.com,robertphillips@google.com
Test: Test: Fortnite MEC
Change-Id: I3722181d094ad5c7e0537c393f6c1dfa694dbe9e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441898
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-08-25 17:30:24 +00:00
John Stiles
31c87103c6 Fix parsing error with structs containing arrays.
Previously, a struct containing a vardecl with multiple declarations
would interpret arrays incorrectly. An array would be applied to ALL
variables in the decl after its initial appearance. That is,
`int w, x[10], y, z;` would be interpreted as
`int w, x[10], y[10], z[10];`.

This is now fixed and our test case runs as expected.

Change-Id: I5b4a617c58cdfb83face651effd42770a1f68638
Bug: oss-fuzz:37622
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441879
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-25 17:27:12 +00:00
John Stiles
2d3f5e8f25 Demonstrate parsing error with structs and arrays.
The fuzzer detected a serious parsing error; a struct containing a
vardecl with multiple declarations would interpret arrays incorrectly.
An array would be applied to ALL variables in the decl after its initial
appearance. That is, `int w, x[10], y, z;` would be interpreted as
`int w, x[10], y[10], z[10];`. The fuzzer caught this by putting two
arrayed variables in a row; the second variable was interpreted as a
nested array, which led to an assertion.

This CL contains a simple hand-written test case demonstrating the bug,
with the fix coming in a followup.

Change-Id: I42d7372ba77fa1528ae24eb8c29a2e5903784139
Bug: oss-fuzz:37622
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441878
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-08-25 17:26:54 +00:00
John Stiles
f95048cc4d Report intermediate expressions as errors in For next-exprs.
We weren't coercing the expression because we don't care about its type,
but that allowed intermediate-expressions to pass through without
reporting an error. Now we coerce the expression to its present type,
which will always fail if the type is disallowed and succeed otherwise.

Change-Id: Ic0de0d17f0f5d56360575efe992ce4d74dec2a5a
Bug: oss-fuzz:37620
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441876
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-08-25 17:26:21 +00:00
Robert Phillips
24d622d6f9 Move the GrTessellationPathRenderer into the skgpu::v1 namespace
Bug: skia:11837
Change-Id: Ic445e99adbe2d2ada64f98f9f516c198a247ef09
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440876
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-08-25 17:16:28 +00:00
John Stiles
d34406abf9 Remove dead code related to BuiltinTypes.
The BuiltinTypes helper functions were deleted as part of
http://review.skia.org/423585, and the friend class is no longer needed.

Change-Id: I9a1980daa1891fc5c3c12dc35a5a1037e64dea86
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441799
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-25 15:39:44 +00:00
Greg Daniel
1e16937f47 Add more flexibility to GrVkRT to support DMSAA.
Support is added so we can differentiate between using discardable
msaa for normal msaa draws and using it for DMSAA. Before this
many asserts and checks throughout GrVk* assumed we could only have
discardable msaa if the actual render target was msaa.

After this change the only thing missing to enable DMSAA on Vulkan
is to fix GrProgramInfo to store the actual sample count the program
will use instead of the same count of the GrRenderTarget.

Change-Id: Ifdb9a3beb641f96f6dfebe3241ccc5a2c8770bb3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441517
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-08-25 14:09:27 +00:00
Michael Ludwig
c1ed11d909 Move GrBlockAllocator and GrTBlockList to src/core/
src/gpu/GrBlockAllocator -> src/core/SkBlockAllocator
src/gpu/GrTBlockList -> src/core/SkTBlockList

Tests and references also renamed.

Bug: skia:12330
Change-Id: I5fad05faa3dcecd89a0a478dcf30c090ea7589f5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441477
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2021-08-25 13:21:32 +00:00
skia-autoroll
0305e86ee4 Roll ANGLE from 8c05fd4fe56a to 3408ea3ea402 (20 revisions)
8c05fd4fe5..3408ea3ea4

2021-08-25 syoussefi@chromium.org Translator: Fix precision of gl_FragCoord on ES3+
2021-08-24 cnorthrop@google.com FrameCapture: Adjust CopyImageSubData target
2021-08-24 syoussefi@chromium.org Translator: Validate precisions
2021-08-24 jmadill@chromium.org Perf Tests: Update histogram units.
2021-08-24 syoussefi@chromium.org Translator: Stabilize autogenerated builtin function parameters
2021-08-24 gman@chromium.org Emit INFINITY for infinite constants
2021-08-24 cnorthrop@google.com Tests: Add Wordscapes trace
2021-08-24 timvp@google.com Refactor EGLMultiThreadSteps.h -> MultiThreadSteps.h
2021-08-24 ianelliott@google.com Add Cody, Charlie, and Ian to OWNERS
2021-08-24 cnorthrop@google.com Tests: Add Scrabble Go trace
2021-08-24 gert.wollny@collabora.com Capture/Replay: beautify the result output
2021-08-24 gman@chromium.org Test vector and matrix scalarization does not affect output
2021-08-23 jmadill@chromium.org ANGLEPerfTest: Fix a couple comment typos.
2021-08-23 jmadill@chromium.org Capture/Replay: Isolate trace export definitions.
2021-08-23 gert.wollny@collabora.com Capture/Replay: Update expectation bug number
2021-08-23 jmadill@chromium.org Skip all dEQP-EGL.functional.resize.surface_size on Linux/NV.
2021-08-23 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 9eb5acaba94c to 6aad52e1aef6 (5 revisions)
2021-08-23 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 1dec6c3c106b to 1262ad6fdd3f (7 revisions)
2021-08-23 syoussefi@chromium.org Translator: Be more explicit about precisions
2021-08-23 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 873a11ee2df8 to 2136fe7a73f0 (293 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 herb@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: herb@google.com
Test: Test: Fortnite MEC
Test: Test: angle_perftests --gtest_filter="*scrabble_go*"
Test: Test: angle_perftests --gtest_filter="*wordscapes*"
Change-Id: I95fbfd728a4b768b0393a9a166f874fe3a34ee56
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441710
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-08-25 05:40:17 +00:00
skia-autoroll
02c7dac0be Roll Dawn from dd1a5b3ad3e0 to 6fa34f80bd4a (9 revisions)
https://dawn.googlesource.com/dawn.git/+log/dd1a5b3ad3e0..6fa34f80bd4a

2021-08-25 zhaoming.jiang@intel.com Adding VB OOB validation for zero array stride
2021-08-25 lokokung@google.com Adds placeholders for ETC2/ASTC compression texture format
2021-08-25 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 568136dd102a to 87cce20f679d (1 revision)
2021-08-24 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 6d60c046e80a to 568136dd102a (3 revisions)
2021-08-24 enga@chromium.org Fix a bug with D3D12 buffer alignment computation
2021-08-23 brandon1.jones@intel.com Add Tag for Unimplemented Labels to ObjectBase Constructor
2021-08-23 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 367f5df5c355 to 6d60c046e80a (1 revision)
2021-08-23 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 1fa6f5ce9ba8 to 367f5df5c355 (1 revision)
2021-08-23 cwallez@chromium.org Remove typedefs for passed deprecations

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from 1fa6f5ce9ba8 to 87cce20f679d

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 rharrison@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: rharrison@google.com
Change-Id: Ie362d4c32379e247202bdb6104dfee05934838ff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441709
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-08-25 05:03:41 +00:00
Brian Osman
9155b338bb Revert "Add ES3 intrinsics isinf/isnan to public SkSL ES3."
This reverts commit e43714f490.

Reason for revert: Several Pixel (Adreno) devices failing the test

Original change's description:
> Add ES3 intrinsics isinf/isnan to public SkSL ES3.
>
> The ES3 spec doesn't mandate that `isnan` actually has to do anything,
> so the Isnan test is not enabled. (It doesn't work on my personal
> machine unless I make the NaN detectable at compile-time.)
>
> We do not support these functions in constant-expressions, as we
> currently avoid optimizing anything into a non-finite value; we leave
> expressions alone if we calculate a NaN/inf result for their value.
>
> Change-Id: Ibfdfb47b6e6134165c8780db570de04a916d2bfa
> Bug: skia:12022
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441581
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

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

Change-Id: I89899ed391aa870350d0452bab4a0fb75bd7be38
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:12022
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441716
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-08-25 02:55:09 +00:00
Chris Dalton
80fc31bc61 Set --internalSamples for nanobench
Use 4 internal msaa samples on mobile and AppleM1, otherwise 8.

Bug: skia:12372
Change-Id: Ic64d93d65d9fef89df08f7471f9552b4a2546316
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441682
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-08-24 21:34:17 +00:00
Brian Osman
293497e77f Convert internal sample() calls to shade/filter/blend
Bug: skia:12302
Change-Id: I8cf958acf9214d0de903a4097647afd74f2a659e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441541
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-08-24 21:03:44 +00:00
Ravi Mistry
7b3edfa659 Fix Flutter bot by using vpython3 from cipd and setting env vars for it
Change-Id: I429771c977a0f01805ea49077fe8cda642f1a477
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441308
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2021-08-24 20:20:49 +00:00
John Stiles
e43714f490 Add ES3 intrinsics isinf/isnan to public SkSL ES3.
The ES3 spec doesn't mandate that `isnan` actually has to do anything,
so the Isnan test is not enabled. (It doesn't work on my personal
machine unless I make the NaN detectable at compile-time.)

We do not support these functions in constant-expressions, as we
currently avoid optimizing anything into a non-finite value; we leave
expressions alone if we calculate a NaN/inf result for their value.

Change-Id: Ibfdfb47b6e6134165c8780db570de04a916d2bfa
Bug: skia:12022
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441581
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-08-24 19:23:48 +00:00
John Stiles
c332739531 Remove 0/x arithmetic simplification.
If x is a known compile-time constant value, it can already be optimized
to a final value.
If x is not known, it could be zero, and 0/0 should result in a NaN.

Change-Id: I643a7c6da0a43ec366235c4df39fc78d3b361de7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441580
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-08-24 19:18:41 +00:00
Brian Osman
9746f20a04 Tweak Overflow.sksl to generate the same output on Windows & other OS
Change-Id: I26754745aa26313a2f76a86bd41699c7ac5b8a46
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441596
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-08-24 18:29:17 +00:00
Michael Ludwig
8c75b2d30e Simplify conservative clip tracking for SkNoPixelsDevice
Deletes SkConservativeClip as a type, it was only used by
SkNoPixelsDevice at this point.

Simplifies the clip tracking to only rely on intersect/difference ops
(but also expands it to support updating overall bounds if the diff
op is a sufficiently large rectangle).

Adds SkRect::roundIn() -> SkIRect to match the exposed API for round()
and roundOut().

Bug: skia:10205
Change-Id: I1337a51a8a4e51f94fe2b5f9ab29a0b5058b8094
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437737
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2021-08-24 18:23:43 +00:00
Brian Osman
f8a550491e SkSL: Use type-specific sampling intrinsics, rather than fn-call syntax
After further discussion, using intrinsics with signatures similar to
sample keeps us looking like GLSL. However, using "sample" is still
misleading, so this adds explicit "shade", "filter", and "blend"
intrinsics. After migrating clients, the "sample" versions will be
removed.

Bug: skia:12302
Change-Id: Ia03e4b3794fc1fc5ae3c3099a7a350343ec7702e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441457
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-08-24 18:18:46 +00:00
John Stiles
878d8fbf2f Improve constant folding for boolean vectors.
The additional tests from http://review.skia.org/441238 uncovered a gap
in the constant folder's abilities; it was not able to fold away
boolean vector comparisons even when they were constant. These are ES2
constant-expressions, so folding them properly is a requirement.

Change-Id: Ia0b4d5d1215c5fc2b247ac3f0dec4c8747d2153e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441579
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-24 18:12:12 +00:00
Ethan Nicholas
877858a195 Removed unnecessary GL extensions
We've been cargo-culting these extensions around for a long time, but it
appears they aren't actually necessary.

Change-Id: I536ec9b81643c7d35f108d230233bb6990fcb5d7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441519
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2021-08-24 17:34:17 +00:00
John Stiles
0c4dd7ae3d Add ES3 versions of min/max/mix/clamp to public SkSL.
I've also added a new runtime_intrinsics slide which plots all of the
ES3 section 8.3 intrinsics for testing purposes. We already had SkSL
tests for the ES3 versions of these functions in intrinsics/.

Change-Id: Ie4cec34cacddc26be78dce1e641de8172fcefd99
Bug: skia:12022
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441578
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-08-24 17:14:50 +00:00
John Stiles
6f90c702e6 Improve runtime-intrinsic plotting.
Instead of a series of green dots, we now get a smooth antialiased line.
This is especially useful on high-DPI displays, as previously the green
dots had gaps between them (making the plot appear as a dashed line).

Change-Id: I947e9ec31fafd133a2458bf508102fedd3eaea1a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441577
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-24 15:48:17 +00:00
Michael Ludwig
53009db137 Reland "Downgrade giant clip ops' AA in SkRasterClipStack"
This reverts commit f248b35d75.

Reason for revert: adding guard around aa disabling

Original change's description:
> Revert "Downgrade giant clip ops' AA in SkRasterClipStack"
>
> This reverts commit 3a15110898.
>
> Reason for revert: needs a build flag to roll into g3
>
> Original change's description:
> > Downgrade giant clip ops' AA in SkRasterClipStack
> >
> > Anti-aliased path rendering in the software backend has an internal
> > limit of +/-16384 per coordinate. Path rendering is triggered by draws
> > and clips. Draws are tiled at a high-level before entering the blitter,
> > so this limit will not be encountered. Coverage mask generation for
> > AA clips, however, is not tiled. Normally, it relies on the path being
> > clipped by the underlying device dimensions. When the device itself
> > is larger than 16384, then the clip ops can reach the blitter and
> > exceed the internal limit.
> >
> > When this happens, SkScan::FillPath adds a hard rect clip, which is
> > what caused the mis-applied clip seen in the attached bug report.
> >
> > This CL detects when the canvas/device dimensions are large enough to
> > cause this problem and forcefully disables anti-aliasing for all clips.
> > This shouldn't really be a visual behavior change since the blitter
> > already was downgrading from AA. The main advantage is that the clip
> > stack will use SkRegion for BW clips exclusively instead of switching
> > to use SkAAClip.
> >
> > It was decided to handle this at the clip stack level vs. a per-op
> > decision since a non-AA large clip element used with SkAAClip (
> > triggered by a smaller non-problematic op) would still show the bug.
> >
> > This is only a mitigation. The long-term solution is to use tiling for
> > clipping as well as drawing (possibly by requiring the tiling to be
> > handled by clients, with surface creation failing at sizes > 16k).
> >
> > Bug: chromium:1240718, skia:7998
> > Change-Id: I1f4cae540bec4d44c6e1d8032ded9e95ff32b82f
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441456
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
>
> TBR=reed@google.com,michaelludwig@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
>
> Change-Id: I6008cef5f7df48f27497e2ec75db14584c2acb68
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:1240718, skia:7998
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441520
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

# Not skipping CQ checks because this is a reland.

Bug: chromium:1240718, skia:7998
Change-Id: Ie152db8dd95b1f40cbfa26c1c4543601f3f53754
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441497
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2021-08-24 15:46:19 +00:00
Jorge Betancourt
e1fb47daac [JetSki] plumb experimental SkText to JetSki
Change-Id: I972ff5bd066ff9e8afa98f506e6fe9d6b9dc621a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440597
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2021-08-24 15:34:21 +00:00
Brian Osman
b5282f0112 Migrate runtime effect sample tests to golden files
Much easier to maintain, especially with an upcoming change to the
sampling syntax.

Change-Id: I378811b7be0afcce5b7e68a942e7b46d96568155
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441518
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-08-24 15:19:44 +00:00
Ethan Nicholas
0f36d11c1d Report pending errors from MetalCodeGenerator
This mirrors the change in https://skia-review.googlesource.com/c/skia/+/441311,
but for Metal this time.

Change-Id: I1abdb844b6392c81252532f9ff4a91b993edb66e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441401
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2021-08-24 15:08:31 +00:00