Commit Graph

60195 Commits

Author SHA1 Message Date
Ethan Nicholas
ccd85d5835 Improved positions of for loop errors
Bug: skia:13173
Change-Id: Ifbcce77605dd781563568293fc501dfa31f143da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528706
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-04-21 16:56:12 +00:00
Jim Van Verth
dfab663577 De-namespace uses of MaskFormat
Bug: skia:13118
Change-Id: Iab67fd1148182fdd29a38b69f27c51b13942a2b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532400
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-04-21 15:55:21 +00:00
Dominik Röttsches
bcc249a7e4 Remove code gated by flags for COLRv1 fixes
Remove code suppressed by SK_IGNORE_COLRV1_TRANSFORM_FIX and
SK_IGNORE_COLRV1_SWEEP_FIX as these flags are no longer used on the
Chromium side and the respective tests were rebased there.

Bug: chromium:1316318
Change-Id: Ic3235524e366688067310f489919bbbaa9a8a094
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532056
Auto-Submit: Dominik Röttsches <drott@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-04-21 15:47:40 +00:00
Brian Salomon
eb738a0939 Remove guards for legacy kStrict behavior
Bug: skia:10481
Bug: skia:13078
Bug: skia:10411
Bug: skia:13036
Change-Id: Ifa5882b37ce974def779a9fa2a0f8a9bf26f09b7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532476
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-04-21 15:34:12 +00:00
Robert Phillips
0fb10ab912 [graphite] Update GMs to have graphite-backed gpu SkImages (take 2)
This makes part of of our testing infrastructure (i.e., the GMs)
compatible with Graphite's more stringent requirements.

Bug: skia:12701
Change-Id: I5e42d93050eccc1e455f46e07b64654ad3d4548c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531997
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-04-21 14:59:41 +00:00
Michael Ludwig
9af6e97e6a Replicate stroked line endpoints when converting to cubics
For lines with very large floating point coordinates, Wang's formula
doesn't actually return a value close to 0, even though the exact math
should for lines encoded as (a, 2/3a+1/3b, 1/3a+2/3b, b).

Since PatchWriter assumes the lines only need one segment, it doesn't
evaluate Wang's formula for lines. When the GPU re-evaluates Wang's
formula for a cubic that happened to come from a line, it can then have
a significant over estimate in the number of segments required if the
coordinates are really large.

This has been mitigated by GrStrokeTessellationShader uploading the
max edge count as a uniform so that the over-estimate is then clamped
back to a more reasonable value. By switching to (a, a, b, b), the
cubic is still visually a line but can be inspected quickly in the
shader and just skip evaluating Wang's formula entirely. This means
we will always use a single segment, and we unblock later changes that
let us remove the max-edge-count uniform from the stroke tessellation
shader.

It is possible that we could add the new trait and shader detection
logic to the fill curve and wedge shaders, but they aren't susceptible
to this because they don't rely on sk_VertexID to reconstruct 't'.

Bug: skia:12703, skia:13056
Change-Id: I95324a70d6429fef74d8abfaf6adaf95480a0879
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532014
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-04-21 14:56:00 +00:00
Jim Van Verth
c069b813a7 [graphite] More steps towards a shared DrawAtlas class.
* Move Rectanizer classes to a shared location
* Have GrDrawOpAtlas store SkColorType and explicit bytes-per-pixel
  instead of GrColorType.

Bug: skia:13118
Change-Id: Ib5c3d79394c89dce7f06e8eddf09a5f6a9543a7f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531320
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-04-21 14:20:45 +00:00
Kevin Lubick
14ab6ab256 Roll Dawn from 93a2bed032a9 to 4091e0fa9c1e (18 revisions)
https://dawn.googlesource.com/dawn.git/+log/93a2bed032a9..4091e0fa9c1e

