Commit Graph

57802 Commits

Author SHA1 Message Date
Kyle Carlstrom
510e0c57da Allow tracking of Precompositions onEnter/onExit
Change-Id: I065288b212d8ffc4d0ca127940e524799f59aff7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/454976
Reviewed-by: Avinash Parchuri <aparchur@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Avinash Parchuri <aparchur@google.com>
2021-10-06 18:01:56 +00:00
John Stiles
6d0234673a Optimize away empty for loops.
The fuzzer has found that it can get timeouts in SkVM by nesting loops
very very deeply, then at the bottom of the chain, making an inside-out
loop that runs for zero iterations. This has a calculated unrolled-size
of zero, but SkVM would still think hard about unrolling the (ultimately
empty) outer loops.

SkSL now optimizes away unrollable loops that run for zero iteratinons,
as well as empty unrollable loops. This should eliminate the fuzzer's
troublesome construct entirely.

Change-Id: Ic3ef7b7a6a9fc7ee7fb13eb7bd7f34c9bff57448
Bug: oss-fuzz:39661
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456469
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-10-06 17:56:26 +00:00
John Stiles
f907da75a1 Replace Analysis class-of-statics with a namespace.
Analysis is a grab-bag of helper methods without any member variables or
member functions. It doesn't represent a class.

Change-Id: I447ebe5cf4d6add0a8e3f1d0d91adae16e352b9f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456471
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-10-06 17:48:52 +00:00
John Stiles
b229558350 Use SkSpan to represent arrays in GrSkSLFP::Make.
This will allow a uniform array to be used in make_unrolled_colorizer
(or anywhere else that we might need one).

Change-Id: I9246f8d3121353b029fd36924fb874d838e67d9c
Bug: skia:8401
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456238
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-10-06 17:25:29 +00:00
Herb Derby
e023608611 change matrix_2x3 to row-major
Change-Id: Id25b3875f54f359bac90b6d3a7695287fc108b64
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456467
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-10-06 16:56:32 +00:00
Robert Phillips
47da0ac577 [graphite] Add stub classes for Recorder, Recording and TaskGraph
Bug: skia:12466
Change-Id: I730c227a78040ea8747d11437032504527b3ee81
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456463
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-10-06 16:32:52 +00:00
John Stiles
da25cffe41 Require LoopUnrollInfo in ForStatement::Make.
Previously, callers could pass a null LoopUnrollInfo into
ForStatement::Make and it would just try to make a new one. Now, we
honor whatever is passed in as-is.

This required some fixes in the Inliner and Rehydrator, which relied on
the recreate-at-will behavior. However, it should improve the
performance of inlining a For loop, as we no longer need to recompute
the unroll info from scratch; we now fix up the existing unroll info.

Change-Id: Ie6d6be2094a70b58ff07b13e33e8fc91f74ab796
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456468
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-10-06 16:12:26 +00:00
Greg Daniel
3c27c9fe5e [graphite] Add Debug Graphite build to CQ.
We've gotten far enough along that I don't want changes in main Skia to
start breaking Graphite.

Bug: skia:12466
Change-Id: I66cf2e889521382ef51a99e0966d239f841da655
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456462
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-10-06 15:19:49 +00:00
Greg Daniel
fbc64be806 [graphite] Add Caps getters for default TextureInfos
Bug: skia:12466
Change-Id: I9165e5f49e4b897f4b315662221b944e362b7b41
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456456
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2021-10-06 15:11:29 +00:00
Ethan Nicholas
36fef3b48b Moved function call handling into FunctionCall
The code for function calls was split between IRGenerator and
FunctionCall for no particular reason. This moves it all where it
belongs.

Change-Id: Ib0ab975961bee84cbc804dc4c48f5d99f9824d82
Bug: skia:12500
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455776
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2021-10-06 12:59:35 +00:00
skia-autoroll
0c18d7f332 Roll Chromium from b0f34ac53bb9 to 521abf2ff706 (530 revisions)
b0f34ac53b..521abf2ff7

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 michaelludwig@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: michaelludwig@google.com
Change-Id: Ibc1c923069beb1d5d10da7d64755a8c30fcd5da9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456396
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-06 05:36:21 +00:00
skia-autoroll
2b1552bbba Roll ANGLE from 2f1d503bcdbb to 27a98cf485c9 (20 revisions)
2f1d503bcd..27a98cf485

