Commit Graph

57527 Commits

Author SHA1 Message Date
Herb Derby
97bf72869a Reland "change matrix_2x3 to row-major"
This is a reland of e023608611

I have expanded the scope of this CL because having multiple
versions of the same code was confusing me.

All updatable functionality has been moved to SkTransformShader.
I made SkUpdatableShader implement the SkStageUpdater allowing
SkTransformer to act as both types of updater.

Original change's description:
> 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>

Change-Id: I3326d8ea2c6fa9dabca8021a746600b4649933e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456638
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-10-07 15:28:11 +00:00
Greg Daniel
e47c5d16aa [graphite] Add TextureProxy support.
With this change it should now be safe to start using Proxys and Textures
everywhere. There is no caching the Proxys/Textures will live as long as
someone holds a ref.

Bug: skia:12466
Change-Id: I3c657b65b44b9dca0a77a255d6a4fc89e3862124
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456916
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-10-07 14:56:25 +00:00
Michael Ludwig
8724136129 Revert "Allow tracking of Precompositions onEnter/onExit"
This reverts commit 510e0c57da.

Reason for revert: probably blocking g3 roll

Original change's description:
> 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>

Change-Id: I2e5b12bd45d48fc98ee799a733740e4cd8ae3dcb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456921
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-07 13:54:07 +00:00
John Stiles
042a197ce2 Migrate compiler elimination passes to Transform.
Change-Id: Ibb8695917d0a8ff43467542ee7a7b36f573513f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456798
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-10-07 13:50:07 +00:00
Michael Ludwig
2aff315093 [graphite] Add Shape variant over path, rect, rrect, convex poly
This is basically GrShape except that I removed some of the API that
GrStyledShape used. I also changed the set of types that Shape can
represent to be better match what I imagine our final set will be in
graphite: {empty,point,line,rect,rrect,path,arc}
       -> {empty,rect,rrect,path,convex-polygon}

The convex polygon is used to store points and lines as well. I also
imagine that it will subsume the need for migrating GrQuad over.

I'm doing this on its own in preparation for moving the ClipStack over
and consolidating the draw handling in Device/DrawList, all of which
get a lot easier if there is a single type that stores the geometry.

For the first milestone, actual rendering will still likely use
Shape::asPath() for the path renderer, but it's not a lot of extra work
to preserve the logical type at the high level, so may as well do that.

There are a few functions internal to Shape that still need to be
implemented (converting a path to a list of vertices, and doing point
containment), but those can come in a later CL.

Bug: skia:12466
Change-Id: I1040c54e3b8004f3bc1767d72ded60b572b39596
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456257
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-10-07 13:48:25 +00:00
John Stiles
bcaacecd9b Make Program owned-elements public.
Change-Id: I7680376d0f0a7bbaa7cb845e2223b9ce4d29c96f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456797
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-10-07 13:44:34 +00:00
John Stiles
2dfbf99edf Migrate IsConstantExpression out of SkSLAnalysis.
Change-Id: I08717dd9e9ad20a18a623e06f0c66a0f697effa4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456796
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-10-07 13:40:00 +00:00
John Stiles
2153a87064 Migrate GetLoopUnrollInfo out of SkSLAnalysis.
Change-Id: Ic0d1b04ee09a144dbb13cc98dff8e10409186a8e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456648
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-10-07 13:39:22 +00:00
John Stiles
8db7cd008d Migrate CanExitWithoutReturningValue out of SkSLAnalysis.
Change-Id: I0e59da9dda8917e2bc9d6959fdfeeaeae9372c3a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456647
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-10-07 13:24:26 +00:00
Brian Osman
6358289210 Fix particles demo page
Was using an old (unnecessary) CK construct that no longer exists

Change-Id: Ib56795d5588586f6da07e0c90e36c3aee1fbbb18
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456645
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-10-07 12:55:18 +00:00
skia-autoroll
96713facd7 Roll ANGLE from 27a98cf485c9 to 161668b6656d (20 revisions)
27a98cf485..161668b665

2021-10-07 syoussefi@chromium.org Refix ANGLE_DISABLE_POOL_ALLOC build
2021-10-07 ynovikov@chromium.org Redisable PoolAllocatorAlignmentTest.Alignment in Debug
2021-10-06 ynovikov@chromium.org Fix ANGLE_DISABLE_POOL_ALLOC build
2021-10-06 lfy@google.com Add advice to cipd auth-login on macOS for Googlers
2021-10-06 ynovikov@chromium.org Fix iOS build
2021-10-06 lubosz.sarnecki@collabora.com DisplayVk: Always expose EGL_KHR_gl_colorspace.
2021-10-06 jonahr@google.com Clean up Metal test expectations.
2021-10-06 jmadill@chromium.org Lift Intel specific test expectations.
2021-10-06 geofflang@google.com EGL: Merge DisplayAndroid/Gmb into DisplayEGL.
2021-10-06 syoussefi@chromium.org Assert that float32->float10/11 doesn't shift by more than 32
2021-10-06 syoussefi@chromium.org Change default alignment of pool allocator to pointer-aligned
2021-10-06 syoussefi@chromium.org Reduce memory waste in PoolAllocator due to alignments
2021-10-06 syoussefi@chromium.org Clean up the PoolAllocator class
2021-10-06 weiweilin@google.com [milo] update test presentation config to group by test_suite
2021-10-06 jmadill@chromium.org Add test names and metric names for BitSetIteratorPerf.
2021-10-06 thakis@chromium.org win: Remove call to deprecated GetVersionEx
2021-10-06 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 70178a763bb9 to 8c181d7d1165 (2 revisions)
2021-10-06 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 9f83659e6f7d to 60326f21d82c (8 revisions)
2021-10-06 cnorthrop@google.com Vulkan: Suppress modified device count warning
2021-10-06 syoussefi@chromium.org Translator: Fix uniform/struct separation for anonymous arrays

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: I6fe815cd8f4e481d6772ad50f102585cc203a6f1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456838
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-07 05:31:22 +00:00
skia-autoroll
f42a0037c0 Roll SwiftShader from 8c181d7d1165 to 03fa329741b1 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/8c181d7d1165..03fa329741b1