2022-04-21 lokokung@google.com Factor out common cache testing code.
2022-04-21 yunchao.he@intel.com Update webgpu-cts/expectations.txt
2022-04-21 enrico.galli@intel.com D3D12: Duplicate first/baseVertex on Draw[Indexed]Indirect
2022-04-21 lokokung@google.com Adds typing to cache keys to avoid clashes.
2022-04-21 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 158676f39f3b to df3a617e7556 (6 revisions)
2022-04-21 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from ea5f37f39193 to 71f3089b729c (5 revisions)
2022-04-20 lokokung@google.com Adds new BlobCache "re-declaration" of PersistentCache.
2022-04-20 enga@chromium.org Check GLFW window creation before discovering GL adapters
2022-04-20 bclayton@google.com tools/src/cts/result: Add more helpers
2022-04-20 bclayton@google.com tools/src/cts/query: Add Tree
2022-04-20 dsinclair@chromium.org Fixup readability/casting lint issues
2022-04-20 dsinclair@chromium.org Ignore remaining explicit warnings.
2022-04-20 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 55c21842b204 to b2a1f0d28a62 (8 revisions)
2022-04-20 dsinclair@chromium.org Ignore BindingLayoutEntryInitializationHelper for runtime/explicit.
2022-04-20 yunchao.he@intel.com D3D12: work around buffer size insufficient issue for copy
2022-04-20 dsinclair@chromium.org Fix test expectation missing blank line.
2022-04-20 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 1380023f9816 to 158676f39f3b (1 revision)
2022-04-20 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from b5af7cabd5ea to ea5f37f39193 (1 revision)

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 shrekshao@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
Change-Id: I82a8b90efddf8174d9e35ce36be82a60be1ce15c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532396
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-04-21 12:47:30 +00:00
Kevin Lubick
f4d0c2c9c8 [bazel] Move skcms and vulkanmemoryalloctor to subdirs
It's time to better organize //third_party/BUILD.bazel

This CL starts by moving the "third party" stuff we closely own.

Change-Id: I3e0be0044b790794e94f34af6202860ce0a7b7aa
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531999
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-04-21 12:15:50 +00:00
skia-autoroll
bd8f8686cc Roll ANGLE from 5014ce664ca5 to 6cbedc98406c (22 revisions)
5014ce664c..6cbedc9840