2021-10-05 syoussefi@chromium.org Vulkan: Allow debug labels inside render pass
2021-10-05 syoussefi@chromium.org Update script to install ANGLE binaries in installed Chromium
2021-10-05 jmadill@chromium.org Add SwANGLE test configs to Linux and Win.
2021-10-05 syoussefi@chromium.org Translator: Produce error on func(void, int)
2021-10-05 sugoi@google.com Alignment fix for IOSurface
2021-10-05 jmadill@chromium.org GL: Remove old NVIDIA workaround.
2021-10-05 jmadill@chromium.org Add docs for DXGI and D3D11 format tables.
2021-10-05 jmadill@chromium.org Add shader targeting language to WebGL compat spec.
2021-10-05 jmadill@chromium.org dEQP 3.1: Lift NVIDIA/Win/GL expectation.
2021-10-05 jmadill@chromium.org Lift old AMD/Win/GL expectations.
2021-10-05 jmadill@chromium.org Lift AMD desktop GL DrawBuffersTest expectations.
2021-10-05 gert.wollny@collabora.com Capture/Replay: Update more expectations and add bugs
2021-10-05 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 3f11eb9d9ae7 to 9f83659e6f7d (9 revisions)
2021-10-05 jmadill@chromium.org dEQP: Enable Android mipmap tests on GLES.
2021-10-05 jmadill@chromium.org Lift failing Android expectations.
2021-10-05 jmadill@chromium.org Lift failing Android test expectations.
2021-10-05 gert.wollny@collabora.com Capture/Replay: Fix readback of zero-sized renderbuffers
2021-10-05 jmadill@chromium.org Add docs on how to request CQ/issue tracker access.
2021-10-05 jmadill@chromium.org Vulkan: Remove extraCopyBufferRegion workaround.
2021-10-05 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from f43b9df4c8a9 to 70178a763bb9 (3 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 michaelludwig@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: michaelludwig@google.com
Change-Id: Ib1c6f2dc24395f32bedb57de274e32946748bad7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456397
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-06 05:26:23 +00:00
skia-autoroll
8b80a11972 Roll SwiftShader from 70178a763bb9 to 8c181d7d1165 (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/70178a763bb9..8c181d7d1165

2021-10-05 capn@google.com Deep copy specialization info
2021-10-05 swiftshader.regress@gmail.com Regres: Update test lists @ 70178a76

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 michaelludwig@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: michaelludwig@google.com
Change-Id: Ia9cc73f1947f28f262c504cb2c4d2556bd68d2d3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456356
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-06 05:10:24 +00:00
skia-autoroll
7e03a9adf2 Roll Dawn from 575a198764da to ccbc1a39da70 (10 revisions)
https://dawn.googlesource.com/dawn.git/+log/575a198764da..ccbc1a39da70

2021-10-05 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 8b2181c98ff9 to 71763c84c2fa (3 revisions)
2021-10-05 amaiorano@google.com run-cts: add "log" arg to log test results to file
2021-10-05 bclayton@google.com dawn_node/interop: Return a Result instead of a bool
2021-10-05 bclayton@google.com dawn_node: Use IDL default parameter values
2021-10-05 bclayton@google.com dawn_node: Fixes for GPU.cpp
2021-10-05 amaiorano@google.com dawn_node: set default GPU adapter and override with env var
2021-10-05 bclayton@google.com dawn_node: Add -j option to run-cts
2021-10-05 bclayton@google.com dawn_node: Make StaticValues property-like
2021-10-05 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 22daca166bbc to 8b2181c98ff9 (1 revision)
2021-10-05 bclayton@google.com dawn_node: Add README.md

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from 22daca166bbc to 71763c84c2fa

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 bclayton@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: bclayton@google.com
Change-Id: I33192d79f9c3d6315fa11dc19cdb91c5adbb2465
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456398
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-06 05:08:23 +00:00
Brian Osman
98eb297750 Generate ICC profiles with version 4.3 (not 2.1)
We've been making profiles tagged as version 2.1, but using features
that aren't allowed until 4+. Nearly all software doesn't care (most
ICC parsers are lenient about this), but Windows 7 Photo Viewer does
not like this. The latest ICC spec is 4.3 (ca 2001), so use that.

Bug: skia:12491
Change-Id: I7867ed73894ce3b55a61f4b7e5de29269c7c0dca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456256
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-10-06 00:12:42 +00:00
John Stiles
ff5bb37b72 Replace illegal DSLTypes with Poison types.
The fuzzer has been poking various holes in DSL by intentionally
creating illegal types (e.g. private or not ES2-compatible), then
finding ways to use those types, e.g. constructors or swizzles.

Previously we were mitigating those by calling `reportIllegalTypes` at
the locations where the type was used. Now, we detect the illegal type
usage at the source, and return a poison DSLType. This prevents the
illegal type from leaking out at all, and stops the problem at its
source. It also allows us to remove calls to `reportIllegalTypes`
sprinkled through the code, as those are now redundant.

Change-Id: Id50b50f72849111d80f76e4fdc2cb6094d3009bd
Bug: oss-fuzz:39597
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455999
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-10-06 00:12:07 +00:00
Greg Daniel
d4ca5e11a1 Add Texture creation to ResourceProvider.
The caller to ResourceProvider should be passing in the TextureInfo
they want. Thus we don't need all the specialized factores on
mtl::Texture.

Also removes UsageFlags from Texture which aren't needed.

Bug: skia:12466
Change-Id: Iad51a7da6efe481382a3f5fbaefc6d2504d1c013
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456236
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-10-05 21:13:53 +00:00
John Stiles
fd4dc2347d Factor out TypeConstant-to-type logic into separate function.
This makes a followup CL easier to write.

Change-Id: I1460112331571c747143a6dcd06499c6370de93c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456000
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-10-05 20:27:29 +00:00
Chris Dalton
7311f9ad14 Remove subpixel positioning from the atlas path renderer key
Descretizing subpixel matrix translates into 4 values for a path key had
some pretty serious bugs:

  * Different round-out behavior in the range of translates that all
    mapped to the same subpixel position causing us to mis-place the
    mask.

  * Different round-out behavior in the range of translates that all
    mapped to the same subpixel position causing us to transpose
    differently.

Ideally we will address these issues, but given the urgency for M95 we
will first tear it out entirely. The exact translation matching in this
CL still solves the clipping problem, which was the original motivation
for the cache.

Bug: chromium:1253952
Change-Id: I62409614733c5e9ab77ba11c4de7e40495c07453
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456156
Auto-Submit: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-10-05 20:18:12 +00:00
Ethan Nicholas
04b0e0187e Move function intrinsic handling into Finalizer
This continues the process of moving code out of IRGenerator and into
better homes.

Change-Id: I4803d39ecb2f4c0e916e82e907b5dcaa285a35ce
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456116
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2021-10-05 19:41:59 +00:00
Jim Van Verth
37c4976947 Reland "Clean up #includes in SkCFObject."
This is a reland of bedb69ccfb

Original change's description:
> Clean up #includes in SkCFObject.
>
> SKCFObject.h wasn't compiling without prefixing it with other includes,
> so adding them into the actual file itself. Also changed to use the
> more generic __APPLE__ as a guard rather than BUILD_FOR_MAC or
> BUILD_FOR_IOS defines, and added the file to BUILD.gn so it will be
> added to Xcode projects.
>
> Change-Id: I67a48d0156ef1eb5c69dd045f0acadf147053eb6
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455163
> Auto-Submit: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

Change-Id: Ibf372fc07c78121beae8cd78e0a8a9f4a6d7ef5d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455998
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-10-05 19:11:56 +00:00
Robert Phillips
237c22adb8 [graphite] Add ASAN bot
Bug: skia:12466 skia:12507
Change-Id: I1f632afc5e27dfe076f4409bc999bd57be1c2f1a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455797
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-10-05 19:10:31 +00:00
Jim Van Verth
52d1629048 [graphite] Update minimum Metal SDK required
Bug: skia:12466
Change-Id: I97d8743057199abd88948f0804cceb4180ad8b74
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455997
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2021-10-05 15:53:22 +00:00
Jim Van Verth
efdb1f0a3b [graphite] Add pipeline cache to ResourceProvider
Copied from GrMtlResourceProvider, and stripped down to the barest minimum.

Bug: skia:12466
Change-Id: I63cb52ee4bbc4c6ce5a1de16312bd4c69911d32c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455619
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-10-05 14:34:22 +00:00
Michael Ludwig
a6d7296948 Revert "Clean up #includes in SkCFObject."
This reverts commit bedb69ccfb.

Reason for revert: breaking flutter roll

ERROR at //flutter/shell/gpu/gpu_surface_metal.mm:16:11: Including a private header.
#include "third_party/skia/include/ports/SkCFObject.h"
          ^------------------------------------------
This file is private to the target //third_party/skia:skia

Original change's description:
> Clean up #includes in SkCFObject.
>
> SKCFObject.h wasn't compiling without prefixing it with other includes,
> so adding them into the actual file itself. Also changed to use the
> more generic __APPLE__ as a guard rather than BUILD_FOR_MAC or
> BUILD_FOR_IOS defines, and added the file to BUILD.gn so it will be
> added to Xcode projects.
>
> Change-Id: I67a48d0156ef1eb5c69dd045f0acadf147053eb6
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455163
> Auto-Submit: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

Change-Id: I6aa236c784a3ebfb6e6b97dafa7761293f94cf3e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455876
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2021-10-05 14:16:24 +00:00
John Stiles
e5d4c43561 Add SkSL test for uniform arrays.
These weren't used anywhere in our test suite.

Change-Id: I35e8607ad2dbddf8f403668bd2b2636a8964d304
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455777
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-10-05 13:25:00 +00:00
skia-autoroll
211b336da0 Roll ANGLE from d3764f080f6c to 2f1d503bcdbb (8 revisions)
d3764f080f..2f1d503bcd

2021-10-05 syoussefi@chromium.org Vulkan: Fix Vulkan secondary command buffers
2021-10-05 geofflang@google.com Remove EGL_ANGLE_flexible_surface_compatibility
2021-10-05 timvp@google.com Vulkan: Enable BlitFramebufferANGLETest tests
2021-10-04 kpiddington@apple.com Update ANGLE Metal to Webkit at Sept 29 2021
2021-10-04 yuxinhu@google.com Tests: Add Mini World Creata Trace
2021-10-04 jmadill@chromium.org Update shader translator docs.
2021-10-04 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 78a1201f0716 to 3f11eb9d9ae7 (6 revisions)
2021-10-04 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 1cdfcb680631 to f43b9df4c8a9 (3 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 michaelludwig@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: michaelludwig@google.com
Test: Test: BlitFramebufferANGLETest.MultisampledBGRAToRGBA
Test: Test: BlitFramebufferANGLETest.MultisampledRGBAToBGRA
Test: Test: angle_perftests --gtest_filter="*mini_world*"
Change-Id: Ice75dc9f9823edafa453e0ae9bd2104f30d5268a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455901
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-05 05:27:22 +00:00
skia-autoroll
8262288a08 Roll SwiftShader from f43b9df4c8a9 to 70178a763bb9 (3 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/f43b9df4c8a9..70178a763bb9

2021-10-04 capn@google.com Refactor swapchain image creation
2021-10-04 capn@google.com Increase the maximum 1D, 2D, and Cube image dimension to 16384
2021-10-04 nicolascapens@google.com Kokoro: Disable gcp_ubuntu builds failing to update CMake

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 michaelludwig@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: michaelludwig@google.com
Change-Id: Id6a5249a728629f863e7d83e8c9125d738e7962d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455936
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-05 05:05:25 +00:00
skia-autoroll
c7a55cdcf2 Roll Dawn from bb417ace110b to 575a198764da (9 revisions)
https://dawn.googlesource.com/dawn.git/+log/bb417ace110b..575a198764da

2021-10-05 cwallez@chromium.org Improve validation errors for Sampler
2021-10-05 bajones@chromium.org Improve validation errors in CommandValidation
2021-10-04 svenzheng@chromium.org Revert "Add deps to enable performing the cmake build of dawn_node on CQ"
2021-10-04 bajones@chromium.org Improve validation errors in CommandEncoder
2021-10-04 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 2271b9541c2a to 22daca166bbc (2 revisions)
2021-10-04 jiawei.shao@intel.com Reland "OpenGL: delete shaders and pipelines when they are not used any longer"
2021-10-04 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 5e35864c1bda to 2271b9541c2a (1 revision)
2021-10-04 beaufort.francois@gmail.com Rename "extension" to "feature"
2021-10-04 cwallez@chromium.org Vulkan: Implement StoreOp::Discard

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from 5e35864c1bda to 22daca166bbc

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 bclayton@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: bclayton@google.com
Change-Id: I81560e4a37ef93db0ae16f16402382f33e14fcc9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455937
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-05 04:52:54 +00:00
skia-autoroll
4012f7243c Roll Chromium from 2d77db45aa57 to b0f34ac53bb9 (406 revisions)
2d77db45aa..b0f34ac53b

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 michaelludwig@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: michaelludwig@google.com
Change-Id: I1cc192e1ea955f61fd89a5bde1df5b313fd19cf7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455900
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-05 04:46:52 +00:00
John Stiles
95a6610142 Simplify allowed-in-ES2 checks.
We can now pass in a context to `isAllowedInES2,` and it will return
true if the context supports the type. That is, ES2 types always return
true; non-ES2 types return true if the context is not strict-ES2.

Also, renamed `allowedInES2` to `isAllowedInES2` to better match similar
methods in Type.

Change-Id: Ia108bbde1354f6a14df05e8fb05742f04eefc375
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455661
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-10-05 01:51:20 +00:00
skia-autoroll
5d1822a8b1 Roll skcms from a00edc64c486 to b5aafce0db45 (1 revision)
https://skia.googlesource.com/skcms.git/+log/a00edc64c486..b5aafce0db45

2021-10-04 lovisolo@google.com [bazel] SkCMS: Add Windows Bazel tasks.

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 michaelludwig@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: michaelludwig@google.com,brianosman@google.com
Change-Id: Ide1683c374b65c14408067eed4dbd3afd56638e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455822
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-04 23:44:23 +00:00
Michael Ludwig
65e848d6b5 Reland "[graphite] SurfaceDrawContext -> DrawContext"
This reverts commit 9602a4fad0.

Reason for revert: fixed var ref

Original change's description:
> Revert "[graphite] SurfaceDrawContext -> DrawContext"
>
> This reverts commit a525fd141b.
>
> Reason for revert: missed updating sdc->dc in one spot
>
> Original change's description:
> > [graphite] SurfaceDrawContext -> DrawContext
> >
> > Bug: skia:12466
> > Change-Id: If4a06bc0ab8befab8a155276c316ba9378b90a48
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455658
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
>
> Bug: skia:12466
> Change-Id: I60e316225d44d7046bc82c80fe42345d8941f99e
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455662
> Auto-Submit: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>

Bug: skia:12466
Change-Id: I693b1e39fd65fe20cd5bb3f36bcc5f3da011c6b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455663
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-10-04 21:43:52 +00:00
Ethan Nicholas
df93db9d32 Removed a number of utility methods from DSLWriter
DSLWriter is about to be renamed to something non-DSL-specific, and
(especially since we're in the middle of trying to break up some of our
big classes anyway) it didn't feel right to leave a pile of extremely
DSL-specific utility methods in it. And since it turns out that none of
these methods really do much of anything anymore, it seemed best to
just kill them all.

Change-Id: I5e257f87108a7a6db7fc1c01bab4e6c1544d60b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455158
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-10-04 20:42:22 +00:00
Michael Ludwig
9602a4fad0 Revert "[graphite] SurfaceDrawContext -> DrawContext"
This reverts commit a525fd141b.

Reason for revert: missed updating sdc->dc in one spot

Original change's description:
> [graphite] SurfaceDrawContext -> DrawContext
>
> Bug: skia:12466
> Change-Id: If4a06bc0ab8befab8a155276c316ba9378b90a48
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455658
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

Bug: skia:12466
Change-Id: I60e316225d44d7046bc82c80fe42345d8941f99e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455662
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2021-10-04 20:36:17 +00:00
Michael Ludwig
a525fd141b [graphite] SurfaceDrawContext -> DrawContext
Bug: skia:12466
Change-Id: If4a06bc0ab8befab8a155276c316ba9378b90a48
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455658
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-10-04 19:51:53 +00:00
Greg Daniel
e20b3ec822 [graphite] Add remaining factories to MtlTexture.
Adds factory for SampledTextures and MSAA textures

Bug: skia:12466
Change-Id: Ia8aa7fa874e8256fe4dea8a16ceb459dbb02547d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455618
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2021-10-04 19:14:28 +00:00
John Stiles
9efdc041bb Remove Type::containsPrivateFields.
`Type::isPrivate` now works properly even on structs and arrays, so we
don't need two separate methods anymore.

Change-Id: Ic3e16e1315ebb0c8cec575f109af7e472a11ac8c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455660
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-10-04 19:08:51 +00:00
Jim Van Verth
4008c5a3b0 [graphite] Fix creation of command buffer for different SDK/OS versions
Bug: skia:12466
Change-Id: I9828c59f0406e457e723f78940b1f42ff343fa2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455500
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2021-10-04 19:06:34 +00:00
Herb Derby
6bc9626530 fix deadlock in remote cache logging
In the stack trace in the bug, #16 findOrCreateStrike() grabs the
lock, and then #8 Dump() makes calls that grab the lock. This is
only a problem with debug code.

Bug: chromium:1255085

Change-Id: Idcaad8bf2e8c2823bec899ee2b96a74ae666c164
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455501
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2021-10-04 19:03:44 +00:00
John Stiles
b37fe549b2 Update FunctionDeclaration to take 'is-builtin' from the Context.
We no longer need to explicitly pass this variable in since it lives in
the Context.

Change-Id: Ib8e753907578518e593cc3cd36f6f17871d95eec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455659
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-10-04 18:48:25 +00:00
Michael Ludwig
0dc6445a46 [graphite] Define SortKey as part of DrawPass impl
Every command that's in a DrawList will produce 1-3 SortKeys (depending
on its type of draw and the number of steps involved). For example a
large non-convex path fill requires a stencil draw for the curves, a
stencil draw of its inner triangles, and a covering draw for shading.

Since the SortKeys are only temporary and can be discarded once the
list has finished being converted into the DrawPass itself, they are
defined in the cpp file. However, I could see exposing them if only so
that the conceptual model is more apparent, since this is a key part
of the new approach in graphite.

Related to the details of the SortKey, the DrawList and SDC APIs have
been updated to reflect the differences in stencil-and-fill path
rendering that needs to be ordered based on both its color-depth
intersections and stencil buffer intersections, and convex filled
paths that don't require stenciling at all.

As a little cleanup, these parameters have been named something to
reflect their semantics even though they stay uint16_t's.

Bug: skia:12466
Change-Id: I02d6361f2889c0a6b341623131e4abda00a11145
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455216
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2021-10-04 18:07:22 +00:00
Dominik Röttsches
76a22af02a Avoid finding a font with simulations
When requesting a font match for fonts like Sylfaen or Gabriola, which
absolutely do not have a bold or italic version, Windows silently
produces DirectWrite simulations which synthetic bolding or synthetic
italic or both.

From Chromium's perspective, we clearly do not want Windows to produce
silent simulations for us and this makes it impossible for us to
determine what the font's actual weight or slant is. As a result, we
are blocked from implementing the font-synthesis CSS property
correctly. For the latter, we need to be able to programmatically
enable setEmbolden() or setSkew() on SkFont and have Skia apply
artifical synthesis, instead of Windows instantiating such a font
silently.

Addresses TODO to avoid simulations in
SkFontStyleSet_DirectWrite::matchStyle.

Bug: skia:12455
Cq-Include-Trybots: luci.skia.skia.primary:Test-Win10-Clang-NUC5i7RYH-CPU-AVX2-x86_64-Debug-All-NativeFonts,Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-NativeFonts,Test-Win7-Clang-Golo-CPU-AVX512-x86_64-Debug-All-NativeFonts,Test-Win7-Clang-Golo-CPU-AVX512-x86_64-Debug-All-NativeFonts_GDI
Change-Id: If965d2501dff45ee7881544c6473b3fb36a8d90d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/450676
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2021-10-04 17:51:24 +00:00
John Stiles
a106472197 Reland "Disallow constructors of ES3 types in ES2 code."
This is a reland of 36f53ec7e1

Original change's description:
> Disallow constructors of ES3 types in ES2 code.
>
> The fuzzer found that we constructed TypeReferences without first
> checking for disallowed tyoes. (In fact, TypeReference creation had no
> error checking at all; it didn't even have Convert/Make functions.)
>
> Added proper Convert/Make to TypeReference, and used those calls to
> report errors or cause assertions if trying to make a TypeReference to a
> type that the program did not support.
>
> (While tracking down this bug, I added strict-ES2 type assertions to our
> constructor IR nodes as well. This helped pinpoint the error and seem
> reasonable to leave in, just in case.)
>
> Change-Id: I896b68ae9d3d9e1f30d7eba9fa594617ab851c74
> Bug: oss-fuzz:39540
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455498
> Commit-Queue: John Stiles <johnstiles@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

Bug: oss-fuzz:39540
Change-Id: Id8e323c22b18726214613b6061c08873048b7c69
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455617
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-10-04 17:51:00 +00:00
John Stiles
1a2cef7fbc Avoid returning a DSLExpression with an invalid type.
We shouldn't return expressions that violate basic invariants (such as a
Constructor with an invalid Type) because future code should be able to
rely on those invariants to hold. Returning a Constructor with an
invalid Type broke some assertions I had added; these assertions checked
that the Constructor's type was valid before operating on it.

Change-Id: I861927ad042f30d4a1e20896149ce404f4160ffb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455657
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-10-04 17:34:49 +00:00
Brian Salomon
532a51ac43 Enable bind texture 0 workaround for MSAA-RTT on Mali-Gxx.
BUG: skia:12505

Change-Id: Ib2f260a33d5b5de83a0089955eb0f9ae6231c19f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/453954
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-10-04 17:17:50 +00:00
John Stiles
c876489232 Move 'is builtin code' flag into the ProgramConfig.
This makes the flag accessible from anywhere with a Context. Previously,
it was known by both the DSLWriter and IRGenerator, but otherwise
inaccessible unless manually passed to each function that needed it.

Change-Id: I029715c9049cb0810cb2960864632a82064921f9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455656
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-10-04 17:06:46 +00:00
John Stiles
0dd68c3b29 Add tests for constructors of private types.
This turns out to work fine, but we didn't cover it in any test case.

Change-Id: I98c40dc023bc9f0739beeb6e4163cde087a0be99
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455499
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-10-04 16:38:19 +00:00
John Stiles
e03f1c101c Revert "Disallow constructors of ES3 types in ES2 code."
This reverts commit 36f53ec7e1.

Reason for revert: breaks DS3Types test

Original change's description:
> Disallow constructors of ES3 types in ES2 code.
>
> The fuzzer found that we constructed TypeReferences without first
> checking for disallowed tyoes. (In fact, TypeReference creation had no
> error checking at all; it didn't even have Convert/Make functions.)
>
> Added proper Convert/Make to TypeReference, and used those calls to
> report errors or cause assertions if trying to make a TypeReference to a
> type that the program did not support.
>
> (While tracking down this bug, I added strict-ES2 type assertions to our
> constructor IR nodes as well. This helped pinpoint the error and seem
> reasonable to leave in, just in case.)
>
> Change-Id: I896b68ae9d3d9e1f30d7eba9fa594617ab851c74
> Bug: oss-fuzz:39540
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455498
> Commit-Queue: John Stiles <johnstiles@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

Bug: oss-fuzz:39540
Change-Id: I1dc3ccca477fcb9fe3f39cfe8af1fd54dcb18d6b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455616
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2021-10-04 15:36:08 +00:00
John Stiles
36f53ec7e1 Disallow constructors of ES3 types in ES2 code.
The fuzzer found that we constructed TypeReferences without first
checking for disallowed tyoes. (In fact, TypeReference creation had no
error checking at all; it didn't even have Convert/Make functions.)

Added proper Convert/Make to TypeReference, and used those calls to
report errors or cause assertions if trying to make a TypeReference to a
type that the program did not support.

(While tracking down this bug, I added strict-ES2 type assertions to our
constructor IR nodes as well. This helped pinpoint the error and seem
reasonable to leave in, just in case.)

Change-Id: I896b68ae9d3d9e1f30d7eba9fa594617ab851c74
Bug: oss-fuzz:39540
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455498
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-10-04 15:02:24 +00:00