Commit Graph

56993 Commits

Author SHA1 Message Date
Florin Malita
6142500513 Revert "[skottie] AllCaps support"
This reverts commit efc7ca4a71.

Reason for revert: broke Chromium, NoDEPS builds

Original change's description:
> [skottie] AllCaps support
>
> AfterEffects and Bodymovin support an "AllCaps" text flag which forces
> text capitalization.
>
>   * add toUpper() bindings to SkUnicode/SkICU
>   * add capitalization options to SkottieShaper
>   * plumb existing Lottie 'ca' (AllCaps) prop
>   * also fix a couple of unrelated whoopsies
>
> Change-Id: I8e80921b66530e9830938004946082c6e450b04b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445104
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Florin Malita <fmalita@google.com>

TBR=bungeman@google.com,fmalita@chromium.org,fmalita@google.com,jlavrova@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com

Change-Id: I3bb43f37f07cfc021e397df578499a4c4da15ca3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444980
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2021-09-03 11:55:10 +00:00
skia-autoroll
9bb2422f4b Roll SwiftShader from c82c59307208 to bac3c5559b2b (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/c82c59307208..bac3c5559b2b

2021-09-02 srisser@google.com Update git-hooks to latest revision

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 fmalita@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: fmalita@google.com
Change-Id: Icc4c2c3dd20d30430af86aa10f9e11518a915b54
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445498
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-03 05:07:45 +00:00
skia-autoroll
5438f1c1af Roll Dawn from 305f4df2b5ad to 90b41c78f94f (8 revisions)
https://dawn.googlesource.com/dawn.git/+log/305f4df2b5ad..90b41c78f94f

2021-09-02 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 03cd48424797 to 3e70f3e2ac35 (1 revision)
2021-09-02 brandon1.jones@intel.com Add check for an invalid D3D12/Vk object in SetDebugLabel
2021-09-02 brandon1.jones@intel.com Add Labels For Pipelines and ShaderModule for D3D12/Vk
2021-09-02 cwallez@chromium.org vulkan: wait for fences on ErrorInjector device loss
2021-09-02 senorblanco@chromium.org Remove all "WithTint" suffixes from Dawn native.
2021-09-02 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from cf57896d5205 to 03cd48424797 (3 revisions)
2021-09-02 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 44a0adf9b47c to cf57896d5205 (1 revision)
2021-09-02 cwallez@chromium.org Add Dawn's logo and use it in README.md

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from 44a0adf9b47c to 3e70f3e2ac35

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

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

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

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: sarahmashay@google.com
Change-Id: Ifc749ce01a423f3b1d0199a36f900c6e54e8669a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445499
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-03 05:06:44 +00:00
Brandon Jones
c3dce03362 Remove deprecated WebGPU blend factors
The previous values are about to be removed from Dawn.

Bug: chromium:1199057
Change-Id: Iec6c4e4d641a99bceae975e68ab4b53ccdc75ef0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445436
Auto-Submit: Brandon Jones <bajones@chromium.org>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-09-03 02:49:46 +00:00
John Stiles
2af4b13925 Reject programs which exceed 50 stack frames during size analysis.
Our program-size analysis pass needs to recurse into called functions;
depending on the exact order of functions in the program, this recursion
can hypothetically be as deep as the deepest function-call chain. Set an
upper bound on recursion here, so we don't overflow the stack while
trying to check the program size. In practice, 50 frames is far deeper
than a regular shader should ever go.

Change-Id: I733ee48dad6f8053facdfd9f6d8a2b9b2a4af188
Bug: skia:12396
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445279
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-09-03 02:41:34 +00:00
Florin Malita
efc7ca4a71 [skottie] AllCaps support
AfterEffects and Bodymovin support an "AllCaps" text flag which forces
text capitalization.

  * add toUpper() bindings to SkUnicode/SkICU
  * add capitalization options to SkottieShaper
  * plumb existing Lottie 'ca' (AllCaps) prop
  * also fix a couple of unrelated whoopsies

Change-Id: I8e80921b66530e9830938004946082c6e450b04b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445104
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2021-09-03 00:01:53 +00:00
skia-autoroll
88018b6e41 Roll skcms from c1e907c8f007 to cf7d3f925b87 (1 revision)
https://skia.googlesource.com/skcms.git/+log/c1e907c8f007..cf7d3f925b87

2021-09-02 lovisolo@google.com Add BAZEL.md file with build and test instructions on all supported platforms.

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

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

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

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

Cq-Include-Trybots: skia/skia.primary:Canary-Chromium
Tbr: fmalita@google.com,brianosman@google.com
Change-Id: Ic8c1fa91cdc6227f4aa27ee7a86bccd67ff1fc4d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445223
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-02 22:51:45 +00:00
skia-autoroll
0dd6959cac Roll ANGLE from 3e9fda985013 to de09f8db317d (35 revisions)
3e9fda9850..de09f8db31

2021-09-02 geofflang@chromium.org Revert "GL: Update StateManagerGL binding funcs to use ANGLE_GL_TRY"
2021-09-02 cclao@google.com Vulkan: Change TextureVk's vk::FormatID usage to angle::FormatID
2021-09-02 lubosz.sarnecki@collabora.com RendererVk: Skip VK_KHR_image_format_list on SwiftShader.
2021-09-02 jmadill@chromium.org D3D11: Fix overflow in GenerateInitialTextureData.
2021-09-02 cclao@google.com Vulkan: Store actualFormatID (not intendedFormat) in RenderPassDesc
2021-09-02 cclao@google.com Vulkan: Keep track of data format for staged updates for ImageHelper
2021-09-02 syoussefi@chromium.org Vulkan: Remove the forceCPUPathForCubeMapCopy workaround
2021-09-02 gert.wollny@collabora.com Capture/Replay: Change workdir for debug runs and annotation
2021-09-02 syoussefi@chromium.org Vulkan: SPIR-V Gen: Re-fix precision of constructors
2021-09-02 gert.wollny@collabora.com Capture/Replay: Update expectation for fixed test
2021-09-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from b75ca3758a80 to c82c59307208 (2 revisions)
2021-09-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from a5102f13fe96 to b5237d627f0d (446 revisions)
2021-09-02 gman@chromium.org Convert constructors to function calls where needed.
2021-09-02 gert.wollny@collabora.com Capture/Replay: Handle glInvalidateSubFramebuffer
2021-09-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from d54279d797f8 to 84f860ef94ee (1 revision)
2021-09-02 syoussefi@chromium.org Avoid redundant blend state dirty bit setting
2021-09-01 syoussefi@chromium.org Fix SeparateDeclarations vs struct specifiers
2021-09-01 jmadill@chromium.org Capture/Replay: Add uniforms to program serialization.
2021-09-01 jmadill@chromium.org Support syncing traces to experimental CIPD prefix.
2021-09-01 adkushwa@microsoft.com Implement onLabelUpdate method.
2021-09-01 jmadill@chromium.org Style cleanups in JsonSerializer.
2021-09-01 jmadill@chromium.org Traces: Move skia gold Python scripts.
2021-09-01 gert.wollny@collabora.com Capture/Replay: Update expectation bugs, remove passing test
2021-09-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 562b4d73eae2 to d54279d797f8 (4 revisions)
2021-09-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from a6ca3d4c0ccd to b75ca3758a80 (3 revisions)
2021-09-01 gert.wollny@collabora.com Capture/Replay: Clean up tests that pass and add new failures
2021-09-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from abe7c480d95d to a5102f13fe96 (417 revisions)
2021-09-01 cclao@google.com Vulkan: Remove mFormat from ImageHelper
2021-08-31 cclao@google.com Vulkan: Pass actualFormatID directly into ImageHelper::initExternal
2021-08-31 syoussefi@chromium.org Vulkan: SPIR-V Gen: Fix precision of constructors
2021-08-31 timvp@google.com Vulkan: Don't defer clear for read render target
2021-08-31 syoussefi@chromium.org Vulkan: SPIR-V Gen: Fix precision of imageLoad
2021-08-31 b.schade@samsung.com Allow image uniforms to be used in separable programs
2021-08-31 yuxinhu@google.com Improve Error Messaging
2021-08-31 geofflang@chromium.org GL: Update StateManagerGL binding funcs to use ANGLE_GL_TRY

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 fmalita@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: fmalita@google.com
Change-Id: I07abef2c8f24324e9a472ee735247a96ec8fd588
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445325
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-02 20:52:19 +00:00
Ethan Nicholas
833cd204ff Fixed DSL struct nesting check
The DSLParser struct nesting check didn't work, and on top of that
should have been part of the core DSL itself as opposed to being
relegated to the parser.

Change-Id: I680d0dc703309136970353204add14a6c9e03aa8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445113
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-09-02 19:38:55 +00:00
John Stiles
98ddea09f4 Report recursion from within CheckProgramUnrolledSize.
This allows us to remove the static-recursion analysis pass entirely,
while still providing the same results.

Change-Id: If1564cd4df55be86ca4e0bf53ecc094ba76007df
Bug: skia:12396
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445296
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-09-02 19:32:23 +00:00
Kevin Lubick
070ff2fd94 [infra] Update Go deps of infra module
This picks up the change to use Bot-Commit+1 for RecreateSKPs

Bug: skia:12124
Change-Id: I4a22536e216a05fef15686503dbbfbb02b5e4808
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445109
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
2021-09-02 19:00:17 +00:00
John Stiles
6475b10e81 Restructure CheckProgramUnrolledSize to support cycle detection.
The previous version of the code would actually end up skipping over
recursive code silently. (In fact, CheckProgramUnrolledSize is always
called immediately after Analysis::DetectStaticRecursion regardless of
whether or not any cycles were found, and the "cycle detected" assert
was not firing.) The code now actually detects cycles correctly; this
can be verified by uncommenting the call to error().

In a followup CL, I will improve the error reporting so that the cycle
is tracked and can be reported. Right now, we can detect a cycle but
don't keep a copy of the stack.

Change-Id: I9eb7b6333522d334657af4aa8d09fd6ad371ad69
Bug: skia:12396
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445112
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-09-02 18:56:45 +00:00
skia-autoroll
c7a1bc6cf3 Roll ANGLE from a8f1a916a5e8 to 3e9fda985013 (1 revision)
a8f1a916a5..3e9fda9850

2021-08-31 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 4c030a49cdb9 to 562b4d73eae2 (11 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 fmalita@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: fmalita@google.com
Change-Id: I223116d3ab2e00480210ec8e0aad907229345c42
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445203
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-02 18:05:58 +00:00
Jim Van Verth
9f82158f17 Metal: add loadMSAAFromResolve support.
Also fixes some minor warnings.

Bug: skia:12086
Change-Id: Ia476a7a196b490022978761e92f935a6d668136a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441797
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-09-02 18:05:54 +00:00
Ravi Mistry
c32bd0d84e Remove Docs-Preview links from PRESUBMIT.py
This work is being done by the skiastatus Gerrit plugin.

Bug: skia:12403
Change-Id: I42b81dcc9e2b4d5c99f9756eabed186f489a9adb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445105
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2021-09-02 17:53:05 +00:00
Ethan Nicholas
517f4ffb12 Added type security checks to the DSL
Private / unsupported types are now restricted to module code.

Change-Id: I98cb2e0822560a274758d99ecf0ca09883d0c3a1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445097
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2021-09-02 17:31:35 +00:00
Jim Van Verth
79ff8f20bf Metal: re-enable retained references.
A client of Flutter is seeing a crash when trying to release the
MTLTexture in GrMtlAttachment. The range of CLs involved includes the
one that disables retained references in the command buffer, so this
is a speculative change to see if that is the culprit.

Change-Id: Idd6e6b264086d671be52f456ef56f1fc5bafade8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444498
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-09-02 16:03:47 +00:00
Ethan Nicholas
6b4f68b2fe Added line numbers to some DSLParser errors that were missing them
We were reporting immediate errors in this function at the correct
location, but by not setting the offset of the statement itself, later
errors discovered during analysis were being reported with no line
number.

Change-Id: I7f4c5a0db774bbcf3901b38e05a43cebbda0d1ed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445102
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-09-02 16:02:20 +00:00
Ethan Nicholas
38ccf67b7b Fixed line number of DSLParser struct errors
RedeclareStructTypeWithName was reporting an error on the wrong line.

Change-Id: Ibe954ca5013dbedca8cf015660cf3d28fa97987d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445101
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2021-09-02 15:28:21 +00:00
Ethan Nicholas
b9c6489133 Fixed 'destroyed without being declared' error in DSLParser
Once we have created a DSLVar, we need to return it to avoid internal
errors.

Change-Id: I28dacf49e2f5219660ddbc6e21100e3fb0675742
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445099
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2021-09-02 15:28:19 +00:00
skia-autoroll
30b328b1f8 Roll ANGLE from 27517801121e to a8f1a916a5e8 (3 revisions)
2751780112..a8f1a916a5

2021-08-31 jmadill@chromium.org GetTexImage: Remove syncState calls & add early error exit.
2021-08-31 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from ca199aff3bc7 to abe7c480d95d (1237 revisions)
2021-08-31 cnorthrop@google.com Tests: Add Words With Friends 2 trace

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 fmalita@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: fmalita@google.com
Test: Test: angle_perftests --gtest_filter="*words_with_friends_2*"
Change-Id: Ib9268f66898f880eeba2b87bcd6a8ebf266634af
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445081
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-02 15:13:24 +00:00
John Stiles
61e5e202a5 Enforce an upper bound on Runtime Effect program size.
The fuzzer is currently learning to make unboundedly-large programs by
nesting medium-size loops repeatedly. SkVM doesn't have a mechanism to
limit the ensuing explosion of code and ends up making unreasonably deep
stacks and/or unreasonably large programs.

SkSL now enforces an upper bound of approximately 100,000 IR nodes on a
fully-flattened, fully-inlined strict-ES2 program. The limit is picked
out of thin air, but this should be enough to prevent SkVM from going
haywire while still being large enough to handle any reasonable program.
We can definitely tune this value if we find that it is too large
(admitting dangerous code) or too small (rejecting good code).

Change-Id: I11735636175721fbc79460b4e194d8e4b42dc47d
Bug: skia:12396, oss-fuzz:37827, oss-fuzz:37837
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444358
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-09-02 14:44:34 +00:00
Ethan Nicholas
a97ad0fe5c Stop requiring RTAdjust var when it is an interface block field
We were previously relying on the RTAdjust var's (essentially
meaningless in that case) value being non-null even when RTAdjust was
an interface block field instead of a var. This breaks runtime effects
built by the DSLParser, which does not set RTAdjust unless there's
actually an RTAdjust var.

Change-Id: I0938e1562ebf997af7b1f4dd9beb60fcd7909a20
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445096
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2021-09-02 14:37:12 +00:00
Robert Phillips
fbf021492e Move more Ops to skgpu::v1 namespace
GrFillRRectOp
GrFillRectOp

Bug: skia:11837
Change-Id: Icdecc2ccd9def659b0d9402910b2072e02577a66
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444817
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-09-02 13:25:29 +00:00
Ethan Nicholas
a248a9a721 Added line numbers to DSLParser type errors
Change-Id: I2fb227d74279e38118fc466718ca742221888443
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444877
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-09-02 13:05:37 +00:00
skia-autoroll
19c7ebf440 Roll SwiftShader from b75ca3758a80 to c82c59307208 (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/b75ca3758a80..c82c59307208

2021-09-01 srisser@google.com Remove erroneous ASSERT for format lists
2021-09-01 srisser@google.com Minimize usage of global constructors in Reactor

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 fmalita@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: fmalita@google.com
Change-Id: I096250042c001be139fcae8c17bd0fd76e0b68ad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444997
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-02 05:16:42 +00:00
skia-autoroll
f4ccf6f27c Roll Dawn from 4a4a80447653 to 305f4df2b5ad (3 revisions)
https://dawn.googlesource.com/dawn.git/+log/4a4a80447653..305f4df2b5ad

2021-09-02 jiawei.shao@intel.com Add FlatComputePipelineDescriptor for CreateComputePipelineAsync
2021-09-01 bajones@chromium.org Update default pipeline layout compatibility rules
2021-09-01 cwallez@chromium.org dawn_wire/client: Add RequestTracker helper

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

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

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

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: sarahmashay@google.com
Change-Id: Id3d532d1fbd5d65e16f27780ff7a0719a2d877fe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444998
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-02 05:03:52 +00:00
skia-autoroll
25b392329f Roll skcms from 4f7135f89d98 to c1e907c8f007 (1 revision)
https://skia.googlesource.com/skcms.git/+log/4f7135f89d98..c1e907c8f007

2021-09-01 rmistry@google.com Use repo-specific tree_status_url in skcms

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

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

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

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

Cq-Include-Trybots: skia/skia.primary:Canary-Chromium
Tbr: fmalita@google.com,brianosman@google.com
Change-Id: Ifdafe51d96ebb0b3dd2fa4ddda273ae9375c6ff8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444700
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-01 22:42:05 +00:00
Ethan Nicholas
709ecd53ca Made another DSLParser error non-fatal
This allows processing to continue in the face of invalid array sizes,
matching the error reporting behavior of SkSLParser.

Change-Id: Ifc0572aecf829563e4a77f01962a6e05aa9e98e8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444761
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2021-09-01 21:11:44 +00:00
Brian Osman
f80ef38d0f Add skstd::string_view::substr
Change-Id: I06ba9dd9ed8af8555233ddfa10d3e0ec6babc2ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444759
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-09-01 20:56:51 +00:00
Ethan Nicholas
0459a93734 Made out-of-bounds literals non-fatal errors in DSLParser
There was no good reason for this behavior in the first place, and this
change makes the error reporting behavior better match SkSLParser.

Change-Id: I7b69e7bcc64173c0ac6523e075c1f24e2be00ed0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444758
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2021-09-01 19:53:21 +00:00
John Stiles
2ecc595e86 Migrate program finalization logic out of IRGenerator.
Most of the logic in IRGenerator::finish has moved to
Compiler::finalize. The @if/@switch pass has been combined with the pass
that verifies no dangling FunctionReference/TypeReference expressions,
saving one walk through the IR tree. Most program-finalization logic now
exists in Compiler and Analysis.

This change reorders our error generation logic slightly, and manages to
squeeze a few extra (valid) errors out of one of our fuzzer-generated
tests, but is not really intended to affect results in any significant
way.

Change-Id: I461de7c31f3980dedf74424e7826c032b1f40fd2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444757
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-09-01 19:40:53 +00:00
Ethan Nicholas
98eae1ec2e Moved DetectVarDeclarationWithoutScope out of IRGenerator
As these checks were in the AST processing side of things, they were not
catching errors in DSL code. SkSLAnalysis is also a better home for this
function than SkSLIRGenerator.

Change-Id: I8149825047570300cc09425deba1339ac0edb7ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444656
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-09-01 19:33:19 +00:00
Kevin Lubick
facffbe093 [infra] Add go/skia-break-glass to gardener documentation
Bug: skia:12124
Change-Id: I8821e091b4ec823eaa7cff6c3426c13a31b6f362
No-Try: true
Docs-Preview: https://skia.org/?cl=444776
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444776
Reviewed-by: Ravi Mistry <rmistry@google.com>
2021-09-01 18:58:16 +00:00
Robert Phillips
46d7bd56f6 Move more Ops to skgpu::v1 namespace (take 2)
GrClearOp
GrDashOp

Bug: skia:11837
Change-Id: I9ada76c061154e769e7f486e7c57a93fd1d74907
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444636
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-09-01 18:57:02 +00:00
Robert Phillips
2af13c135b Reland "Fix compilation w/ "skia_enable_svg = false" (take 2)"
This reverts commit 44b7568c8a.

Reason for revert: Google 3 CL has landed

Original change's description:
> Revert "Fix compilation w/ "skia_enable_svg = false" (take 2)"
>
> This reverts commit 30a6b101f4.
>
> Reason for revert: Maybe blocking G3 roll?
>
> Original change's description:
> > Fix compilation w/ "skia_enable_svg = false" (take 2)
> >
> > Change-Id: I036ae171809af56cc9594704b44705ebd095ec80
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/443898
> > Reviewed-by: Florin Malita <fmalita@chromium.org>
> > Commit-Queue: Robert Phillips <robertphillips@google.com>
>
> TBR=robertphillips@google.com,fmalita@chromium.org,fmalita@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
>
> Change-Id: Ibee3819e073b04efdf9736058c1f9b288249620c
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444216
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

# Not skipping CQ checks because this is a reland.

Change-Id: Idf73d864108067ee1c34e88ee4e5236847abd582
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444501
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-09-01 17:54:08 +00:00
John Stiles
0fc6bedf5a Move VerifyStaticTests from Compiler to Analysis.
This doesn't rely on anything Compiler-specific, and can just be a plain
Analysis pass.

Change-Id: I8564ae2a750c6daa6c449e6fa56355cc047f7010
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444496
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-09-01 17:09:56 +00:00
Robert Phillips
d2f53f9e3e Move more Ops to skgpu::v1 namespace
Bug: skia:11837
Change-Id: Ia79f76c18587741000367edba303c5f7c0c1087d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444178
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-09-01 16:50:16 +00:00
Ethan Nicholas
ad284fe277 Made DSLParser 'expected expression' a fatal error
This matches the behavior of SkSLParser and fixes some spurious
followup errors.

Change-Id: Id1eae353eb6536a6385d04d0426e0de736db6b57
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444360
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2021-09-01 15:22:13 +00:00
Robert Phillips
5fe828accb Revert "Move more Ops to skgpu::v1 namespace"
This reverts commit f3158abda3.

Reason for revert: Broke Flutter build

Original change's description:
> Move more Ops to skgpu::v1 namespace
>
> GrClearOp
> GrDashOp
>
> Bug: skia:11837
> Change-Id: Ib65418952e7d4fb1e419e4942223823f22302b34
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/443518
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

TBR=robertphillips@google.com,michaelludwig@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com

Change-Id: Ic181ced7f5f2a8ff834fdcfb4e5265b99eef1666
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11837
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444365
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-09-01 14:44:46 +00:00
Ethan Nicholas
600481f871 Made position parameter of DSL ReportErrors required
This adds line numbers to a bunch of errors which were previously
missing them.

Change-Id: Id77c08d168b0a2d8a0131a53aa004bf37b8bec02
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444176
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-09-01 14:20:14 +00:00
Robert Phillips
f3158abda3 Move more Ops to skgpu::v1 namespace
GrClearOp
GrDashOp

Bug: skia:11837
Change-Id: Ib65418952e7d4fb1e419e4942223823f22302b34
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/443518
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-09-01 14:03:55 +00:00
Brian Osman
7db3ab5787 Remove SK_HAS_SRGBA_COLOR_TYPE guard
Chromium has been updated, this is no longer needed

Change-Id: I0bcf65c79d454c50796e04e33c213de2295c0e6a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441877
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-09-01 13:46:13 +00:00
Ethan Nicholas
fd1ff92efe Made DSLType::Array return poison on error
This fixes spurious errors that occur subsequent to an error converting
and array size.

Change-Id: I23fda9ef744f9144726d4fd28584676b33a4c7bb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444177
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2021-09-01 13:31:11 +00:00
skia-autoroll
e425088757 Roll SwiftShader from 8ed4e39caa5b to b75ca3758a80 (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/8ed4e39caa5b..b75ca3758a80

2021-08-31 jmadill@chromium.org Increase maxComputeSharedMemorySize.
2021-08-31 tikuta@google.com update angle revision

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 fmalita@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: fmalita@google.com
Change-Id: Id25decef1677b3eb22da4546a4a22bc834a274eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444262
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-01 05:17:46 +00:00
skia-autoroll
4d6344c81d Roll Dawn from c7226a76245d to 4a4a80447653 (5 revisions)
https://dawn.googlesource.com/dawn.git/+log/c7226a76245d..4a4a80447653

2021-09-01 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 14ac047d45ff to 44a0adf9b47c (1 revision)
2021-08-31 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from b09723e58b8d to 14ac047d45ff (4 revisions)
2021-08-31 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 293d313bbca2 to b09723e58b8d (1 revision)
2021-08-31 shrekshao@google.com Callback reentrancy tests
2021-08-31 jiawei.shao@intel.com Remove redundant code in CreateRenderPipeline

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from 293d313bbca2 to 44a0adf9b47c

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

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

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

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: sarahmashay@google.com
Change-Id: I112c11f6244a6b988ea969d40be3fdea7679f9d0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444263
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-01 04:50:46 +00:00
Robert Phillips
44b7568c8a Revert "Fix compilation w/ "skia_enable_svg = false" (take 2)"
This reverts commit 30a6b101f4.

Reason for revert: Maybe blocking G3 roll?

Original change's description:
> Fix compilation w/ "skia_enable_svg = false" (take 2)
>
> Change-Id: I036ae171809af56cc9594704b44705ebd095ec80
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/443898
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

TBR=robertphillips@google.com,fmalita@chromium.org,fmalita@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com

Change-Id: Ibee3819e073b04efdf9736058c1f9b288249620c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444216
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-08-31 22:31:00 +00:00
Ethan Nicholas
51b4b86da6 Improve DSL error reporting with invalid array sizes
This eliminates an extra "expected int literal" error when the
array size is an invalid expression.

Change-Id: Iaf5d15316df3ec5200d51d73c14d7e428ce17be9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/443236
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-08-31 21:04:18 +00:00
Ethan Nicholas
966723594d Use Type::convertArraySize from DSL for error detection
Change-Id: I0fdaf04525f02e8827839a0f43bb9181309cbb56
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444137
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2021-08-31 20:14:53 +00:00
John Stiles
5cec187b36 Fix array timeout discovered by the fuzzer.
The fuzzer discovered that, when we attempt to verify that an array
doesn't contain any literal values that are out-of-range for its base
type, we pay a linear-time cost based on the size of the array. This
happens even when the array value isn't known at compile time; we still
iterate over its slot count and diligently discover that every single
constant-subexpression slot in the expression is "null".

We now have a helper function on Expression,
`allowsConstantSubexpressions`, which only returns true for expression
kinds that can contain constant subexpressions. We use this helper to
skip over this linear-per-subexpression check when the expression
cannot possibly contain a constant subexpression. In particular,
`AnyConstructor::compareConstant` and `Type::checkForOutOfRangeLiteral`
will now early-out for expressions that can't possibly contain a
constant subexpression.

Change-Id: Ia34e422afa67b478a8616acb0a0e9cd211b29698
Bug: oss-fuzz:37900
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444136
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-08-31 19:55:45 +00:00