Commit Graph

50958 Commits

Author SHA1 Message Date
Jim Van Verth
4b6f37d902 Move MacOS 10.13 Metal jobs to 10.15.
Compilation of Metal shaders on 10.13 is unstable and keeps crashing
the bots.

Change-Id: If4e707b80a6ca20f989b504b5bab33c8b2dcaac6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320297
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Weston Tracey <westont@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-09-29 15:23:15 +00:00
Stephen White
c73bff39bd Dawn: factor SKSL-to-SPIRV conversion, creation of ShaderModule.
Change-Id: Ia5cf75d40234e53fcbf49b4c6af96fd66844267e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320273
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Stephen White <senorblanco@google.com>
2020-09-29 14:52:35 +00:00
skia-autoroll
842805ced1 Roll Chromium from 8563523f5c74 to 339e4ec27552 (471 revisions)
8563523f5c..339e4ec275

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: I2df7ca3182d4fa1d17c6969e97a194897d986c4e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320503
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-09-29 06:05:34 +00:00
skia-autoroll
01bbe189b0 Roll Dawn from ed2b465f8607 to b2a4e87ad274 (8 revisions)
https://dawn.googlesource.com/dawn.git/+log/ed2b465f8607..b2a4e87ad274

2020-09-28 enga@chromium.org Un-skip WriteTexture test on Swiftshader
2020-09-28 enga@chromium.org Roll third_party/swiftshader/ e8dd233c7..2014e7b92 (79 commits)
2020-09-28 cwallez@chromium.org Use typed integers for the ExecutionSerial
2020-09-28 cwallez@chromium.org D3D12: Use typed integers for the ExternalMutexSerial
2020-09-28 cwallez@chromium.org D3D12: Use typed integers for the HeapVersionID
2020-09-28 cwallez@chromium.org Use typed integers for the Fence FenceAPISerial
2020-09-28 cwallez@chromium.org Use typed integers for the Buffer MapRequestID
2020-09-28 cwallez@chromium.org SerialQueue/Map: Take the serial type as type paramater.

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 cwallez@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: cwallez@google.com
Change-Id: I05a4bcc40bfda4b86e75edc1f6f80a2bfe121957
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320497
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-09-29 04:57:04 +00:00
skia-autoroll
1fdcd38987 Roll SwiftShader from b94db86cf9b3 to 44be0942f9a8 (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/b94db86cf9b3..44be0942f9a8

2020-09-28 bclayton@google.com Pipeline: Fix return type of SIMD::Pointer::limit()
2020-09-28 bclayton@google.com Pipeline: Assign to SpirvRoutine::pointCoord

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: I4e1e863ea3bbd09a238c18e623f14ae82e0682fb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320498
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-09-29 04:42:15 +00:00
Ethan Nicholas
e96cdd18ac moved SkSL IntLiteral data into IRNode
Change-Id: I3c6e968af6eba32eae1f1402f7603f27e949c638
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320067
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-09-28 21:06:43 +00:00
John Stiles
70025e5dac Remove fKind field from BasicBlock::Node.
The node's kind can be easily inferred by presence of a statement or
pointer inside of it. When there are only two kinds, having a separate
field doesn't add value. (If we end up wanting more block types in the
future, we could re-add fKind as a private field.)

Change-Id: I8e9db122b4a82728d987c4913a7bdff85b4b1a2d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320298
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>
2020-09-28 20:48:33 +00:00
Herb Derby
80f6e4e558 air gap SkStrikeServer API from implementation
This is the second CL for isolating the Chrome
remote glyph cache API from the implementation.

See CL/320074 for the first CL, which handles
SkStrikeClient.

Pull out the rest of the tracing functionality.

Change-Id: I4d6aa4bf648a0d2d55cecedbe445a05c27e3a986
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320256
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-09-28 20:43:33 +00:00
Ethan Nicholas
1fd6116b25 moved SkSL DoStatement's data into IRNode
Change-Id: I936a939c105a9707d9cd7bcfdcf3e642c8f5c99a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320259
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-09-28 20:30:33 +00:00
Jim Van Verth
c2d10ef667 Add deprecation warning when running Metal on older OSes.
Older versions of MacOS are unstable when compiling shaders, and we
don't have the testing support for older versions of iOS.