2021-10-06 capn@google.com Separate device memory allocations from host allocations

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: Iadf4e925a19b11c286bd76a2c3e9de5a04c9d9ac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456837
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-07 05:10:35 +00:00
skia-autoroll
ad1cc81458 Roll Chromium from 521abf2ff706 to eb5bc573ffd5 (509 revisions)
521abf2ff7..eb5bc573ff

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: I63fad9cf207dfd38ad5f07c5426f2709a69b012d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456836
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-07 05:06:00 +00:00
skia-autoroll
29eed809a3 Roll Dawn from ccbc1a39da70 to 43d584940829 (2 revisions)
https://dawn.googlesource.com/dawn.git/+log/ccbc1a39da70..43d584940829

2021-10-07 rharrison@chromium.org Replace usages of BoundArrayAccessors w/ Robustness
2021-10-06 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 71763c84c2fa to 08146e2300ae (1 revision)

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

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: Iff65b0d68931911f752544eb15a2d5d6890c7e73
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456839
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-07 05:00:55 +00:00
skia-autoroll
1347e1334f Roll skcms from b5aafce0db45 to 0d5496480324 (1 revision)
https://skia.googlesource.com/skcms.git/+log/b5aafce0db45..0d5496480324

2021-10-06 lovisolo@google.com [skcms] Run Bazel tryjobs using the VM service account, not JSON keys.

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 brianosman@google.com,michaelludwig@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: brianosman@google.com,michaelludwig@google.com
Change-Id: Ic396880c09df7c726bb39565c48650badcbded2d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456597
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 21:51:25 +00:00
Greg Daniel
cb0d81bfe3 Set Skia sksl generator to use registered magic number.
Change-Id: I7acde3743f5495fc22acd10d6aee966443f5046a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456639
Auto-Submit: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-10-06 21:26:12 +00:00
John Stiles
a7827d6ac1 Migrate EliminateDeadLocalVariables into Transform.
Change-Id: Idc0c51c0d293121fd306e7153b2e47f7e7dec222
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456646
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-10-06 21:09:23 +00:00
John Stiles
7176637442 Migrate EliminateUnreachableCode into Transform.
Change-Id: Ib32895a78a8de4c49ce1208f0c1b9b111d092b42
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456643
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-10-06 20:49:38 +00:00
John Stiles
da4bcb6891 Migrate ProgramUsage out of SkSLAnalysis.
Change-Id: I005eccfa262ed047409cce0417f50f93fb6341a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456641
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-10-06 20:46:12 +00:00
John Stiles
a272914cbb Add SkSL prefix to SwitchCaseContainsExit filename.
Change-Id: Ia5bf3423fa75ac610fd34db252fee493d5a53877
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456644
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 20:44:24 +00:00
John Stiles
b691ce4151 Migrate CheckProgramUnrolledSize out of SkSLAnalysis.
Change-Id: I97c4d1b4c870367d6457f4dd851f48a6d2211e5d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456640
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 20:39:34 +00:00
Jim Van Verth
1190301c3d [graphite] Add ResourceProvider to Gpu
Bug: skia:12466
Change-Id: I1224ad193bb9d866439673161075e29adedc0008
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456475
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-10-06 19:48:41 +00:00
Jim Van Verth
daa3c703b0 [graphite] Hook up Pipeline creation.
Adds in test pipeline state object creation and shader compilation
routine.

Bug: skia:12466
Change-Id: Ie8d99078a2cebf1da37576e5a50a798fc79c295b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456472
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-10-06 19:45:22 +00:00
John Stiles
a1b44b72eb Migrate SwitchCaseContainsExit out of SkSLAnalysis.
This CL also removes `SwitchCaseFallsThrough` entirely; it was
not referenced anywhere.

Change-Id: I58298bf2a603615e37f4cced9db6d2f4c2c54d5a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456473
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-10-06 18:50:59 +00:00
Michael Ludwig
eec27f3c3b Revert "change matrix_2x3 to row-major"
This reverts commit e023608611.

Reason for revert: breaking asserts

Original change's description:
> 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>

Change-Id: I26148f2a6a614ba013cc850bbb9ad7b488c50f6b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456636
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-06 18:15:04 +00:00
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