Commit Graph

54172 Commits

Author SHA1 Message Date
Brian Osman
c0c3231bde On NVIDIA + ANGLE, test 4x MSAA, not 8x
By all accounts, this should produce much more deterministic output,
letting us remove quite a few ignores.

Bug: skia:6813 skia:6545
Change-Id: I7bc2c8e05c2f6e8110ea550882d5f0a45548008b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384856
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-03-15 17:19:25 +00:00
John Stiles
5755a5fb98 Update simple gradient functions to use only a single return.
By avoiding the introduction of a temporary variable, they can remain
candidates for inlining even after we pare back the inliner logic.
More info: http://go/optimization-in-sksl-inliner

Change-Id: If58c757b8754036b0b0530379b639c09953744ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384859
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-03-15 16:59:25 +00:00
Brian Osman
fc4b9919d3 Force global initializers to be constant expressions
Prevents us from accepting code that can't be correctly transformed to
GLSL, like:

  uniform float x;
  float y = x;

(Previously, writing code like that in a runtime effect would
effectively produce the exact same code all the way through to GLSL, and
the driver would fail to compile it).

Bug: skia:11336
Change-Id: Iaa797587c4a4a7289ed59ce2736cf0bf0fc5bca3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384698
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-03-15 16:54:05 +00:00
Jim Van Verth
30980650f7 Merge MSL vertex and fragment shaders into one string before compiling.
Invoking the MSL compiler seems to have a significant startup cost.
So rather than running it twice -- one each for the vertex and fragment
shaders -- this CL merges them into a single string using namespaces,
thus allowing a single compiler invocation.