Bug: skia:10777
Change-Id: I95d9fe0f1007af6bec5c7525dacda565e32989f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320260
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-09-28 20:14:43 +00:00
Brian Salomon
c993fe60be Work around python 2 shutil.copy2 date bug
ninja 1.9.0+ exposes a bug in python shutil.copy2 where a copied file's
date is the src's date but rounded. This can cause ninja to think the
copied file is slightly older than the src and trigger unnecessary work
when building.

https://github.com/ninja-build/ninja/issues/1554

Change-Id: I53247453f38a1c98c5d832bdda0f68effbe786c2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320261
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-09-28 20:12:13 +00:00
Greg Daniel
427d8ebf30 Fix offscreen drawing when cleaning up vulkan viewer.
When using offscreen draws, we save the "previous" frame in fLastImage
in viewer. However this image holds a ref to the GrContext. When we
were destroying the vulkan context we thought we were destroying the
GrContext before the VkDevice but fLastImage was keeping it alive.

This changes makes sure to reset fLastImage when we are done with it.

Change-Id: Ib70e069a261f939217436a9f052d7565581cd230
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320263
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
2020-09-28 19:41:03 +00:00
John Stiles
3d921f1b2c Add unit test to demonstrate lack of SkSL swizzle optimization.
The right side of assignments will collapse redundant swizzles, but the
left side does not. Code like this can actually cause the ByteCode-
Generator to assert if it is run (it asserts in `swizzle_is_simple`
during code generation).

Change-Id: I891912fe0b5de2670dfa95f6702a86d5c42bb2ec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320296
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>
2020-09-28 19:02:03 +00:00
John Stiles
06febefd7e Add 'tricky' OutParams golden output.
This was adapted from a test in SkSLInterpreterOutParams and presents a
challenging double swizzle.

Change-Id: Icb7b3bbb18d4b3cfa0c26acb524c08812ba88096
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319920
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>
2020-09-28 18:52:13 +00:00
Mike Klein
81b8ba2ed6 impl q14 in JIT using even lanes
We have options how to represent 8 Q14 values in a ymm,
mainly either in the 8 low 16-bit lanes or in the 8 even 16-bit lanes.

I've tried both and the even-lane approach is nicer:
   1) many operations are the same for 32-bit or 16-bit
   2) splat and splat_q14 constants can share the same pool
   3) to_q14 and from_q14 are essentially noops

Interestingly, over in the interpreter we use dense 16-bit storage for
Q14 to operate most efficiently there, so we've kind of already proved
the thesis that each backend should have this flexibility.

Change-Id: I4d5a40159d46b6b24413087d0837128e6477752d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319335
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-09-28 18:47:34 +00:00
Herb Derby
d82e2c1ec1 air gap SkStrikeClient API from implementation
All the interface classes in SkRemoteGlyphCache have too
many Skia types exposed during compilation. This is
causing c++17 compilations to fail. This is the first
of a few CLs to isolate Skia better.

In addition, remove the tracing functionality. I will
add it back when I need it again.

Change-Id: I5d4efe7aadb5e8be2a863784dbbe5398afb09666
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320074
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-09-28 18:38:33 +00:00
Ben Wagner
525f8a6fbc Respect kGenA8FromLCD when creating mask from path.
Ideally the surface onto which a glyph is drawn will not affect the
glyph metrics. In order to do this the kGenA8FromLCD flag must be
respected by the scalar context so that requests for subpixel rendering
always produces subpixel rendering metrics but the subpixel mask mixed
down to non-subpixel rendering should the canvas not support it.

Not supporting this can cause odd behavior when measuring one way but
then drawing the other way.

Change-Id: Id08ffa14483b4650459a2f0351da2ffdea81e3c5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319696
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-09-28 18:37:53 +00:00
Herb Derby
f0b5644e6b introduce SkGlyphRect specialized for union & intersect
SkGlyphRect is a rectangle encoding specialized for
union and intersect. It will be used for calculating
the bounding boxes of glyph runs, and clipping glyphs
for GPU.

Change-Id: Icab826b51dc2254ee4006ada84f7fc09e112a933
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319697
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-09-28 18:31:33 +00:00
John Stiles
bc0c29ead3 Fix call counts for intrinsic functions.
This allows dead-stripping to properly optimize away unreferenced clones
of intrinsic functions, and allows the inliner to detect intrinsic
functions that are only called once (which can generally always be
inlined without penalty).

