Commit Graph

52113 Commits

Author SHA1 Message Date
John Stiles
62a564686f Simplify VarDeclaration by removing multi-dimensional array support.
Maintaining an array of Expression-based sizes is not necessary as GLSL
only supports a single dimension, and doesn't allow any expression other
than a constant integer or nothing (meaning "unsized").

Change-Id: I01b5f88b94234a27e694aa2fc087f9d5f01b99c5
Bug: skia:11026
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340341
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-12-03 16:32:44 +00:00
John Stiles
9ea48e3965 Disallow multi-dimensional arrays in SkSL.
GLSL only allows one-dimensional arrays. This CL lowers SkSL's array
dimensionality limit from eight to one, and fixes all the tests that
this breaks. The rest of the code still technically supports
arbitrarily-deep array dimensionality; there are many opportunities for
code cleanup and simplification in followup CLs.

Change-Id: I0fc31e4626649ec69d40c5f5597b3924de298df0
Bug: skia:11026
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340339
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-12-03 16:28:19 +00:00
John Stiles
076e9a2f34 Disallow returning array types in SkSL.
This is illegal in older versions of GLSL and in Metal. We now fail at
SkSL compilation time and properly report the error.

Change-Id: I6ddaeabff5386a1ed6ca3eb8703a6035476ec77a
Bug: skia:11021
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339298
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-12-03 16:27:39 +00:00
John Stiles
3dba3ee465 Fix various codegen issues for Metal array types.
This CL fixes cases where array dimensions could be placed on the type
instead of the variable (`float[2] x` instead of `float x[2]`). It also
reports errors in cases where arrays aren't syntactically valid in
Metal, rather than emitting unusable Metal code. (Some of these cases
are actually invalid GLSL as well! But those fixes are coming in
followup CLs.)

Change-Id: I22279127c8a9aa2f22bf5ea3d225e563c2e254f2
Bug: skia:10926, skia:10760, skia:10761
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340137
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-12-03 16:20:39 +00:00
Florin Malita
2f24405250 [skottie] Add image sampling and transform options
Expand the SkImageAsset API to support controlling sampling options and
pass an additional transform.

Bug: skia:10944, skia:10942
Change-Id: I7bad0b2ab58ed40fe4b425de0eb6970a4c7d7117
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340097
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-12-03 16:17:24 +00:00
Jim Van Verth
f557aef55f Use MTLCommandBuffer status to determine if completed.
Flutter is seeing an issue with adding completedHandlers to a command
buffer when running on iOS 11. This works around that by changing our
completion check to use the built-in status member rather than setting
up and checking a semaphore.

Bug: b/173700659
Change-Id: Ie9ffdfc85ad48f4613224d410284a85660dd3622
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340336
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-12-03 16:12:39 +00:00
Mike Klein
f5097db452 add store64
Ideally we'd use st2.4s here but that needs its inputs in adjacent
registers, and I don't have a mechanism for that (yet).  So instead
interlace manually using zip1/zip2.

Tested by SkVM_64bit.

Change-Id: I7b05fcd1f4398012755fc4f0d4e39743d0c69a94
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340518
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-12-03 16:12:19 +00:00
Mike Reed
2d8bd15588 get 4x4 initialMatrix in pictureplayback
Bug: skia:11031
Change-Id: Ib502870a43b295ad6932ee95a839128d54963019
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339984
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-12-03 15:29:18 +00:00
Mike Reed
8c1ad7e8d3 stop using bitmapcontroller
This moves all shaders to a common utility for resolve the mip-level
request.

Change-Id: I26709d5a55adf97cb4c61473527a9bbbdc689aa5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339897
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-12-03 15:27:08 +00:00
Ben Wagner
f5e1bf9f01 Remove NVIDIA_Shield bots.
There aren't any NVIDIA_Shield bots to run these tasks, so remove them.

Also remove the old buildbucket.config generator.