Bug: skia:11389, skia:11392
Change-Id: I49facf995cc7f7529e61dc9d2af194a00ed1ccb6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384700
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-03-15 16:46:05 +00:00
John Stiles
99b2d04d31 Add 'kOnlySingleReturn' complexity type to the Inliner.
This can be used in followup CLs to test various forms of inliner
simplification. (More info: http://go/optimization-in-sksl-inliner )

Change-Id: Icd12a1ae1481c9aeacf3f11e85872fecfa972ec3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384836
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-03-15 16:34:21 +00:00
Adlai Holler
da16367907 Remove fFreeIntervalList from GrResourceAllocator
Now that we assign all surfaces upfront, intervals are not reused.

In the future, with ops task clustering, it could
theoretically be useful for multi-pass allocation (i.e. the
clustered version was rejected for memory budget,) but
that scenario is so rare that this machinery should just go away.

Bug: skia:10877
Change-Id: I261987d7ba68a49bc1d9c01eb1df3bfcb4747c9f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384701
Auto-Submit: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-03-15 16:29:15 +00:00
Herb Derby
310dc4e0b9 remove unused code SkGlyphIDSet
Change-Id: I66340bbe5c4fcf8f9bcdac3436602c5edf689761
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384756
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-03-15 15:31:15 +00:00
Robert Phillips
d074b6293c Switch GrTextureFreedMessages over to using DirectContextIDs
Bug: skia:11728
Change-Id: I514f917577a4166c2834f72fc8c64ab85b259938
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382879
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-03-15 15:23:35 +00:00
Greg Daniel
e895ab2fc8 Have GrVkTexture not derive from GrVkImage.
A side effect of this change is that I've tried to pass GrVkAttachments
around GrVkGpu instead of GrVkTextures where I could to start the
transition within the backend code.

Bug: skia:10727
Change-Id: Ibc9553cdbd7f6ae845c56aad3f25f58e4c478e46
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/379577
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-03-15 15:18:55 +00:00
Weston Tracey
4bcb56f389 [infra] Add initial job for testing on Apple M1.
Bug: skia:11713
Change-Id: I16b2e74a946cf28cf46bf0e8515da2415b6f29af
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382876
Commit-Queue: Weston Tracey <westont@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2021-03-15 14:52:25 +00:00
John Stiles
97d8d7fce0 Remove obsolete TODO.
The referenced bug is closed, and the compiler does correctly emit an
error here.

Change-Id: I824f7819a1e077163f528ac503f3743aab5e58a1
Bug: skia:11322
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384697
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-03-15 14:43:25 +00:00
Adlai Holler
78d51fff70 Track number of render passes in GR_GPU_STATS
Also dump them in key-value pairs so we can see them remotely.

Bug: skia:10877
Change-Id: I09654444336ea2db92db375d4baae67ecce2dd79
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384177
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2021-03-15 13:52:35 +00:00
skia-autoroll
4fb13e026b Roll Dawn from d89814ed7a11 to c357bcad5f7d (2 revisions)
https://dawn.googlesource.com/dawn.git/+log/d89814ed7a11..c357bcad5f7d

2021-03-15 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from e2bc7aa74709 to 717fbbf18387 (2 revisions)
2021-03-15 jiawei.shao@intel.com Add "opengles" in the helper information of Dawn samples

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from e2bc7aa74709 to 717fbbf18387

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

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/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: kainino@google.com,cwallez@google.com
Change-Id: Ic7fbb9faa0783bb1e501375a4a5de0d776cca167
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384636
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-03-15 12:10:35 +00:00
skia-autoroll
a9f6a3b4c3 Roll Chromium from ed657436836f to 1f9e430e837e (424 revisions)
ed65743683..1f9e430e83

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 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/master/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: Ief5a525989bf02d78b3968f33471c296b1b69622
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384540
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-03-15 05:32:34 +00:00
skia-autoroll
c3935b9a8a Roll SwiftShader from 3c4fd15fb075 to 5cdf55ff2084 (6 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/3c4fd15fb075..5cdf55ff2084

2021-03-13 capn@google.com Remove vkGetInstanceProcAddr from exported symbols on Fuchsia
2021-03-12 capn@google.com Remove vkGetInstanceProcAddr from exported symbols on Android
2021-03-12 natsu@google.com Handle semaphore update in vkAcquireImageANDROID
2021-03-12 natsu@google.com Update AHB default YUV range to NARROW
2021-03-12 capn@google.com Regres: Roll dEQP to 1.2.5.2-dev revision 288b9dd
2021-03-12 swiftshader.regress@gmail.com Regres: Update test lists @ 3c4fd15f

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 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/master/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: I09477cb3f58083a0cf9eacb01158a048ab258efb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384542
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-03-15 05:08:34 +00:00
skia-autoroll
98d3513161 Roll ANGLE from 225e1952d494 to cd881848f3bb (12 revisions)
225e1952d4..cd881848f3

2021-03-13 ianelliott@google.com Actually skip a flaky/timeout test
2021-03-12 timvp@google.com Create GN arg to enable non-conformant features
2021-03-12 ianelliott@google.com Suppress flaky test on win-swangle
2021-03-12 lunpujun@google.com Micro-optimization for loading 3-channel images.
2021-03-12 ianelliott@google.com Suppress flaky EGL resize failure on Linux
2021-03-12 jmadill@chromium.org Vulkan: Add test for UBO descriptor allocations.
2021-03-12 ynovikov@chromium.org Remove old Mac bot from CQ
2021-03-12 natsu@google.com Vulkan: Use optimal tiling for AHB
2021-03-12 j.vigil@samsung.com EGL: Add attribute check in ValidateQueryContext
2021-03-12 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from a2fe8e1b2111 to 3c4fd15fb075 (2 revisions)
2021-03-12 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from a4e10bfde719 to ea8c29e1ee20 (5 revisions)
2021-03-12 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 9e42f9e4abc6 to e90a7a4d378a (458 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 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/master/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: angle_end2end_test --gtest_filter=EGLCreateContextAttribsTestTest: Test: passed the CQ dry run.
Change-Id: I00cab3898b89244e2bd37231e4b89ed2c5cdf229
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384541
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-03-15 04:53:54 +00:00
skia-autoroll
64366ffde4 Roll Dawn from b458fc835925 to d89814ed7a11 (10 revisions)
https://dawn.googlesource.com/dawn.git/+log/b458fc835925..d89814ed7a11

2021-03-15 jiawei.shao@intel.com Enable DepthStencilCopyTests.ToStencilAspect on Windows/Intel/Vulkan
2021-03-12 rharrison@chromium.org Add reflection for fragment inputs/outputs from Tint
2021-03-12 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 4c8d7259da8a to e2bc7aa74709 (1 revision)
2021-03-12 brandon1.jones@intel.com Don't use depth offset in TextureCopySplitter
2021-03-12 jiawei.shao@intel.com Workaround the compile error when calling std::begin on C arrays
2021-03-12 bryan.bernhart@intel.com D3D12: Pass usage to ProduceTexture
2021-03-11 bajones@chromium.org Updating RenderPipelineDescriptor to the newest layout
2021-03-11 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from d9250a5a2175 to 4c8d7259da8a (9 revisions)
2021-03-11 jiawei.shao@intel.com D3D12: Add workaround for T2T copy issue on Intel GPUs
2021-03-11 aleksi.sapon@builditsoftware.com CMake fix

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from d9250a5a2175 to e2bc7aa74709

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

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/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: cwallez@google.com,kainino@google.com,enga@google.com
Change-Id: I0f696dd7b2fcf0bf6bb174a5851c8576d3eebfcd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384576
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-03-15 04:45:34 +00:00
Ravi Mistry
441f3c72d7 Set "binary_size_plugin" output.property on Build-Stats-* bots
* The output.property looks like this: {"canvaskit.wasm": 7394679}
  (from https://ci.chromium.org/raw/build/logs.chromium.org/skia/5236eb95c4490b11/+/annotations)

* Refactored scripts to avoid hardcoding the magic_seperator and total_size_bytes.

* Added this capability to all 4 infra/bots/buildstats/* scripts.

* Added missing tests for analyze_web_file and analyze_cpp_lib.


The output.property will be eventually consumed by a Gerrit plugin to display change in bytes in the UI.

Note: buildstats_cpp.py is not currently used by any bot. But if it is in the future it will work.

No-Tree-Checks: true
Bug: skia:11744
Change-Id: I593bae8ff73c35089cc2785a1cc4bc5b630007c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377840
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-03-14 23:26:38 +00:00
Brian Osman
4f3f64c110 Preserve 'const' on globals and function parameters in runtime effects
Bug: skia:11716
Change-Id: Ic09071544b5b5216b01fbc9b478b6269dd96202f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382280
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-03-13 13:32:27 +00:00
John Stiles
bf16b6c5df Add Make factory function to Block.
Block::Make always makes a real Block object. This is important because
many callers rely on Blocks specifically; e.g. a function body must be a
scoped Block, nothing else will do.

However, unscoped Blocks are just a collection of Statements and usually
have more flexibility. So, Block::MakeUnscoped is a factory function
that will return the Statement as-is for a single-statement unscoped
Block. For an entirely empty Block, MakeUnscoped returns Nop.

Change-Id: Ied65d505bde4ea7f6157a039944018546e4b7333
Bug: skia:11342
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384180
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-03-13 13:28:17 +00:00
John Stiles
ad22300d6c Remove fForceInline argument from EmitArgs.
This improved codegen when it was first introduced. Since that time, our
inliner has become much smarter and no longer needs these hints.

Change-Id: I7725da1eb9814e656849881ad2ca2b1bc038e4a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384320
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-03-13 13:18:47 +00:00
John Stiles
46e7507b0d Revert "Performance experiment: Disable SkSL inliner in nanobench/skpbench."
This reverts commit 3f35ac10b4.

Reason for revert: concluding experiment

Original change's description:
> Performance experiment: Disable SkSL inliner in nanobench/skpbench.
>
> This will allow us to measure the impact (positive or negative) of
> inlining functions before submitting a shader to the driver.
>
> Change-Id: Icbd64096445a353187b30feea68573d89ca18664
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384317
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

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

Change-Id: Ia7c34e3e2bb4f777a4bd18a5646e494eeb3c93ce
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384456
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-03-13 13:08:19 +00:00
Brian Osman
ddcb4d94f9 In pipeline stage generator, never emit declarations for opaque types
This only affects fragmentProcessors (children) - and the backend SkSL
we're emitting should not contain those. We've just been silently
ignoring those declarations when converting to GLSL, MSL, etc.

Change-Id: I241f2f4fe4614b49ebccc9c2976fd408e94656d0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384316
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-03-13 01:46:06 +00:00
Ben Wagner
f913c6639d Expose text and clusters in SkTextBlob::Iter.
Expose text and cluster information in SkTextBlob::Iter when
SK_UNTIL_CRBUG_1187654_IS_FIXED is defined. The names are postfixed
with _forTest to indicate that these values are only being exposed for
testing purposes. This will allow blink tests to better verify the
output SkTextBlobs from the ShapeResultBloberizer. The long term goal
is to only store these results when necessary in a blink side type.

Bug: chromium:1187654,chromium:738643
Change-Id: I8db20a8423e5b0652429ddc16cf8fd14940217cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384336
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-03-13 01:13:36 +00:00
skia-autoroll
908f77ac09 Roll Chromium from c62ff0ef3797 to ed657436836f (453 revisions)
c62ff0ef37..ed65743683

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

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/master/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: kjlubick@google.com
Change-Id: I9b25015eeb51ff117d48bc3fca5fad5eb65e8b7e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383977
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-03-13 00:35:26 +00:00
Jim Van Verth
36a814bffc Precompile cached SkSL to MTLRenderPipelineState.
Takes the stored shaders and pipeline descriptor data stored in the
persistent cache, and generates the appropriate pipeline state. This
is then stored in the pipeline cache rather than the two libraries.

Bug: skia:11392
Change-Id: I2d97dba033a844b70290a411f6bd8891de34e6f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384216
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-03-12 22:27:06 +00:00
Chris Dalton
9431079435 Unblock msaa clip atlas on AMD, Imagination, and Adreno
TBR=michaelludwig@google.com

Change-Id: I858df2325abac4ce8de966446078397cc359e944
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384296
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-03-12 22:14:16 +00:00
Chris Dalton
90898de346 Be more conservative about disabling tessellation for performance
Bug: skia:11138
Bug: skia:11139
Bug: chromium:1163441
Change-Id: I7b7e6ccae63e1fd0e5407609760125383c9fe8aa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384263
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-03-12 22:02:56 +00:00
Brian Osman
c5422d0a00 Change the order of arguments to GrFragmentProcessor::Compose
This makes the function comment "... composes `f` and `g` into f(g(x))"
true. The alternative would be to just fix the comment (and maybe rename
the arguments), but I find this order of arguments less surprising for
something doing function composition.

Change-Id: I38e2ea81402d829c0850713cc060fe16cb19ae28
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384319
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-03-12 22:01:36 +00:00
Chris Dalton
3561955b0a Rename fillRectWithLocalMatrix -> fillPixelsWithLocalMatrix
Rounding out to pixel grid boundaries makes this method dmsaa-ready by
ensuring no pixels have partial msaa sample coverage.

Bug: skia:11396
Change-Id: I2543c8806f94692992a692bd5adedf41326c8910
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383416
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-03-12 21:47:16 +00:00
John Stiles
3f35ac10b4 Performance experiment: Disable SkSL inliner in nanobench/skpbench.
This will allow us to measure the impact (positive or negative) of
inlining functions before submitting a shader to the driver.

Change-Id: Icbd64096445a353187b30feea68573d89ca18664
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384317
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-03-12 20:45:08 +00:00
Chris Dalton
4f447342ce Reland "Remove GrAAType from GrFillRRectOp"
This is a reland of 43e73df990

Original change's description:
> Remove GrAAType from GrFillRRectOp
>
> Replaces it with GrAA. This op always uses analytic coverage,
> regardless of MSAA state.
>
> Bug: skia:11396
> Change-Id: I75174a00bdb3b1f62319de5970aac7f1bbae8e10
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383418
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

Bug: skia:11396
Change-Id: I2589a8f81a43f05329b91b6a136bebf723a5dd03
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384298
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-03-12 20:30:36 +00:00
Chris Dalton
7854da39b3 Avoid structured bindings that trigger gcc bug
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78939

Change-Id: I412dbe28141ec26bb7ba2a8f8da9a936d4bef044
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384260
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-03-12 19:43:06 +00:00
Ethan Nicholas
2f4652f309 Revert "Fixed a number of spots where we should have been using RelaxedPrecision"
This reverts commit a04692f69e.

Reason for revert: Angry Vulkan bots.

Original change's description:
> Fixed a number of spots where we should have been using RelaxedPrecision
>
> Our SPIR-V output was missing many RelaxedPrecision decorations, which
> was presumably impacting performance.
>
> Change-Id: Iee32d4a42f37af167fe0e45f3db94c2142129695
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384178
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

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

Change-Id: If4fe945cb363c9b61b5a4abfde649a437689d2eb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384217
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2021-03-12 18:48:57 +00:00
John Stiles
e8b5a73b56 Remove extraneous line-breaks in generated GLSL/Metal code.
I ran into an issue in an upcoming CL which generated a particularly
ugly switch statement:

    switch (x) {
        default:
             discard;}

So I cleaned this up, and while resolving this issue, managed to improve
a bunch of existing codegen as well. The formatting change has been
split out to a separate CL since it impacts so many golden outputs.

Change-Id: I7a6be29903c47560dcc7f6acd3ef15fd0c5c3c50
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384179
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-03-12 18:39:57 +00:00
Herb Derby
62d6373f8c add the sub run allocator to OwnedArenas operator =
This was an oversight in CL:
https://skia-review.googlesource.com/c/skia/+/383757

Change-Id: Icb7b22218a04ef967fda6d998b1f329fdd334970
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383956
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-03-12 18:34:56 +00:00
Ethan Nicholas
a04692f69e Fixed a number of spots where we should have been using RelaxedPrecision
Our SPIR-V output was missing many RelaxedPrecision decorations, which
was presumably impacting performance.

Change-Id: Iee32d4a42f37af167fe0e45f3db94c2142129695
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384178
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2021-03-12 18:00:56 +00:00
Brian Osman
9e6fc64988 Add SkColorFilterBase::onFilterColor4f virtual, optimize runtime CF
The non-virtual filterColor4f handles premul and unpremul at the API
boundary. onFilterColor4f always works on premul colors.

To get the performance benefits, all color filters in a chain need
to override the virtual. For now, WorkingFormatColorFilter is the
other target, as builtin filters that use runtime effects are always
wrapped with that.

Net effect on matrix_filterColor4f timing:
  before: 10000 ns
  after :   380 ns

Bug: skia:11730
Change-Id: I43d06f22c082636c4eca9e58dc3bc8225d09c910
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383705
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-03-12 17:50:06 +00:00
Chris Dalton
5d34303748 Delete GrSurfaceDrawContext::drawDRRect
Instead, we just push the inner rrect to the clip stack and draw the
outer. It's faster to use GrFillRRectOp for the outer rect anyway, and
now that we use analytic clipping even when MSAA is enabled, there is
no added value in a specialized drawDRRect implementation.

Bug: skia:7826
Bug: skia:11396
Change-Id: I07b3143f2a5f9c75c7dfeda54e777b105bde9992
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383396
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-03-12 17:12:36 +00:00
Chris Dalton
7d592cda58 Delete all low-level rendering from ccpr
This converts ccpr to just a poorly named atlas manager. The atlas
gets rendered by normal calls on its MSAA draw context:

  for (;;) {
      surfaceDrawContext->stencilPath();  // Stencil.
  }
  surfaceDrawContext->stencilRect(atlasBounds);  // Cover.

Bug: chromium:1158093
Change-Id: I758ffd372b2ed5bb8b370156b6f80f6204146700
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/381618
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-03-12 17:02:56 +00:00
John Stiles
20c09f9290 Remove fExtraStatements/convertSingleStatement from IRGenerator.
These seem to be remnants of the old inliner.

Change-Id: I881127d056531a2a23e045ff8f3d8da52314fc6e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384176
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-03-12 16:27:06 +00:00
Chris Dalton
39811680dc Reset onFlush render tasks when allocation failed
Change-Id: I527be48790585b91a7b2b223a61de4b5ac30e3c6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384096
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-03-12 16:05:51 +00:00
Chris Dalton
03730e6ca6 Delete path caching and path rendering from ccpr
All that's left is a clip atlas renderer.

Bug: chromium:1158093
Change-Id: I8b509904a752a202ff1321e5302c41a3f57a5edb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383741
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-03-12 16:02:16 +00:00
Chris Dalton
1bb1f220bd Remove undefined behavior from innershapes gm
It is undefined for the inner rrect to not be contained in the inner.

Change-Id: I632060771fb7918050e1836d17b4702ea765a08f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384116
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-03-12 16:00:46 +00:00
Corentin Wallez
82fe4d2243 Prepare for Dawn using Tint unconditionally.
Bug: dawn:706
Change-Id: I2a85a5a457f9a4c60b8cc337b0330aa348bd62a1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384137
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-03-12 15:05:26 +00:00
John Stiles
a0c04d6ceb Add Make factory functions to basic statements.
These are the simple cases like `break` and `continue` which don't have
any optimization opportunities, types to coerce, or errors to report.
We now have Make functions for consistency across our IRNodes, but they
don't contain any interesting logic.

Change-Id: Iefdb8e3dad66f131dc892f4a7dc647246bf2554e
Bug: skia:11342
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383707
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-03-12 15:04:36 +00:00
John Stiles
9ce80f71de Add Make factory functions to literal types.
This is mostly for consistency with other IRNode types; there isn't any
optimization opportunity or error checking for literals.

Change-Id: I0e6a55cddbd814585ecafeddab4e591fe5113911
Bug: skia:11342
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383996
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-03-12 14:18:06 +00:00
skia-autoroll
91113acfd1 Roll ANGLE from 44b9579cf7b8 to 225e1952d494 (18 revisions)
44b9579cf7..225e1952d4

2021-03-12 cnorthrop@google.com Tests: Add Plants vs. Zombies 2 trace
2021-03-12 jdarpinian@chromium.org Revert "Update DEP actions for Python 3"
2021-03-11 cnorthrop@google.com Tests: Add Lineage M trace
2021-03-11 syoussefi@chromium.org Vulkan: Don't let glslang link shaders
2021-03-11 cnorthrop@google.com Capture/Replay: Support DrawElementsBaseVertex
2021-03-11 ianelliott@google.com Suppress flaky MultithreadingTest on Win/Swangle
2021-03-11 ynovikov@chromium.org Skip dEQP tests flakily timing out on SwANGLE
2021-03-11 jplate@google.com Fix CL_EVENT macro
2021-03-11 lexa.knyazev@gmail.com Avoid undefined behavior in BPTCCompressedTextureTest
2021-03-11 jplate@google.com Avoid implication that adding the issue number is optional
2021-03-11 lexa.knyazev@gmail.com Do not expose emulated ETC1 textures to WebGL
2021-03-11 lexa.knyazev@gmail.com Remove unused code from ValidateES2CopyTexImageParameters
2021-03-11 ianelliott@google.com Vulkan: Disable rotating damage rectangles on Android
2021-03-11 lubosz.sarnecki@collabora.com capture_replay_tests: Don't shadow subprocess import.
2021-03-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 023914a27b63 to a2fe8e1b2111 (1 revision)
2021-03-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 6691fcec0bce to a4e10bfde719 (24 revisions)
2021-03-11 lubosz.sarnecki@collabora.com frame_capture_utils: Do not serialize 0 bindings.
2021-03-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 075d29b4983b to 9e42f9e4abc6 (425 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 kjlubick@google.com on the revert to ensure that a human
is aware of the problem.

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/master/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: kjlubick@google.com
Test: Test: Black Desert MobileTest: Test: Extreme Car Driving SimulatorTest: Test: Genshin Impact MECTest: Test: Grand Theft Auto: San AndreasTest: Test: angle_perftests --gtest_filter="*lineage_m*"Test: Test: angle_perftests --gtest_filter="*plants_vs_zombies_2*"
Change-Id: Icc177809050bdb27b9de3ce6887cd8f0372bd90b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383978
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-03-12 04:55:05 +00:00
skia-autoroll
e9b6e2f2a9 Roll SwiftShader from a2fe8e1b2111 to 3c4fd15fb075 (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/a2fe8e1b2111..3c4fd15fb075

2021-03-11 capn@google.com Implement timestamp query support
2021-03-11 srisser@google.com Expose Vulkan 1.2 support

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

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/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: kjlubick@google.com
Change-Id: I5a7e35eee00f70a4af61fa9b3d4a8b0faff09eb5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384016
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-03-12 04:53:25 +00:00
Chris Dalton
4bf1ca5fa9 Revert "Remove GrAAType from GrFillRRectOp"
This reverts commit 43e73df990.

Reason for revert: Changed msaa behavior for non-aa

Original change's description:
> Remove GrAAType from GrFillRRectOp
>
> Replaces it with GrAA. This op always uses analytic coverage,
> regardless of MSAA state.
>
> Bug: skia:11396
> Change-Id: I75174a00bdb3b1f62319de5970aac7f1bbae8e10
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383418
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

TBR=robertphillips@google.com,csmartdalton@google.com

Change-Id: I780e46b58a2af1512d17e9db0b53d205f6df51d4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11396
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383857
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-03-11 22:38:33 +00:00