Change-Id: I0cf034d880ae5d52f4cc0f93de6e2c7aad34e975
Bug: skia:10776
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320258
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>
2020-09-28 18:04:34 +00:00
John Stiles
e41b4ee49e Reland "Support out parameters that use a swizzle."
This is a reland of 435b482638

inlineStatement now takes a `const Expression* resultExpr` instead of
`const Expression& resultExpr` because resultExpr will be null for a
void function.

Original change's description:
> Support out parameters that use a swizzle.
>
> This CL also removes the `VariableExpression` class that was briefly
> added in a prior CL. This class was intended to support cloning an
> expression while changing the refKind of a VariableReference inside of
> the expression, but it added state and complexity. In this CL, rather
> than track this via extra state, the inliner just recurses into the
> expression as needed to find its VariableReference. Since most relevant
> expressions are just a VariableReference anyway, this is inexpensive.
>
> Change-Id: Id4d926b7d7520b5e6ce455446c05a6d59ef62a84
> Bug: skia:10756
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319917
> Commit-Queue: John Stiles <johnstiles@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

Bug: skia:10756
Change-Id: I35f76c21eccf0ba2ab47e4313e131f7aa26980fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320223
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-09-28 17:34:03 +00:00
Michael Ludwig
3dad80308d Check SkRRect::transform result, don't assume S+T matrix is safe
Bug: chromium:1132739
Change-Id: I67b7ac535232925e98e44c0bb90964fded9f4d05
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320068
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-09-28 17:13:33 +00:00
skia-autoroll
9c983682e4 Roll Chromium from 6a3c229fa0dc to 8563523f5c74 (1024 revisions)
6a3c229fa0..8563523f5c

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: I79e8bd25db601e0878e1f88780ccc231b8c7977a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320076
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-09-28 17:12:33 +00:00
Ben Wagner
12857d405c Fix gms placing text in bounds.
In the operation of taking the bounds of (horizontal text) and then
drawing the text within those bounds it is necessary to draw the text at
the origin of the bounds and not at the left edge of the bounds.

Change-Id: I712e1713ca5e0be929b11f526f224141a5310cc2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319776
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-09-28 16:35:13 +00:00
Brian Salomon
8ff24492e2 Log more info for Chrome bug 1132617
Bug: chromium:1132617
Change-Id: I88950bc782a7f0ab4431b1f9646750731c8069f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320063
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-09-28 16:22:16 +00:00
Greg Daniel
314e7e522b Use sk_sp for GrVkImageViews.
This is just part of the occasional refactoring to slowly move all of
vulkan resource tracking to sk_sp instead of manual ref/unrefs

Change-Id: I2ed4d5bb4c6acfc89dc6d797019977e1c4bd5d1a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320065
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-09-28 16:18:13 +00:00
Robert Phillips
defd223d40 Add correctness checks to GrThreadSafeViewCache tests
Bug: 1108408
Change-Id: I8e815003808624fcd767e5e9a579d3f17e7ddb46
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319781
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-09-28 15:43:53 +00:00
Brian Osman
6bfa63fe39 Revert "Support out parameters that use a swizzle."
This reverts commit 435b482638.

Reason for revert: ASAN/UBSAN unhappy.

Original change's description:
> Support out parameters that use a swizzle.
>
> This CL also removes the `VariableExpression` class that was briefly
> added in a prior CL. This class was intended to support cloning an
> expression while changing the refKind of a VariableReference inside of
> the expression, but it added state and complexity. In this CL, rather
> than track this via extra state, the inliner just recurses into the
> expression as needed to find its VariableReference. Since most relevant
> expressions are just a VariableReference anyway, this is inexpensive.
>
> Change-Id: Id4d926b7d7520b5e6ce455446c05a6d59ef62a84
> Bug: skia:10756
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319917
> Commit-Queue: John Stiles <johnstiles@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

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

Change-Id: Ibdda47607f9e6e7f3a7459915067cf5e20919993
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10756
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320220
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-09-28 15:36:35 +00:00
Michael Ludwig
e5d5eedd2d Update SkClipOp::kMax_EnumValue to match non-deprecated values
Even when expanding clip ops were disabled, the max value allowed the
fuzzer to produce those disabled values. This should fix the fuzzer to
only produce valid intersect or difference clip ops.

