Commit Graph

2730 Commits

Author SHA1 Message Date
John Stiles
a0e407d4b7 Add SkSL test for matrix equality/inequality operators.
Disabled on Adreno 5xx/6xx as the tests do not pass on those GPUs:
http://screen/3Dkgs9syj37cjBV

Change-Id: Ib935d01e8f06dbfe7decd5cc4e52e0688b48be08
Bug: skia:11306, skia:11308
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368805
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-02-10 18:57:22 +00:00
Michael Ludwig
140adc6762 Revert "Delete deprecated alpha threshold header"
This reverts commit 5441188637.

Reason for revert: this couldn't really be breaking angle-only sksl compilation, right? Let's find out!

Original change's description:
> Delete deprecated alpha threshold header
>
> Bug: skia:11230
> Change-Id: Icd927cfdcca71a48dce16bcd6c40489dad92a259
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368238
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

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

Change-Id: Ie5b51e6cca39acb34dbf7b1e702209aba69ea437
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11230
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368798
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2021-02-10 14:09:03 +00:00
Adlai Holler
9e2c50edaa Revert "Remove deferred proxy machinery"
This reverts commit a3987cc587.

Reason for revert: Keeping it

Original change's description:
> Remove deferred proxy machinery
>
> These aren't used any more in favor of lazy proxies.
>
> Bug: skia:11288
> Change-Id: I992e1a3dd343e0ebc7f3a4f18c0054453dfebbaf
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366896
> Commit-Queue: Adlai Holler <adlai@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com

Bug: skia:11288
Change-Id: Iafa9ed18a772e451349dfad61ee462df963028be
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368376
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2021-02-10 12:28:42 +00:00
Brian Salomon
ec04e062f3 Drop AA on quads that are extremely thin before AA insetting/outsetting.
Bug: chromium:1174186
Change-Id: I91a88d2d57150dee37f08bc4270d399abfd0d60d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368497
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-02-10 02:43:35 +00:00
Michael Ludwig
5441188637 Delete deprecated alpha threshold header
Bug: skia:11230
Change-Id: Icd927cfdcca71a48dce16bcd6c40489dad92a259
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368238
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2021-02-09 23:35:19 +00:00
Brian Osman
62b039b36d Add .stage output to skslc for runtime effects
This emits SkSL that is more-or-less what the compiler re-ingests when a
runtime effect is used to create a GrFragmentProcessor.

Change-Id: I0926be44fc4493e722a5edc18198e161e4192cde
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367883
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-02-09 20:11:56 +00:00
John Stiles
34c098d7f8 Add SkSL test demonstrating missed optimization with +=.
Currently, SkSL is able to constant-propagate `x = x + constant` into
`x = constant` when the starting value of x is known. However, it is not
able to do the same optimization for `x += constant`. This test
demonstrates that once += is encountered, we lose track of x's value and
can no longer propagate its value.

(This is equally true of all the op-assignment operators, += -=
*= /= etc.)

Change-Id: I3523e96baf9a73982cf3b09f0d23b95adacf106b
Bug: skia:11192
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368248
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-02-09 19:17:26 +00:00
Greg Daniel
af1d193d46 Remove old GrVkBuffer class and rename Buffer2 to Buffer.
Bug: skia:11226
Change-Id: I5f507a0d3ffe0a2698b10b0535486986c2a8b5b7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367977
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2021-02-09 14:23:32 +00:00
John Stiles
e8a2492b68 Migrate DefinitionMap logic to its own class.
This doesn't change any functionality. It just compartmentalizes a large
chunk of logic that was previously intertwined in the Compiler class.
This logic stands alone and doesn't need anything from the Compiler at
all except the generic "Defined" expression from the Context.

In followup CLs I intend to experiment with changes to the API and
logic, but factoring the code out seemed like a big enough change that
it deserved its own CL.