Change-Id: I229b9acfc0e1b30385a503b60ca4d46f87931955
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340099
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-12-03 15:00:48 +00:00
Julia Lavrova
f9433fa316 Fixing some round problems with metrics
Bug: skia:10996
Change-Id: I003086d3625bb713f4f6c682346ab190dddd7426
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339856
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2020-12-03 14:52:23 +00:00
Robert Phillips
4b10d58fc9 Fix bug in GrClearOp combining and remove some asserts (take 2)
The buffer combining code path was combining the ops but never
telling the external system that the second op could be removed.

Bug: skia:10963
Change-Id: I887ebda91673d37139ebc7fc427e80a55b9d9bd1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340101
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-12-03 13:40:05 +00:00
skia-autoroll
9f3f2c24ae Roll ANGLE from 0f083ab02635 to 8670d6183a84 (11 revisions)
0f083ab026..8670d6183a

2020-12-03 m.maiya@samsung.com Add support for GL_EXT_debug_label
2020-12-03 ianelliott@google.com Vulkan: Use VK_EXT_device_memory_report extension
2020-12-02 syoussefi@chromium.org Vulkan: I/O blocks: Support unsized arrays
2020-12-02 jonahr@google.com Reland "Reinitialize GL_VENDOR string when GPU switches"
2020-12-02 syoussefi@chromium.org Vulkan: Clean up render pass query code
2020-12-02 syoussefi@chromium.org Create helper for identifying builtin names
2020-12-02 syoussefi@chromium.org Vulkan: Support OES_shader_io_blocks
2020-12-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from db49fa80f93d to d76e39a75a7a (585 revisions)
2020-12-02 ianelliott@google.com Revert "Reinitialize GL_VENDOR string when GPU switches"
2020-12-02 xinghua.cao@intel.com Add a doc for translating uniform block to StructuredBuffer
2020-12-02 syoussefi@chromium.org Vulkan: Minimize gl_PerVertex members

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 westont@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: westont@google.com
Change-Id: I64102f4043a939f2946dc21b5f3f50d2d64a2f56
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339978
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-12-03 05:05:22 +00:00
skia-autoroll
71d3f30be2 Roll SwiftShader from bfb211914759 to bae138de13ac (8 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/bfb211914759..bae138de13ac

2020-12-02 amaiorano@google.com Reactor: add Type* member to Value and remove vtable
2020-12-02 amaiorano@google.com Fix crash from rr::Array with ENABLE_RR_DEBUG_INFO enabled
2020-12-02 natsu@google.com Guard VK_GOOGLE_SAMPLER_FILTERING_PRECISION
2020-12-02 amaiorano@google.com LLVM: add option to emit asm file to aid debugging
2020-12-02 amaiorano@google.com Coroutine: allow a name to be passed in for routine generation
2020-12-02 amaiorano@google.com ReactorUnitTests: use test name as Routine names
2020-12-02 amaiorano@google.com LLVM: store input name in JITRoutine
2020-12-02 amaiorano@google.com Fix FunctionT not forwarding its varargs

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 westont@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: westont@google.com
Change-Id: I444c35171c37e6befd25780d8d498e669029cc67
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339977
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-12-03 04:43:02 +00:00
skia-autoroll
27c78da79f Roll Dawn from 6f5151f6572b to 3668d352bc5f (6 revisions)
https://dawn.googlesource.com/dawn.git/+log/6f5151f6572b..3668d352bc5f

2020-12-02 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 782f6a5e3e3c to 685cb02ea8d9 (15 revisions)
2020-12-02 rharrison@chromium.org Do not assert in work thread during tests
2020-12-02 enga@chromium.org OpenGL: Bind a dummy sampler for OpImageFetch if not present
2020-12-02 cwallez@chromium.org Reenable BufferMappedAtCreationOOM on Windows
2020-12-02 cwallez@chromium.org docs: Mention to add `use_system_xcode=true`
2020-12-02 shaobo.yan@intel.com CopyTextureForBrowser: Support flipY option

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 dsinclair@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: dsinclair@google.com
Change-Id: I8d5fe190fcb49089eaeb4e1d3040b789e909949b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340270
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-12-03 04:38:22 +00:00
Brian Salomon
c7112edbe0 Fix swizzles in clear_swizzle GM
Original version swizzled the alpha value. This isn't really allowed
because of blend equations that use alpha coeffs. When doing
color+alpha drawing we have to use the format's alpha channel
as alpha in the swizzle.

TBR: michaelludwig@google.com

Bug: skia:11019
Change-Id: I38922b966d37974b250904ad5c0ea825728b8c77
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340340
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-12-03 01:22:52 +00:00
Mike Klein
5334e8976d Revert "restore murmur3 for older iOS devices"
This reverts commit 3c161467f0.

Reason for revert: need to keep iOS simulator (Build-Mac-Clang-x64-Release-iOS) in mind

Original change's description:
> restore murmur3 for older iOS devices
>
> For reference, the relative costs are roughly,
>    - our hash with CRC32c instructions    1x
>    - Murmur3                             11x
>    - our hash with CRC32c fallback       23x
>
> So this should be a ~2x speedup for those
> older iOS devices not using an arm64e slice.
>
> Bug: skia:11001
> Cq-Include-Trybots: luci.skia.skia.primary:Test-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Debug-All,Test-iOS-Clang-iPhone11-GPU-AppleA13-arm64-Debug-All,Test-iOS-Clang-iPhone6-GPU-PowerVRGX6450-arm64-Debug-All,Test-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Debug-All,Test-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Debug-All
> Change-Id: Ib56195ddc0c522380d263d56e767331d9f635728
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340178
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

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

Change-Id: I0e3b23e63c33910e482031d7475feb624bd6e1f6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11001
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340396
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-12-02 22:39:01 +00:00
Leon Scroggins III
469d67e7d9 Expose more info in SkCodec::FrameInfo
Bug: b/160984428

Add more fields to SkCodec::FrameInfo, which describes the properties of
an individual frame in an animated image. This allows a client that
wishes to seek to determine frame dependencies so that they can decode
an arbitrary frame, which in turn will allow SkCodec to remove
SkCodec::FrameInfo::fRequiredFrame. Currently, SkCodec seeks through the
stream to determine frame dependencies, but this is unnecessary work
(and storage) for a client that does not want to seek.

These fields also support the proposed APIs in go/animated-ndk.

Move SkCodecAnimation::Blend from SkCodecAnimationPriv (and delete that
file) into SkCodecAnimation.h. Rename its values to be more clear.

Merge common code for populating SkCodec::FrameInfo.

Add a test for a GIF with offsets outside the range of the image. Note
that libwebp rejects such an image.

Update libgifcodec.

Change-Id: Ie27e0531e7d62eaae153eccb3105bf2121b5aac4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339857
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Nigel Tao <nigeltao@google.com>
2020-12-02 22:37:20 +00:00
Mike Klein
bb1933e0d6 simplify SkSamplingOptions field names
SkSamplingOptions has no methods, so there's no need
to use an fPrefix to distinguish its fields from locals.
They'll always be accessed by foo.filter, bar->mipmap, etc.

Change-Id: Ia27ebea26d03eba60036616508731c4d2020462c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340356
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-12-02 22:30:00 +00:00
Mike Klein
dcc8960bc2 make SkSamplingOptions fields const
This lets us trust the invariants that the constructors set up,
like if fUseCubic, then fMipmap == SkMipmapMode::kNone.

Gotta be slightly sneaky and implement operator= ourselves
with placement new.

Change-Id: I043cd56cbf9f1e2fa64ab585268b2799df65c31f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340179
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-12-02 22:15:58 +00:00
Brian Salomon
07bc9a27f5 GPU clear values: just 4 floats
We previously represented these as SkPMColor4f. However, upcoming
changes will add limited support for clearing/drawing to unpremul
dst. Just store the clear values as four floats without assigned
interpretation.

Also, noticed a bug by code inspection: we weren't accounting for
write view swizzle in GrRTC. Fixed and added gm to test.

Bug: skia:11019
Change-Id: I1bce1f6c97a156c0377ebad1b166eb641362b67a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340098
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-12-02 22:04:08 +00:00
Tyler Denniston
4be95c541c Add test for quadratic Wang's formula
Just verify that the max error on any of the intervals after splitting
is less than the specified tolerance. Looks like we're running into
some FP precision issues with large coord values, so I'm limiting the
max multiplier to 2^15 in this test.

Bug: skia:10419
Change-Id: I39e76dca5f77389833ba3c94930e6b67c2b1bc97
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340116
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2020-12-02 20:50:27 +00:00
Mike Klein
3c161467f0 restore murmur3 for older iOS devices
For reference, the relative costs are roughly,
   - our hash with CRC32c instructions    1x
   - Murmur3                             11x
   - our hash with CRC32c fallback       23x

So this should be a ~2x speedup for those
older iOS devices not using an arm64e slice.

Bug: skia:11001
Cq-Include-Trybots: luci.skia.skia.primary:Test-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Debug-All,Test-iOS-Clang-iPhone11-GPU-AppleA13-arm64-Debug-All,Test-iOS-Clang-iPhone6-GPU-PowerVRGX6450-arm64-Debug-All,Test-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Debug-All,Test-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Debug-All
Change-Id: Ib56195ddc0c522380d263d56e767331d9f635728
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340178
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-12-02 20:17:26 +00:00
John Stiles
6bef6a7858 Fix flipped array dimensions in SkSL.
The proper approach for creating multi-dimensional array types is
complicated, so I added a function in SymbolTable which does it the
right way (addArrayDimensions). I found all the places in SkSL which
created arrays from base types and size arrays, and refactored them to
call addArrayDimensions instead of doing it manually.

I believe that this approach fixes a bunch of minor issues with multi-
dimensional array types; some are visible in the current codegen output,
and others are latent bugs. e.g. in some instances, a Variable's type()
was silently holding flipped array dimensions, but this never led to
a visible bug because we ended up using the VarDeclaration's baseType()
plus sizes() everywhere that the type was used. (In particular, this
caused debugging headaches in http://review.skia.org/340137 where I'd
use a Variable's type and suddenly its array dimensions would be wrong.)

Change-Id: Idd6a86aa5d1dce8918d02a53bcc2f7d7886e3ac5
Bug: skia:11016, skia:10924
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339860
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-12-02 20:07:57 +00:00
Ben Wagner
f25787b72c Subpixel anti-aliasing in FreeType 2.8.1+
FreeType 2.8.1 and later always provide some form of subpixel
anti-aliasing.

Bug: skia:10950,skia:6663
Change-Id: I666cc942e73b73073cdabf900c25faa10d9aaf0f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339861
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-12-02 19:51:07 +00:00
Robert Phillips
9443d58af2 Revert "Fix bug in GrClearOp combining and remove some asserts"
This reverts commit 35f1b20840.

Reason for revert: ANGLE failures

Original change's description:
> Fix bug in GrClearOp combining and remove some asserts
>
> The buffer combining code path was combining the ops but never
> telling the external system that the second op could be removed.
>
> Bug: skia:10963
> Change-Id: If015d877ffbbb75964aae9ca92ea760d7041372a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339203
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>

TBR=robertphillips@google.com,michaelludwig@google.com

Change-Id: Ie188190e7ecf2c39ec067296af20a9794636a226
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10963
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340177
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-12-02 18:21:08 +00:00
John Stiles
799b32e25d Disable inliner on Functions.sksl.
This reintroduces the flipped-array-dimensions bug in skia:10924. It
will be fixed in followup CLs.

Change-Id: I24ec687209b397f5fd0cf44194d0e21fe30dc32c
Bug: skia:10924
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339797
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-12-02 17:48:36 +00:00
Brian Osman
a48c233e7b Remove unused inColor
Change-Id: Id99c907bc0cd309d88b5527babf44b5ad05b971b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340156
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-12-02 17:44:57 +00:00
Herb Derby
40894189c8 hoist the common matrix code for filling vertices
Change-Id: Ic10a5b8d7c41b17de097385a0264e5379acc9687
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340136
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-12-02 17:36:06 +00:00
Mike Klein
0861331ff7 Revert "add CPU feature detection for iOS / ARM Mac"
This reverts commit 51c01588f3.

Reason for revert: doesn't work on iOS, not needed on Mac.

Original change's description:
> add CPU feature detection for iOS / ARM Mac
>
> My reference was mostly `man 3 sysctl`.
>
> I'm pretty sure 'neon_fp16' is the right bit for FP16 NEON compute and
> 'neon_hpfp' just mean's its got f32<->f16 instructions, but I could be
> mixed up.  It'll become extremely obvious once I start using that bit.
>
> Bug: skia:11001
> Change-Id: I8bb73aef71b750b766aa1d0e29878fd7a8e8d6da
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339837
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,herb@google.com,brianosman@google.com

Change-Id: Ie93605514fd806a1c708f71c52e7d80a4ef34131
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11001
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340176
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-12-02 17:26:38 +00:00
Mike Reed
387826f6f6 Remove unused SkRWBuffer
Bug: skia:10980
Change-Id: Ibbb62edcbf5a8c1bc341416aef225cae3cf1a256
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/336960
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Thiabaud Engelbrecht <thiabaud@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-12-02 15:29:06 +00:00
Brian Osman
23f00d7800 Reland "Add ByteCode output to skslc"
Reland fixes link errors in nogpu builds

This reverts commit 5fa45548b4.

Change-Id: I45e0509d0476dde3a7088c1ed66ab0118894b31e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340037
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-12-02 15:19:46 +00:00
Herb Derby
c9a24c9815 default to using new/delete for GrOp
Currently, new/delete is not on for Google3. After this
CL new/delete will be used on all platforms.

Change-Id: Idfc6217b809c9eb986e618ffa575004893b3aa0f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339859
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-12-02 15:15:26 +00:00
Kevin Lubick
658cb7173a [canvaskit] Fix drawPoints to be flattened point array
Bug: skia:11012
Change-Id: I0866f791f6fba82d073b5b5acd37aa8509b6fdef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339836
Reviewed-by: Yegor Jbanov <yjbanov@google.com>
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-12-02 15:07:57 +00:00
Brian Osman
5fa45548b4 Revert "Add ByteCode output to skslc"
This reverts commit 68da339a11.

Reason for revert: Breaking Android roll

Original change's description:
> Add ByteCode output to skslc
>
> Change-Id: I447f56a3ef464ef9a3cfc644f6ef4e4ab4e08a62
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339498
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: John Stiles <johnstiles@google.com>

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

Change-Id: Ie02d03dacc3b5ea33538d11dbb1241b8fe31fd86
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340036
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-12-02 14:14:08 +00:00
Robert Phillips
35f1b20840 Fix bug in GrClearOp combining and remove some asserts
The buffer combining code path was combining the ops but never
telling the external system that the second op could be removed.

Bug: skia:10963
Change-Id: If015d877ffbbb75964aae9ca92ea760d7041372a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339203
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-12-02 13:17:26 +00:00
skia-autoroll
f0b93642dc Roll ANGLE from 234fccfb1818 to 0f083ab02635 (5 revisions)
234fccfb18..0f083ab026

2020-12-02 jonahr@google.com Reinitialize GL_VENDOR string when GPU switches
2020-12-01 jmadill@chromium.org Reland "Vulkan: Use specialization constant for halfRenderAreaWidth"
2020-12-01 ynovikov@chromium.org Skip MultithreadingTestES3 tests on Linux Intel Vulkan
2020-12-01 m.maiya@samsung.com Reland "Vulkan: Fix incorrect exposure of sRGB extensions"
2020-12-01 jmadill@chromium.org Revert "Vulkan: Use specialization constant for halfRenderAreaWidth"

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 westont@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: westont@google.com
Change-Id: If183060cceda98a94b2536c77828d14db68b25b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339936
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-12-02 04:45:06 +00:00
skia-autoroll
1ca29cc9b8 Roll Dawn from a827aa2c29aa to 6f5151f6572b (9 revisions)
https://dawn.googlesource.com/dawn.git/+log/a827aa2c29aa..6f5151f6572b

2020-12-01 senorblanco@chromium.org Enable D* end-to-end tests on OpenGL ES backend.
2020-12-01 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from eac3c5bf5197 to 782f6a5e3e3c (50 revisions)
2020-12-01 senorblanco@chromium.org Disable some further C* end2end tests on GLES.
2020-12-01 senorblanco@chromium.org Enable most C* end-to-end tests on OpenGL ES.
2020-12-01 senorblanco@chromium.org Enable BufferTests on OpenGL ES.
2020-12-01 senorblanco@chromium.org Fix SSBO bindings in GLES backend.
2020-12-01 rharrison@chromium.org Add support for using Tint Inspector
2020-12-01 cwallez@chromium.org CommandBufferMTL: Address review comments
2020-12-01 shaobo.yan@intel.com Enable CopyTextureForBrowserTests on Vulkan/Metal Backend

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 dsinclair@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: dsinclair@google.com
Change-Id: I8c9ffb3988c03822c37cf43fbb5fd419d0db8f58
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339463
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-12-02 04:36:56 +00:00
Herb Derby
bd51ac3825 remove perspective SDF from subrun
SDF can never be perspective because of line 53 of
GrSDFTOptions.cpp. Just remove all the perspective code.

Change-Id: I7f08c05ab6f0ea2d885a8ebc6ca6f802ca9adc69
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339718
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2020-12-02 00:44:16 +00:00
Mike Klein
51c01588f3 add CPU feature detection for iOS / ARM Mac
My reference was mostly `man 3 sysctl`.

I'm pretty sure 'neon_fp16' is the right bit for FP16 NEON compute and
'neon_hpfp' just mean's its got f32<->f16 instructions, but I could be
mixed up.  It'll become extremely obvious once I start using that bit.

Bug: skia:11001
Change-Id: I8bb73aef71b750b766aa1d0e29878fd7a8e8d6da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339837
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-12-01 21:49:25 +00:00
Brian Salomon
b030b1fca9 Don't drop mip map mode in GrTextureOp->GrTextureEffect fallback
Change-Id: I900345ba52605c3b3e0f077655ec5c25bab01b9c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/337721
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-12-01 21:42:25 +00:00
skia-autoroll
c504ecda03 Roll ANGLE from 59aa1ef1975a to 234fccfb1818 (18 revisions)
59aa1ef197..234fccfb18

2020-12-01 jmadill@chromium.org Entry Points: Add egl:: namespace to Display.
2020-12-01 jmadill@chromium.org Test Runner: Handle flaky failures.
2020-12-01 jmadill@chromium.org Vulkan: Fix BufferHelper leaks in DynamicBuffer.
2020-12-01 jmadill@chromium.org Entry Points: Combine desktop GL minor versions.
2020-12-01 jmadill@chromium.org Entry Points: Clean up versions lists.
2020-12-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 9dff6a3bb595 to bfb211914759 (4 revisions)
2020-12-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 2232da5cfdfa to db49fa80f93d (475 revisions)
2020-12-01 m.maiya@samsung.com Add support for OES_framebuffer_object extension
2020-12-01 cclao@google.com Vulkan: Use specialization constant for halfRenderAreaWidth
2020-11-30 jmadill@chromium.org EGL: Generate entry points.
2020-11-30 paulthomson@google.com Capture/Replay: track swapWithDamage
2020-11-30 jmadill@chromium.org Rename FromGL to PackParam.
2020-11-30 jmadill@chromium.org EGL: Generalize the entry point enum.
2020-11-30 jmadill@chromium.org Vulkan: Use XFB queries with the XFB extension.
2020-11-30 syoussefi@chromium.org Fix ordering of stages in gl::ShaderType
2020-11-30 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from 8756b1cb930a to ce0450b9e8e5 (2 revisions)
2020-11-30 jmadill@chromium.org code gen: Be more robust to dirty hashes.
2020-11-30 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 553b5bcd72c7 to 2232da5cfdfa (287 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 westont@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: westont@google.com
Test: Test: FramebufferObjectTest*
Change-Id: I6a66fbaf4d40e993ee98aafd152f0224efc19e29
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339823
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-12-01 21:30:25 +00:00
John Stiles
986c7fb8ca Fix codegen errors with Metal return statements.
The Metal return type from main() diverges from the SkSL source, so we
patch it in the Metal code generator. This CL improves the patching
process in multiple ways:

- A `return` statement from a fragment processor main() is rewritten to:
    return *_out;

- A `return` statement from a vertex processor main() is rewritten to:
    return (_out->sk_Position.y = -_out->sk_Position.y, *_out);

- We avoid emitting a duplicate `return *_out;` statement if we can
  determine that main() already ends in a return statement. This is
  harmless either way so it doesn't necessarily catch everything. (e.g.
  it doesn't detect an if/else which returns at the end of both blocks.)

Also added a unit test which returns from the middle of a vertex shader,
since we didn't test this anywhere and we need to verify that
sk_Position.y will be negated. (This didn't work properly before.)

Change-Id: I14cf18375894fc712fa6c6466df3888ebaeba7c8
Bug: skia:10903
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339636
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-12-01 21:28:05 +00:00
Brian Osman
68da339a11 Add ByteCode output to skslc
Change-Id: I447f56a3ef464ef9a3cfc644f6ef4e4ab4e08a62
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339498
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-12-01 20:53:55 +00:00
John Stiles
842b3599c8 Enforce layout(location=...) on Metal out variables.
Previously, this would generate invalid code such as `[[user(locn-1)]]`.
We now generate a more-useful error at SkSL compilation time.

Change-Id: Ifbe335ec6d4abcbdfe89b892ba51063c94d22b11
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339397
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2020-12-01 20:41:15 +00:00
Herb Derby
46d1e9f5f2 remove use of initial matrix
This was just wrong. It should be determine perspective
using the matrix that we are drawing with, and not the initial
matrix.

Change-Id: I8410ced714d2c766305656bdbd797f9dea59b71e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339796
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-12-01 20:11:24 +00:00
John Stiles
7bd7033072 Disallow global variables containing arrays of opaque types.
GLSL only supports arrays of samplers in very limited ways; they aren't
supported at all by SkSL. We now detect arrays of opaque objects and
reject the code.

We have several paths through the IR generator that create and process
array types; the unit test covers global and local variables, and array
on the type versus array on the variable.

Change-Id: I5b45e88e31cf4005723c3bf35561622d65321f7b
Bug: skia:11008
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339317
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-12-01 20:04:14 +00:00
Ethan Nicholas
7b776b5149 Created SKSL_USE_THREAD_LOCAL define
Upcoming CLs are going to add more thread_locals to SkSL, so it makes
sense to bake this test into a convenient define.

Change-Id: I5c878b16ecc0cd6f5dfeab37d16734cb9fd270bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339717
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-12-01 19:13:43 +00:00
Mike Klein
0c2cc23561 rearrange types in SkRuntimeEffect program_fn()
Our stack contains values that are either F32 or I32, and notionally
stores them as F32, using pun_to_I32() when it's actually an int.

Instead, remove that F32 bias and store the skvm::Val, the type-erased
value ID that underlies both F32 and I32.  Then reconstruct the types as
needed using pop_F32() / pop_I32(), or the now-smarter
unary/binary/ternary.  Those helpers work in terms of Val now, and will
infer the right F32/I32 types from their argument functor.  A few other
stack manipulators now also work in a type-agnostic way.

What do you think of this instead of separate F32/I32 stacks?  The cond
and mask stacks are already conceptually crowding things a bit, and this
lets us keep the primary stack all in one place.  And it'd be tricky to
index into split F32/I32 stacks for things like kLoad, kStore, kDup.

Change-Id: I255766f35553fbb4f6cf8479b0fc6d7617bfdf08
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339676
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-12-01 18:48:33 +00:00
Herb Derby
683f572378 use SkGlyphRect to record subrun bounds
Take advantage of the integer properties that direct subrun
must have.

Change-Id: I169cf9f76332b921c013793ff17b7777f0b6bca6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339499
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-12-01 18:34:53 +00:00