Bug: chromium:1132687
Change-Id: I7368ff36a00e6b0e87ecbae5ba647d249299b9ca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320064
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-09-28 15:30:33 +00:00
Herb Derby
ca9dac83bd remove unused call from remote glyph cache API
Change-Id: I34d3b17844dac35804e1dd54caed2c264a737b0d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320066
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-09-28 15:23:13 +00:00
John Stiles
a976da7e2f Simplify IsAssignable to only support one assignable var.
Now that ternaries are no longer supported for assignment (as per GLSL
spec), there's no longer any cases where an assignment can target more
than one variable reference at a time. Replace the output vector of
VariableReferences `assignedVars` with a single VariableReference,
`assignedVar`.

Also, allow callers to pass null for the ErrorReporter. This is useful
if inability to assign to an expression does not actually indicate an
error condition.

Change-Id: I146a9d1a488131ac5048c665e4dc880d895a275a
Bug: skia:10767
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319859
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-09-28 15:18:33 +00:00
Kevin Lubick
6a189f23af [fuzz] Add CIFuzz taskdriver
This is too slow at the moment to run on the CQ (~50 minutes), but
metzman@ is planning on caching a bulk of the work needed before
we can compile the fuzzers.

Bug: skia:10713
Change-Id: I664b8afbdb9fa57a4bce3aa479ffce3c70b684ee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317283
Reviewed-by: Eric Boren <borenet@google.com>
2020-09-28 15:17:24 +00:00
Kevin Lubick
f95c8629d1 [canvaskit] Use linear metrics in shaping demo
Subpixel and slight hinting also make a big difference.

Change-Id: I1b942caf20dbdcf8bebc3504695c673fbe7e4392
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319791
Reviewed-by: Ben Wagner <bungeman@google.com>
2020-09-28 15:16:13 +00:00
John Stiles
435b482638 Support out parameters that use a swizzle.
This CL also removes the `VariableExpression` class that was briefly
added in a prior CL. This class was intended to support cloning an
expression while changing the refKind of a VariableReference inside of
the expression, but it added state and complexity. In this CL, rather
than track this via extra state, the inliner just recurses into the
expression as needed to find its VariableReference. Since most relevant
expressions are just a VariableReference anyway, this is inexpensive.

Change-Id: Id4d926b7d7520b5e6ce455446c05a6d59ef62a84
Bug: skia:10756
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319917
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-09-28 15:04:33 +00:00
Kevin Lubick
f83f4c63fd [canvaskit] Increase timeout for RenderSKPs
Also add a skiplist to bypass a skp that is (hopefully temporarily)
timing out.

Change-Id: I912bd901a985ae86adfed13db102a1e7fee5686a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320060
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-09-28 15:01:08 +00:00
Ethan Nicholas
59d660c075 Revert "Revert "moved SkSL BoolLiteral data into IRNode""
This reverts commit 5648572f4a.

Change-Id: If9b1f46f4d4d94beca6953d0fef3b8d79c88572d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320059
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-09-28 14:13:32 +00:00
John Stiles
7a6935a528 Update OutParams unit test to demonstrate SkSL failure.
Swizzles in combination with out params are currently broken in SkSL.
They are fixed in the followup CL at http://review.skia.org/319917

Change-Id: I22d9436a15631e6ee2acf9fc312a8634cf3b5407
Bug: skia:10756
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319918
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>
2020-09-28 14:09:03 +00:00
skia-autoroll
ad6aeace6e Roll dawn from eec9edfd5769 to ed2b465f8607 (2 revisions)
https://dawn.googlesource.com/dawn.git/+log/eec9edfd5769..ed2b465f8607

2020-09-27 jiawei.shao@intel.com Report more detailed error information for the failures of mapAsync
2020-09-25 hao.x.li@intel.com Query API: QuerySet on Metal

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 cwallez@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: cwallez@google.com
Change-Id: I02c4b9bd190a508acb0cce3da4989ae009a2157d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320078
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-09-28 04:36:52 +00:00
skia-recreate-skps
0922403dcd Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=rmistry@google.com
NO_MERGE_BUILDS

Change-Id: I77a9c41af9578b452aa0ff663f7eb26e34e36730
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320025
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-09-27 06:24:51 +00:00
Mike Klein
eabce08bb2 move paint color to Params
Not really sure why it's still in BlitterUniforms when it doesn't change
from blit to blit... it's really more like the paint SkFilterQuality.