Change-Id: I3e1a7c62812c6f284167c967086ef4dd828a0b2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367879
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-02-09 02:27:26 +00:00
Chris Dalton
a43d58393a Convert stroke tessellation to using GrVertexWriter
Bug: chromium:1172543
Bug: skia:10419
Change-Id: Ie2d05b0d37e03e8cd3eb69c67da89c02ffa49ddb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367576
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-02-08 23:16:34 +00:00
Greg Daniel
5af72c1abe Move mesh buffers over to new vulkan buffer class.
Bug: skia:11226
Change-Id: I7939233559e673b10c9e471137d44282b9612f8e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366317
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2021-02-08 21:08:28 +00:00
Chris Dalton
a6a3d05ffb Add a writer class for indirect draw commands
This enforces write-only access to the mapped buffers, will enable
chaining of indirect strokes, and gives us the ability to reorder the
fields for Metal.

Bug: chromium:1172543
Bug: skia:11291
Bug: skia:10419
Change-Id: I4449ff85dd0019f6d6d6781ede52bcf26dee8b02
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367416
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-02-08 19:13:42 +00:00
Greg Daniel
2e967df83d Reland "Switch vulkan transfer buffers to new buffer class."
This reverts commit 393debc430.

Reason for revert: reland with fixes

Original change's description:
> Revert "Switch vulkan transfer buffers to new buffer class."
>
> This reverts commit 2d4c32987a.
>
> Reason for revert: maybe breaking chrome roll?
>
> Original change's description:
> > Switch vulkan transfer buffers to new buffer class.
> >
> > Bug: skia:11226
> > Change-Id: I58fc7e02dc9ea9a06e855107aad4fbbd7b98d347
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366316
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Jim Van Verth <jvanverth@google.com>
>
> TBR=egdaniel@google.com,jvanverth@google.com
>
> Change-Id: I7de37315a10c2cd9148003643d9543e883c17053
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:11226
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367065
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,jvanverth@google.com

# Not skipping CQ checks because this is a reland.

Bug: skia:11226
Change-Id: Ib6c2e1cddc13afdf85f556074d1c475d286db398
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367216
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-02-08 18:10:34 +00:00
Adlai Holler
a3987cc587 Remove deferred proxy machinery
These aren't used any more in favor of lazy proxies.

Bug: skia:11288
Change-Id: I992e1a3dd343e0ebc7f3a4f18c0054453dfebbaf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366896
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-02-08 16:23:04 +00:00
John Stiles
c2c1b0c460 Migrate some SkSL swizzle tests to dm.
Change-Id: I2bd6bf9c368359a2b21861c1b6f621040d335111
Bug: skia:11009
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367056
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-02-08 16:16:28 +00:00
Mike Reed
1d62221553 Hide (unused) SkDrawLooper
Bug: skia:8672
Change-Id: Ib8b614d94925b3cc7d02be422dbb7e96ea4c26b6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366338
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-02-07 12:49:53 +00:00
Brian Osman
001850105e Create SkSLOperators, centralize functionality
Change-Id: I3593e7ab0caac2fd572346038cbc8ff63e6fe970
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366406
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-02-06 16:24:12 +00:00
Greg Daniel
393debc430 Revert "Switch vulkan transfer buffers to new buffer class."
This reverts commit 2d4c32987a.

Reason for revert: maybe breaking chrome roll?

Original change's description:
> Switch vulkan transfer buffers to new buffer class.
>
> Bug: skia:11226
> Change-Id: I58fc7e02dc9ea9a06e855107aad4fbbd7b98d347
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366316
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>

TBR=egdaniel@google.com,jvanverth@google.com

Change-Id: I7de37315a10c2cd9148003643d9543e883c17053
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11226
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367065
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-02-06 03:37:29 +00:00
Ethan Nicholas
c0f9815609 Added detection for non-constant-folded divide by zero errors in
SkSL.

It would previously catch 1 / 0, but fail to detect x / 0.