2022-04-21 syoussefi@chromium.org Add a test for backwards mip generation with draw
2022-04-20 cclao@google.com Vulkan: Remove BufferVk::mHasBeenReferencedByGPU
2022-04-20 senorblanco@chromium.org D3D: unsuppress some now-passing tests.
2022-04-20 abdolrashidi@google.com Vulkan: Add perf test for MSAA swapchain resolve
2022-04-20 syoussefi@chromium.org Vulkan: Fix surface invalidate w.r.t shared present mode
2022-04-20 cnorthrop@google.com Tests: Add Free Fire Max trace
2022-04-20 jmadill@chromium.org Vulkan: Cache ImageView serials on texture changes.
2022-04-20 romanl@google.com Use adb directly (instead of catapult) in gold tests.
2022-04-20 jmadill@chromium.org Fix validate state cache after XFB buffer deleted.
2022-04-20 gman@chromium.org Metal:Clear Backbuffer when Robust Resource Init enabled
2022-04-20 kkinnunen@apple.com CGL, MTL: pbuffer for IOSurface fails for some formats
2022-04-20 jmadill@chromium.org Vulkan: Renaming "ShaderBuffers" to "ShaderResources".
2022-04-20 antonio.caggiano@collabora.com Re-land: "Vulkan: Support Wayland"
2022-04-20 syoussefi@chromium.org Fix ANGLEGetDisplayPlatform after method deprecation
2022-04-20 wnwen@chromium.org Switch to using //build/android:build_java
2022-04-20 jmadill@chromium.org Track total vs per-frame descriptor set counters.
2022-04-20 m.maiya@samsung.com Vulkan: Acquire a new buffer even when size is unchanged
2022-04-20 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 00e1ddd4230c to 158676f39f3b (8 revisions)
2022-04-20 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 103a69bd6c82 to ea5f37f39193 (3 revisions)
2022-04-20 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from e1b5a693bbfe to a434f1de2483 (504 revisions)
2022-04-20 syoussefi@chromium.org Generate feature variable names from display names
2022-04-20 syoussefi@chromium.org Revert "Fix BlendStateExt::mMaxColorMask initialization"

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 wrightgeorge@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: wrightgeorge@google.com
Test: Test: BufferDataTestES3.BufferDataWithNullFollowedByMap*Vulkan
Test: Test: angle_perftests --gtest_filter="*free_fire_max*"
Change-Id: I8e61632cd986369aaf262c9226cadb92a0f2bf84
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532224
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-21 05:35:07 +00:00
skia-autoroll
325bd76633 Roll vulkan-deps from 87d837a653ef to df3a617e7556 (4 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/87d837a653ef..df3a617e7556

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-skia-autoroll
Please CC wrightgeorge@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:Build-Debian10-Clang-x86_64-Debug-Dawn;skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE
Bug: None
Tbr: wrightgeorge@google.com
Change-Id: I9b131a331ed50b036592476cc2c6389fee59ef12
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532228
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-21 05:20:11 +00:00
skia-autoroll
bda8740dc4 Roll Chromium from ec55e318ba2b to ef42d9817ebd (476 revisions)
ec55e318ba..ef42d9817e

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

To file a bug in Chromium: https://bugs.chromium.org/p/chromium/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: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: wrightgeorge@google.com
Change-Id: I14ed5b008a6a0a661de6b3e4cea5b1a9a38c7cab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532223
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-21 05:03:46 +00:00
skia-autoroll
3dd3e09d32 Roll SwiftShader from ea5f37f39193 to 71f3089b729c (5 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/ea5f37f39193..71f3089b729c

2022-04-20 capn@google.com Revert "Temporarily ignore unsupported feature struct"
2022-04-20 swiftshader.regress@gmail.com Regres: Update test lists @ 88fe9ce0
2022-04-20 capn@google.com Automate downloading .git/hooks/commit-msg
2022-04-20 capn@google.com Run all LLVM passes in LLVMJIT.cpp
2022-04-20 swiftshader.regress@gmail.com Regres: Update test lists @ ea5f37f3

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

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

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

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

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: wrightgeorge@google.com
Change-Id: I8badd606868ddfd2abade5a3c770255e33638f99
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532225
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-21 04:42:40 +00:00
John Stiles
846eca6c72 Add support for dependent modules in sksl-precompile.
For now, the hierarchy of module dependencies is hard-coded into
dehydrate_sksl.py. (It is already hardcoded into SkSLCompiler.cpp, but
not in a way that is easily accessible to sksl-precompile.)

sksl-precompile now takes one output and an arbitrary number of inputs.
The inputs are processed from right to left, layering their symbol
tables as we go. e.g., sksl_frag is compiled like this:

  sksl-precompile sksl_frag.dehydrated.sksl sksl_frag.sksl sksl_gpu.sksl

At present this doesn't change anything, because every module is
written in a standalone fashion (since nothing else was allowed). I've
demonstrated that these changes actually work as intended in a
followup example CL (not meant to be submitted).

Change-Id: Ifac638537f77b4a9c78b8cd94a6c4efd4bad01cc
Bug: skia:13164
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532197
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-04-20 23:04:21 +00:00
John Stiles
6074d9e9ed Add ProgramConfig::IsVertex/IsFragment helper functions.
In a followup CL, we will have new ProgramKinds: `kGraphiteFragment` and
`kGraphiteVertex`. These accessors will add support for the new kinds.

Change-Id: I3fec7a8c02c56a855b7b33dd8c5b7e05263d5f1d
Bug: skia:13110
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532258
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-04-20 23:04:09 +00:00
Herb Derby
9f46ce7a28 Remove the fSupportBilerpAtlas field
Change-Id: I128364f345fde9b041afedd414c1a862214f6dba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531258
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-04-20 21:28:40 +00:00
George Wright
b14c982bf6 Revert "Check that the GrBackendFormat of a promise image is textureable."
This reverts commit 866bd64c1b.

Reason for revert: breaks unit test DDLTextureFlagsTest

Original change's description:
> Check that the GrBackendFormat of a promise image is textureable.
>
> Bug: chromium:1311844
> Change-Id: I13bae71305ae9520851cd1ea38a1da737b934dd1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532196
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

Bug: chromium:1311844
Change-Id: I741eed4514111b3682a8ee5821cf462dcaf444a7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532284
Auto-Submit: George Wright <wrightgeorge@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-04-20 20:56:20 +00:00
Ethan Nicholas
87e472722f Improved error reporting ranges for swizzles
Bug: skia:13171
Change-Id: I6dffb98ac2464f930995cf8ea57e422091d20fd2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531743
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-04-20 20:46:51 +00:00
John Stiles
df76b7341f Add helper function to pick an op/spvid by type.
This pattern was repeated several times in the code, so now it's a
dedicated function.

Change-Id: I31c32414aca3bc99ab655d8a480a849184a11037
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531836
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-04-20 20:45:41 +00:00
John Stiles
e720daba2d Remove unused context parameter.
Change-Id: I2be73f4e5ac7841b6b3ecc85206a316789a5d786
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531745
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-04-20 20:38:30 +00:00
Brian Osman
707bc17aae Fix allocation size for Slugs
Avoids buffer overrun if sizeof(GrTextBlob) < sizeof(Slug)

Change-Id: If770eb2a337f2b7ee9a5c7576d155f60c39d9cf7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532256
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-04-20 20:33:38 +00:00
Greg Daniel
866bd64c1b Check that the GrBackendFormat of a promise image is textureable.
Bug: chromium:1311844
Change-Id: I13bae71305ae9520851cd1ea38a1da737b934dd1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532196
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-04-20 19:42:43 +00:00
Herb Derby
6c76aeb21d Remove NoCache refs from AtlasTextOp::Geometry
Bug: skia:13214
Change-Id: I4aee7bd73711a464371ebe7892335bfce2fdd09a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529279
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-04-20 18:52:41 +00:00
Herb Derby
8b43af48e7 Remove all the *NoCache subruns
Bug: skia:13214
Change-Id: I5e9d2401f74cf0909b3a17b0e0145df3dbdfa1a5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529813
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-04-20 17:30:12 +00:00
Kevin Lubick
99d5d0fe67 Fix typo in tests
Change-Id: Id12f811c1dc6a6070bb52ff2278234679ce49aff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532136
Reviewed-by: Greg Daniel <egdaniel@google.com>
2022-04-20 16:57:44 +00:00
skia-autoroll
cea960921f Roll vulkan-deps from 158676f39f3b to 87d837a653ef (2 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/158676f39f3b..87d837a653ef

Also rolling transitive DEPS:
  https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Headers from 82becc8a8a92 to 46b7918218d0
  https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools from 2b2b0282af25 to 671f6e633f42

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-skia-autoroll
Please CC wrightgeorge@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:Build-Debian10-Clang-x86_64-Debug-Dawn;skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE
Bug: None
Tbr: wrightgeorge@google.com
Change-Id: I4ddb2987061232f56b0b0179bc28aa9c6bc594cf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531963
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-20 16:42:33 +00:00
Kevin Lubick
ed60541341 [bazel] Silence gazelle warnings for unknown files
Change-Id: Id3824d5b72a6e8b28535c78254629fd506e5185d
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532082
Reviewed-by: Florin Malita <fmalita@google.com>
2022-04-20 16:33:18 +00:00
Yotam Hacohen
4d5eaf95ec Remove 'invert' call from 'SetDeviceCoordinateSystem'
Instead of inverting 'deviceToGlobal', we pass the invert to the
function. 0.1% of all cpu time (M1 Mac) for Motionmark1.2 is spent
doing this inversion.

We can remove a matrix inversion in setDeviceCoordinateSystem by
taking advantage of the fact that we can easily compute the
inverted matrix from values available on hand. The code previously
computed:
  fGlobalToDevice = (priorDeviceToGlobal * newLayerMappingLayerToDevice)'
We have access to the following values:
  newLayerMappingLayerToDevice' = newLayerMappingDeviceToLayer
  priorDeviceToGlobal' = priorGlobalToDevice
With the matrix property (A * B)' = B' * A', we can calculate:
  fGlobalToDevice = newLayerMappingDeviceToLayer * priorGlobalToDevice

Change-Id: I39656f244fa5f907536d09d69f585f09f156f133
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527505
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-04-20 16:27:02 +00:00
Kevin Lubick
72680f0c88 Remove mdbviz
The MultiDrawBuffer no longer exists.

Change-Id: I31c2df9a5363daab018e33156104e3dd7904230e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532012
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-04-20 15:59:50 +00:00
Florin Malita
ec8c595b9f [skottie] Add transform tracking to SkottieSlide
Add UI options to select a named transform for tracking, and render a
decoration to highlight the transformed origin.

Change-Id: I2a51278150e7098034e1f6e00b268fce69558b44
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531551
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
2022-04-20 15:55:24 +00:00
John Stiles
628d9278b6 Factor out SPIR-V validation to a helper function.
This was intended to be a cleanup pass before adding spirv-opt support,
to avoid overloading `toSPIRV` with stuff. I'm no longer confident that
we need to run a spirv-opt trial, but the cleanup still seems like a
tiny win.

Change-Id: If5b0a627b400545d150d41189aca74f6fd0e856a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532010
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-04-20 15:54:16 +00:00
Jim Van Verth
48d50633ef [graphite] Move some atlas-related types to a shared header
Bug: skia:13118
Change-Id: Ica760f58107de021b7823f69b94809dd2f313ac7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531739
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-04-20 15:35:58 +00:00
Michael Ludwig
610ef02504 Manual Dawn roll with bazel build update
Change-Id: Ia4dac275a8614d7597e5c17cae77ad3770ba27e2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532001
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-04-20 15:00:45 +00:00
Herb Derby
36704ee978 Reland "Use Slugs to render non-Blob text"
This is a reland of commit f274197de1

Original change's description:
> Use Slugs to render non-Blob text
>
> Weaken the assert to allow Slugs to draw if the matrix is the same as
> when the Slug was created with.
>
> Bug: skia:13214
> Change-Id: If0820408208378d57711afb31082a918c00ffc63
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529811
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Herb Derby <herb@google.com>

Rerun-Tryjobs: true
Bug: skia:13214
Change-Id: I1c144a4c28be8b6e65ee1672170bf51c988f6db2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529938
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-04-20 15:00:38 +00:00
James Godfrey-Kittle
94b2f1f295 Use python3 explicitly when building
Also updates a python invocation in the docs to be consistent with
https://skia.org/docs/user/download/#clone-the-skia-repository.

Change-Id: Ic5560052d96738a492b52c87362741ee84dbdabe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531744
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: James Godfrey-Kittle <jamesgk@google.com>
2022-04-20 14:49:24 +00:00
Herb Derby
dffa36d141 Make Slug and Blob render the same
Using .isTranslate to detect compatible matrices was just wrong. This
was forcing the drawing throught the inverse matrix calculation path
causing all the pixels to be slightly off. Correctly detect if
the matrices are the same except for translate.

Change-Id: I2497920bdbb1b0e3edf32b9a469fe8b14bdab351
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531796
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-04-20 14:11:48 +00:00
Harry Terkelsen
50012bd88e Enable WASM cross-compilation by correctly using current_cpu
Change-Id: I5964d330f87949fd214873693204a153d22282a8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529205
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-04-20 11:31:35 +00:00
skia-autoroll
55daca632d Roll ANGLE from 197100880118 to 5014ce664ca5 (17 revisions)
1971008801..5014ce664c

2022-04-20 cclao@google.com Vulkan: Add orphaned list for non-empty BufferBlocks.
2022-04-19 jmadill@chromium.org Vulkan: Use flat array lookups for shader variables.
2022-04-19 senorblanco@chromium.org D3D: fix SSBOs used in vertex shaders.
2022-04-19 lexa.knyazev@gmail.com Fix BlendStateExt::mMaxColorMask initialization
2022-04-19 cclao@google.com Vulkan: Encapsulate ShareGroup::mContexts
2022-04-19 jmadill@chromium.org gold tests: Add command-line arg for gold instance.
2022-04-19 geofflang@google.com Mark contexts as shared when importing EGL images.
2022-04-19 jmadill@chromium.org Vulkan: Prep variable info map to remove hashing.
2022-04-19 cnorthrop@google.com Revert "Infra: Enable Skia Gold tests on Pixel 6"
2022-04-19 cnorthrop@google.com Tests: Add Monster Strike trace
2022-04-19 jmadill@chromium.org Use ProgramExecutable directly in GlslangWrapper.
2022-04-19 jmadill@chromium.org Add FastMap class.
2022-04-19 jmadill@chromium.org Skip a Vulkan test due to a threading flake.
2022-04-19 jmadill@chromium.org Revert "vulkan: Call glFinish in VulkanHelper destructor"
2022-04-19 b.schade@samsung.com Add check for GL_ANDROID_extension_pack_es31a support
2022-04-19 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 1a408eb154d7 to 00e1ddd4230c (8 revisions)
2022-04-19 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from e9b55eb91cb1 to e1b5a693bbfe (303 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 wrightgeorge@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: wrightgeorge@google.com
Test: Test: angle_perftests --gtest_filter="*monster_strike*"
Change-Id: I7012678ad80369107d93a667249753f0568d2c79
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531877
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-20 05:34:07 +00:00
skia-autoroll
d5b23300e9 Roll Chromium from e44993cc0096 to ec55e318ba2b (477 revisions)
e44993cc00..ec55e318ba

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

To file a bug in Chromium: https://bugs.chromium.org/p/chromium/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: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: wrightgeorge@google.com
Change-Id: Ic5373b99e119ceec6cbbe310f246b6318ff3baab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531876
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-20 04:54:42 +00:00
skia-autoroll
5b64108aa7 Roll SwiftShader from 103a69bd6c82 to ea5f37f39193 (3 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/103a69bd6c82..ea5f37f39193

2022-04-19 capn@google.com Support the new LLVM pass manager
2022-04-19 ayzhao@google.com Backport fix for C++23 incompatibility in llvm
2022-04-19 capn@google.com Delete the legacy OpenGL ES implementation's source code

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

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

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

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

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: wrightgeorge@google.com
Change-Id: Id4709f27a6ddf29f10d17df6884b29e8ce17c7b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531878
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-20 04:48:11 +00:00
Greg Daniel
2cf8e9b602 Reland "Update VMA to latest version."
This is a reland of commit f33cf451a2

Original change's description:
> Update VMA to latest version.
>
> This is needed so that we can use non skia supplied vk_mem_alloc.h on
> clients that have already updated to newest version. As we transition
> to Bazel builds this helps to make it so we can set the rules for
> specific clients around VMA without things breaking
>
> Bug: skia:13211
> Change-Id: I5d38a3a91a44f6b3fdf75894a3248ee3991dd5d9
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531157
> Reviewed-by: Kevin Lubick <kjlubick@google.com>

Bug: skia:13211
Change-Id: Ia4a863819a7d0bb4763f1b516acfa1cc76c47a8a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531548
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-04-20 00:07:47 +00:00
Robert Phillips
163a7eaf10 Revert "[graphite] Update GMs to have graphite-backed gpu SkImages"
This reverts commit 932801c29e.

Reason for revert: unhappy bots

Original change's description:
> [graphite] Update GMs to have graphite-backed gpu SkImages
>
> This makes part of of our testing infrastructure (i.e., the GMs)
> compatible with Graphite's more stringent requirements.
>
> Bug: skia:12701
> Change-Id: I5d2bf44a1f044797971a1cf6874cf1819d715ca6
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/530539
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

Bug: skia:12701
Change-Id: I1da473800efd2110c14883d63086a82af53effe2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531742
Auto-Submit: Robert Phillips <robertphillips@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-04-19 20:56:14 +00:00
Robert Phillips
932801c29e [graphite] Update GMs to have graphite-backed gpu SkImages
This makes part of of our testing infrastructure (i.e., the GMs)
compatible with Graphite's more stringent requirements.

Bug: skia:12701
Change-Id: I5d2bf44a1f044797971a1cf6874cf1819d715ca6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/530539
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-04-19 20:19:41 +00:00
skia-autoroll
ffba7ace41 Roll vulkan-deps from 1a408eb154d7 to 158676f39f3b (16 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/1a408eb154d7..158676f39f3b

Also rolling transitive DEPS:
  https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Cross from 6a67891418a3 to d7cae5e7cd32
  https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools from cb96abbf7aff to 2b2b0282af25

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-skia-autoroll
Please CC wrightgeorge@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:Build-Debian10-Clang-x86_64-Debug-Dawn;skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE
Bug: None
Tbr: wrightgeorge@google.com
Change-Id: Id8540345f53013e1f76330ec1fe44742fa4cc22f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531693
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-19 19:59:12 +00:00
George Wright
09c7277dd0 Revert "[infra] Update iOS device provisioning profile."
This reverts commit a370ecf9fc.

Reason for revert: This broke iOS and Mac bots

Original change's description:
> [infra] Update iOS device provisioning profile.
>
> We're moving from Apple's Enterprise program to their Developer program,
> which requires a new profile. Versions 7 and 8 were mistaken uploads of
> who-knows-what by yours truly, so we skip them.
>
> Change-Id: I1b7913781eae5c643e60b47ad374a4365cef7bce
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531553
> Reviewed-by: Ravi Mistry <rmistry@google.com>
> Commit-Queue: Erik Rose <erikrose@google.com>

Change-Id: Icbf9fbf6ed1b84a884ed6aeeebe37ea04ad14bb2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531696
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: George Wright <wrightgeorge@google.com>
2022-04-19 18:49:51 +00:00
Herb Derby
c68df46606 Remove bilerp from GrTextBlob except for fSupportBilerpAtlas field.
Change-Id: If586b3797bb458bf8806d3d030b2ed94e07b990f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531257
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-04-19 18:03:11 +00:00
Herb Derby
07f53c1bb6 Remove bilerp flag from GrTextBlob's API
Change-Id: Ie1330ee4f9ae2eeedb0dfb378b753dcfd9293107
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531322
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-04-19 17:34:35 +00:00
Erik Rose
a370ecf9fc [infra] Update iOS device provisioning profile.
We're moving from Apple's Enterprise program to their Developer program,
which requires a new profile. Versions 7 and 8 were mistaken uploads of
who-knows-what by yours truly, so we skip them.

Change-Id: I1b7913781eae5c643e60b47ad374a4365cef7bce
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531553
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Erik Rose <erikrose@google.com>
2022-04-19 17:32:36 +00:00
John Stiles
721a07f5f6 Optimize away self comparisons in SPIR-V.
(This mirrors an optimization performed in the constant folder.)

Expressions like `OpIEqual %20 %20` or `OpFUnordNotEqual %15 %15` can be
replaced by `true` or `false` on sight. The GLSL spec makes it clear
that checking for NaN is optional:

4.7.1 Range and Precision
"... NaNs are not required to be generated. Support for signaling NaNs
is not required and exceptions are never raised. Operations and built-in
functions that operate on a NaN are not required to return a NaN as the
result."

Change-Id: I2e29b659a73582e9ade0eb61f70f7d362a007c50
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531550
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-04-19 16:10:03 +00:00
John Stiles
fce87a43e6 Move store-cache handling into writeLabel.
Previously, every expression/statement type was responsible for
pruning or clearing the store-cache when branches were involved. This
was difficult to reason about and easy to get wrong, particularly if
the details are not fresh in your mind.

Now, `writeLabel` takes care of the details for you. Pass in the
location of the branch(es) which use the label, and the proper cache
updating behavior will occur automatically.

Some of the label enum types are not strictly necessary and exist for
the benefit of a reader. Specifically:
 - `kBranchlessBlock` and `kBranchIsOnPreviousLine` are synonyms
 - `kBranchIsBelow` and `kBranchesOnBothSides` are also synonyms

The hope is that extra enum names will be easier for a reader to
follow, versus fewer but very-verbose enum names (like
 `kBranchIsBelowOrOnBothSides`).

This change earned some very minor switch-related dividends. Previously,
every label in a switch was treated as a forward-branch, but in fact,
the very first label in a switch is privileged. This is because we are
branching from the previous line, and the store cache is trustworthy in
this case. (Versus "branching from above," where the store cache needs
to be pruned before it can be trusted.)

Change-Id: I38b539069c22be9f0777b632f60f0eab2409d687
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531540
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-19 15:17:01 +00:00