The only real caveat is that we need to take care to push the same
uniforms in cache_key() and build_program(), in particular making sure
we reuse the paint color uniforms if there's a clip shader.

Change-Id: I4c82b43b72b2a64341568f49f2f6dabad17fbc3e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319767
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-09-26 16:33:43 +00:00
Mike Klein
5648572f4a Revert "moved SkSL BoolLiteral data into IRNode"
This reverts commit a05d27b170.

Reason for revert: Google3 roll,

third_party/skia/HEAD/src/sksl/SkSLTestRehydrator.cpp:311:15: error: no type named 'Dehydrator' in namespace 'SkSL'
        SkSL::Dehydrator dehydrator;

Original change's description:
> moved SkSL BoolLiteral data into IRNode
>
> Change-Id: I177b6daf4d6cb024ba20264ab01d0aa68e768a6d
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319782
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

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

Change-Id: I76bcdc7ef914448b439df81cd382066980e1251e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320017
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-09-26 14:49:04 +00:00
Fredrik Söderqvist
766eeb2ac3 Return target rect for SkPictureImageFilter forward bounds mapping
When mapping bounds in the forward direction, return the target rect of
the picture (fCropRect). This matches the behavior of SkImageSource
which can be considered to be semantically similar.

Bug: skia:10744
Change-Id: Ief213a847041ea6b276b2e7493e49db01715eda9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319616
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-09-26 13:05:30 +00:00
Chris Dalton
5e1545fa00 Finish recording tessellation pipelines
Bug: skia:10419
Change-Id: I37493f0b99490e43798292cbc9f8df87a102001e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319516
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-09-26 00:18:40 +00:00
Ethan Nicholas
a05d27b170 moved SkSL BoolLiteral data into IRNode
Change-Id: I177b6daf4d6cb024ba20264ab01d0aa68e768a6d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319782
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-09-25 22:57:20 +00:00
John Stiles
68861e3913 Add unit tests for assignment and invalid field access.
Change-Id: I8b755ae0078d6353e24834cd15603091d681114c
Bug: skia:10766
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319698
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-09-25 21:42:22 +00:00
Mike Klein
2c62e7e40c factor out some helpers in SkVMBlitter
device_coord() and paint_color() get the device coordinate
as skvm::Coord and paint color as skvm::Color respectively.

Change-Id: Ia35c635d073b5aa7f4369340cff108027728cb74
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319765
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-09-25 21:36:50 +00:00
Mike Klein
fe1a97a926 split apart uniformPremul()
It's doing two or three separate things, and I think it's clearer to do
the color conversions and premul up front, leaving just uniformColor().

Change-Id: I65a2f5eac86129924bf30f00a879ae01a1e737a5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319764
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-09-25 21:34:10 +00:00
Mike Klein
cac130ffc1 to_foo() -> to_Foo()
This tweak makes these conversion functions' names
match the names of the types, e.g. to_F32() makes F32.

Change-Id: I4d71c9bd17d835d09375e3343ee4316082b02889
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319763
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-09-25 21:31:45 +00:00
Brian Salomon
4e48490717 Remove deprecated Vulkan GrBackendRenderTarget constructor
Change-Id: I3bda64f7c03245e751bb19520ec7ed07e5c1d59e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319780
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-09-25 21:28:40 +00:00
John Stiles
c14defb8bf Disallow assignment to unfoldable ternaries in SkSL.
GLSL does not support assigning to ternaries, and will fail to compile
and/or generate non-functional shaders if we pass in a shader that tries
to assign into a ternary expression.

If SkSL is able to completely eliminate the ternary (e.g. if it boils
down to a simple `true ? x : y` or `false ? x : y`), SkSL can strip out
the ternary entirely and generate valid GLSL. This case is harmless and
so it is still allowed.

Change-Id: I960f119fb9934f998697634e6c4e519cd77d3780
Bug: skia:10767
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319679
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-09-25 21:26:40 +00:00
John Stiles
3fabfc0bd1 Fail gracefully when Metal encounters a geometry shader.
Change-Id: I452e52a87d89cefb5c21a0d9d57e9771f3038d73
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319783
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>
2020-09-25 21:21:50 +00:00