Bug: skia:11051
Change-Id: I3adb5942cce03a7ad40a13a8ca5d5a7f2029d6ad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366720
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
2021-02-06 03:13:16 +00:00
Greg Daniel
2d4c32987a Switch vulkan transfer buffers to new buffer class.
Bug: skia:11226
Change-Id: I58fc7e02dc9ea9a06e855107aad4fbbd7b98d347
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366316
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2021-02-05 19:49:34 +00:00
John Stiles
d437478348 Migrate even more SkSL tests to run in dm.
- ResizeMatrix
- ScalarConversionConstructorsES2
- StackingVectorCasts
- StaticIf
- SwizzleBoolConstants

Non-ES2 compatible tests:

- ResizeMatrixNonsquare
- ScalarConversionConstructorsES3

Newly discovered bugs:
- skia:11278 SPIR-V does not support casting non-square matrices

Change-Id: I7feb78f0380d0a9cb328ec61f96a364ad1281432
Bug: skia:11009, skia:11278
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366408
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-02-05 16:04:43 +00:00
Mike Reed
2847d078c5 Undo legacy high-quality hack
Change-Id: I102551cd9cb0854d111d14fd623b39df12c9acf3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366537
Reviewed-by: Mike Reed <reed@google.com>
2021-02-05 13:54:45 +00:00
Chris Dalton
05007dfd58 Rename GrStrokeOp -> GrStrokeTessellateOp
Bug: skia:10419
Change-Id: I04fecec39610d7519edef8a97f367b329b6eea4c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366116
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2021-02-04 20:25:18 +00:00
Chris Dalton
2224100b25 Create an abstract GrStrokeTessellator class
Now there is only one op to tessellate a stroke, and it creates its
own GrStrokeIndirectTessellator or GrStrokeHardwareTessellator
internally. This will allow us to dynamically switch into hardware
tessellation when we need to batch strokes that have different
parameters or colors.

Bug: chromium:1172543
Bug: skia:10419
Change-Id: I3cddb855fdbb9ab018785584497c843e3e31b75e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366056
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2021-02-04 19:57:28 +00:00
John Stiles
e609598fe6 Reject array-typed vardecls and array ctors in strict ES2 mode.
This is enforced by ANGLE in Strict ES2 mode; we need to enforce it as
well.

Change-Id: I6e2f547ad8e0ce817742cf84659764cf6bce38b9
Bug: skia:11270
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366339
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-02-04 19:36:50 +00:00
Greg Daniel
8eb119af46 Move uniform buffers over to new vulkan buffer class.
Bug: skia:11226
Change-Id: Ia6a0e86722bc718e6827c0da8ee5035d90a2deb9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/365536
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2021-02-04 15:42:27 +00:00
John Stiles
ecd2036eae Migrate more SkSL tests to run in dm.
- CastsRoundTowardZero
- Functions
- GeometricIntrinsics
- HelloWorld
- Hex

Other test updates:
- DeadLoopVariable (for-loop structure incompatible with ES2)
- FunctionPrototype (RTE currently disallows calling undef'd functions)
- HexUnsigned (unsigned types incompatible with ES2)

Change-Id: I794bee24dfac55281c9b8b130529888ba2546290
Bug: skia:11009
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/364678
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-02-03 23:45:15 +00:00
John Stiles
248f57b39b Reject array constructors with the wrong number of elements.
We now catch this error at IR generation time; previously we'd send it
to the driver (where it would fail to compile).

Change-Id: I45890214ffa164be1c0f359320f942bc4dc479ca
Bug: skia:11265
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/365697
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-02-03 22:33:02 +00:00
John Stiles
56233d1379 Migrate matrix SkSL test to dm.
This uncovered a bug in Metal code generation of `matX *= matY` which is
now fixed. (It was emitting the helper function more than once.)

Change-Id: I0aeb0efe7ab5fbf5592a8ca6f4f5b50354d3d7f4
Bug: skia:11262
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/365489
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-02-03 20:42:57 +00:00
Greg Daniel
87d784f1f9 Add new GrVkBuffer class to merge all types in one.
The goal here is remove the need for all the specialized vulkan buffer
subclasses and to not have the new class use GrVkResources for tracking
lifetime on command buffers.

This CL just makes the new class and it is not actually used by anything
yet.

Bug: skia:11226
Change-Id: I5f8d8d112af773ba1e8da17e07e75f6f4100e927
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/364617
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2021-02-03 14:12:59 +00:00
John Stiles
5a956ce54b Add more dm tests for the comma operator.
Change-Id: I37a95fd95c23a91c3510f922bab0569093e612a5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/364604
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-02-03 01:28:48 +00:00
Mike Reed
58a7d8520b Opt into new matrix imagefilter api
Bug: skia:7650
Change-Id: I6baac23026542a4fa7da5d2c3aadc936b1a8ae61
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/364638
Reviewed-by: Mike Reed <reed@google.com>
2021-02-03 01:18:45 +00:00
Ethan Nicholas
c3bb9e3bbd add Start/EndFragmentProcessor to DSLWriter
Change-Id: I6f9d414d55b3ba64c3f67f3a590f6b7b5642062a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/364599
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-02-02 20:56:13 +00:00
Mike Reed
3d2291cd75 Reland "Remove unneeded flags for flutter"
This reverts commit 2bf7d6ff31.

Reason for revert: have updated flutter call-sites

Original change's description:
> Revert "Remove unneeded flags for flutter"
>
> This reverts commit 5c6c3be981.
>
> Reason for revert: something breaking in Flutter
>
> Original change's description:
> > Remove unneeded flags for flutter
> >
> > Change-Id: I0e5af51d56622918f1590ae05a0d88507213505c
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/363797
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Mike Reed <reed@google.com>
>
> TBR=reed@google.com
>
> Change-Id: Ie4e50a1f5feb5798ad12cb82edc2d66bbaed4722
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/364436
> Reviewed-by: Mike Reed <reed@google.com>

TBR=reed@google.com

# Not skipping CQ checks because this is a reland.

Change-Id: I44aa4f81b34acaff56249ff9392e9fb3acda5256
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/364602
Reviewed-by: Mike Reed <reed@google.com>
2021-02-02 18:10:32 +00:00
John Stiles
931cad1d74 Update function-type-matching tests to work as Runtime Effects.
Previously, our only test was invoking `sin(1)` which is a pretty
ineffective test. Now, we test args and return types for all the basic
scalars/vectors/matrices.

Change-Id: I7d335303eef8b9c9c6cfef2265a15bbd9bd73e0c
Bug: skia:11246
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/363943
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-02-02 13:47:35 +00:00
Mike Reed
2bf7d6ff31 Revert "Remove unneeded flags for flutter"
This reverts commit 5c6c3be981.

Reason for revert: something breaking in Flutter

Original change's description:
> Remove unneeded flags for flutter
>
> Change-Id: I0e5af51d56622918f1590ae05a0d88507213505c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/363797
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=reed@google.com

Change-Id: Ie4e50a1f5feb5798ad12cb82edc2d66bbaed4722
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/364436
Reviewed-by: Mike Reed <reed@google.com>
2021-02-02 12:39:55 +00:00
Mike Reed
5c6c3be981 Remove unneeded flags for flutter
Change-Id: I0e5af51d56622918f1590ae05a0d88507213505c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/363797
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-02-02 03:45:29 +00:00
John Stiles
9fc9b87540 Add bool2/bool3/bool4 to GrSLType.
These are basic vector types, required by GLSL ES2, but we could not
create helper functions using them because they were missing from our
GrSLType enum. (This also prevented Runtime Effects from using these
types in helper functions.)

Change-Id: I78c328499e8ed90cb29c641b90ee59460a5a45de
Bug: skia:11246
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/364036
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-02-02 00:25:29 +00:00
Mike Reed
9223665316 Guard legacy matrixtransforms, and expose new one
Bug: skia:11236
Bug: skia:11235
Change-Id: I53fc0532a6067c5b30fc0345ded95d50d9955d38
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/363098
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-02-01 22:10:39 +00:00
John Stiles
c068a8f00b Update various shared/ tests to run in dm.
These tests have updated to return green on success, or red on failure.
Some tests were modified slightly to conform to ES2 limitations, or
split into separate ES2 and ES3 parts.

Change-Id: Ib47aeca217aef33f3c4b5999d93afed5d42a1e62
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/363876
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-02-01 22:06:59 +00:00
Brian Osman
21d2b6a651 Use unsigned values when constant-folding integer vectors
We already had this trick for scalar integers, this extends it to
integer vectors. As with prior work in this area, it would be better to
detect this case and produce an error, but now we at least produce
consistent and well-defined results (rather than undefined signed
integer overflow).

Bug: skia:10932
Bug: oss-fuzz:29494
Change-Id: I45526fe96b6ea42c0e88b9862f6961b316810321
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/363962
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-02-01 21:44:28 +00:00
Greg Daniel
c27273a776 Revert "Add missing Gr headers to GN file."
This reverts commit 3b8204039b.

Reason for revert: GrVkTypesPriv and GrD3DTypesPriv are now listed twice and break VS.

Original change's description:
> Add missing Gr headers to GN file.
>
> Change-Id: Id01cc2c3bf54bad21cba105b8302d57f424e1ba2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/363938
> 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>

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

Change-Id: I3e6e18aacc8880d60dfa6c60b97c4b5c8f5018a8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/363786
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-02-01 19:23:00 +00:00
Brian Osman
84d884ab50 Revert "Revert "Reland "Add particle GMs"""
This reverts commit ad8ce4dbb2.

Change-Id: I26077c56fa69e60a003359fa9da758bbfd6a3425
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/363777
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-02-01 18:47:18 +00:00
John Stiles
3b8204039b Add missing Gr headers to GN file.
Change-Id: Id01cc2c3bf54bad21cba105b8302d57f424e1ba2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/363938
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-02-01 18:30:03 +00:00
John Stiles
2ff8f86205 Run the SkSL Operators test as a Runtime Effect.
The test has been split into an ES2 version and ES3 version; the ES2
side omits unsupported integer ops like << >> & | ^ %.

Change-Id: Iba16d469a477809b17a823b1c68ae8937624c68e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362616
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-02-01 17:21:33 +00:00
John Stiles
ecdfc03f3b Add DSL headers to GN files.
Change-Id: I712b34874f36dc83812389d24bc0e4997ead1b12
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/363780
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-02-01 16:45:28 +00:00
John Stiles
94e72b90b8 Add test to verify side effects from the comma operator.
SkVMCodeGenerator was lacking support for the comma operator entirely;
this has now been implemented.

Change-Id: I9350f54e6ee52764c620116e6dbfe4ca3e9cd47e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/363096
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-02-01 16:16:58 +00:00
Greg Daniel
29e521c533 Revert "Initial support for DSL FPs"
This reverts commit c48a23d774.

Reason for revert: Possibly breaking some builds on android roll

Original change's description:
> Initial support for DSL FPs
>
> Change-Id: I1abbe881f925ac6db4f7d672a391aadd349a33b5
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361556
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
> Reviewed-by: John Stiles <johnstiles@google.com>

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

Change-Id: Ia76b24293ab676fbf9e43f470cf3c3d6b96b2d34
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362696
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-01-30 02:51:51 +00:00
Ethan Nicholas
c48a23d774 Initial support for DSL FPs
Change-Id: I1abbe881f925ac6db4f7d672a391aadd349a33b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361556
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-01-29 21:07:18 +00:00
Brian Osman
ad8ce4dbb2 Revert "Reland "Add particle GMs""
This reverts commit cdd852b579.

Reason for revert: TSAN

Original change's description:
> Reland "Add particle GMs"
>
> This reverts commit 3b01242199.
>
> Cq-Include-Trybots: luci.skia.skia.primary:Canary-G3
> Change-Id: I83ee324d5ca927413022b08fb4b48936adbc0e2e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362058
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

TBR=brianosman@google.com

Change-Id: I497cc3e51dd0d0d0d330f34b90f4727ef2e0a8ac
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Cq-Include-Trybots: luci.skia.skia.primary:Canary-G3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362417
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-01-29 19:22:18 +00:00