Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Impeller] Joined obligatory vulkan swapchain submits #42865

Merged
merged 1 commit into from
Jun 15, 2023

Conversation

gaaclarke
Copy link
Member

@gaaclarke gaaclarke commented Jun 15, 2023

Every frame we submit to the queue a layout transition and a notify to the acquire fence. This joins those together into one vkQueueSubmit call. Thus eliminating a fence that was happening after the layout transition.

issue flutter/flutter#128838

testing results from the gallery driver test

Before:
  "average_frame_build_time_millis": 1.379130952380952,
  "90th_percentile_frame_build_time_millis": 1.965,
  "99th_percentile_frame_build_time_millis": 20.246,
  "worst_frame_build_time_millis": 29.578,
  "missed_frame_build_budget_count": 7,
  "average_frame_rasterizer_time_millis": 20.447408955223867,
  "90th_percentile_frame_rasterizer_time_millis": 25.398,
  "99th_percentile_frame_rasterizer_time_millis": 160.198,
  "worst_frame_rasterizer_time_millis": 178.042,
  "missed_frame_rasterizer_budget_count": 122,
  "frame_count": 336,
  "frame_rasterizer_count": 335,
  "new_gen_gc_count": 0,
  "old_gen_gc_count": 0,
  "frame_build_times": [
after:
  "average_frame_build_time_millis": 1.1907232876712324,
  "90th_percentile_frame_build_time_millis": 1.926,
  "99th_percentile_frame_build_time_millis": 16.666,
  "worst_frame_build_time_millis": 27.39,
  "missed_frame_build_budget_count": 5,
  "average_frame_rasterizer_time_millis": 15.525100817438704,
  "90th_percentile_frame_rasterizer_time_millis": 20.116,
  "99th_percentile_frame_rasterizer_time_millis": 33.835,
  "worst_frame_rasterizer_time_millis": 56.075,
  "missed_frame_rasterizer_budget_count": 156,
  "frame_count": 365,
  "frame_rasterizer_count": 367,
  "new_gen_gc_count": 0,
  "old_gen_gc_count": 0,

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@gaaclarke gaaclarke marked this pull request as ready for review June 15, 2023 19:44
Copy link
Member

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RSLGTM

@gaaclarke gaaclarke added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 15, 2023
@auto-submit auto-submit bot merged commit d4717bd into flutter:main Jun 15, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 15, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 15, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 15, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 16, 2023
gaaclarke pushed a commit to flutter/flutter that referenced this pull request Jun 16, 2023
…129029)

flutter/engine@fb5fed4...aefe104

2023-06-16 30870216+gaaclarke@users.noreply.github.com Revert "Add
deprecations to PlatformMessage stuff" (flutter/engine#42921)
2023-06-16 jakemac@google.com add dart_internal override where necessary
(flutter/engine#42920)
2023-06-16 skia-flutter-autoroll@skia.org Roll Skia from d43262e90f25 to
a4ad5b369313 (3 revisions) (flutter/engine#42919)
2023-06-16 skia-flutter-autoroll@skia.org Roll Skia from 9ab04a53b7be to
d43262e90f25 (5 revisions) (flutter/engine#42918)
2023-06-16 mdebbar@google.com [web] Move webOnlyAssetManager to
`dart:ui_web` (flutter/engine#42642)
2023-06-16 skia-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from
E5G7PwYbRA-u-ZJ9F... to -NW1eatBbmjvLaIcV... (flutter/engine#42915)
2023-06-16 skia-flutter-autoroll@skia.org Roll Fuchsia Mac SDK from
FJPPnZP9EcGLQ0OZa... to fXVcR5tdj5wSd_OUz... (flutter/engine#42912)
2023-06-16 skia-flutter-autoroll@skia.org Roll Skia from c29ecbe7fba7 to
9ab04a53b7be (1 revision) (flutter/engine#42910)
2023-06-16 skia-flutter-autoroll@skia.org Roll Skia from 504a26e85fc6 to
c29ecbe7fba7 (1 revision) (flutter/engine#42909)
2023-06-16 skia-flutter-autoroll@skia.org Roll Skia from f0410a265d2b to
504a26e85fc6 (1 revision) (flutter/engine#42907)
2023-06-16 godofredoc@google.com Set xcode explicitly on mac builds with
release_build. (flutter/engine#42898)
2023-06-16 scheglov@google.com Fix prefer_final_in_for_each
(flutter/engine#42899)
2023-06-16 skia-flutter-autoroll@skia.org Roll Skia from abfa3505db23 to
f0410a265d2b (1 revision) (flutter/engine#42904)
2023-06-16 godofredoc@google.com Remove release_build from clang_tidy
build. (flutter/engine#42900)
2023-06-16 skia-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from
53EjCyuRu91oFTBf2... to E5G7PwYbRA-u-ZJ9F... (flutter/engine#42897)
2023-06-15 chillers@google.com Revert "Roll Clang from 6d667d4b261e to
7f374b6902fa" (flutter/engine#42896)
2023-06-15 skia-flutter-autoroll@skia.org Roll Skia from 2ab2678058a3 to
abfa3505db23 (1 revision) (flutter/engine#42894)
2023-06-15 skia-flutter-autoroll@skia.org Roll Fuchsia Mac SDK from
P7QA6bfO_Ij5dre7B... to FJPPnZP9EcGLQ0OZa... (flutter/engine#42892)
2023-06-15 skia-flutter-autoroll@skia.org Roll Skia from 794b6f9240a8 to
2ab2678058a3 (6 revisions) (flutter/engine#42889)
2023-06-15 goderbauer@google.com Add deprecations to PlatformMessage
stuff (flutter/engine#42580)
2023-06-15 30870216+gaaclarke@users.noreply.github.com [Impeller] Joined
obligatory vulkan swapchain submits (flutter/engine#42865)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from 53EjCyuRu91o to -NW1eatBbmjv
  fuchsia/sdk/core/mac-amd64 from P7QA6bfO_Ij5 to fXVcR5tdj5wS

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

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

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
@gaaclarke
Copy link
Member Author

Here is the skiaperf for this PR:
https://flutter-flutter-perf.skia.org/e/?end=1687038803&keys=Xc266cefa78856177cd92ded480267478&selected=commit%3D35358%26name%3D%252Carch%253Dintel%252Cbranch%253Dmaster%252Cconfig%253Ddefault%252Cdevice_type%253DSM-G973U1%252Cdevice_version%253Dnone%252Chost_type%253Dlinux%252Csub_result%253Daverage_frame_rasterizer_time_millis%252Ctest%253Dnew_gallery_impeller__transition_perf%252C

It doesn't show any decrease in the average frame time. What I've learned is:

  1. That benchmark is noisy. Quite frequently it will spike from ~10ms to ~20ms for an average over ~350 samples. I suspect that was related to the decreased measured above
  2. My local tests above were doing performance benchmarks with validation layers turned on, so that may have played a roll in the reduction in time too, but is inconsequential for end users

I ran the tests again 3 times locally:

before

"average_frame_build_time_millis": 1.6772485875706202,
  "90th_percentile_frame_build_time_millis": 3.643,
  "99th_percentile_frame_build_time_millis": 17.397,
  "worst_frame_build_time_millis": 31.351,
  "missed_frame_build_budget_count": 8,
  "average_frame_rasterizer_time_millis": 9.822338983050852,
  "90th_percentile_frame_rasterizer_time_millis": 12.731,
  "99th_percentile_frame_rasterizer_time_millis": 98.295,
  "worst_frame_rasterizer_time_millis": 109.299,
  "missed_frame_rasterizer_budget_count": 30,
  "frame_count": 354,
  "frame_rasterizer_count": 354,
  "new_gen_gc_count": 0,
  "old_gen_gc_count": 0,
  "frame_build_times": [

  "average_frame_build_time_millis": 1.7559494382022474,
  "90th_percentile_frame_build_time_millis": 3.62,
  "99th_percentile_frame_build_time_millis": 18.916,
  "worst_frame_build_time_millis": 33.934,
  "missed_frame_build_budget_count": 6,
  "average_frame_rasterizer_time_millis": 9.293120448179277,
  "90th_percentile_frame_rasterizer_time_millis": 12.798,
  "99th_percentile_frame_rasterizer_time_millis": 65.41,
  "worst_frame_rasterizer_time_millis": 119.423,
  "missed_frame_rasterizer_budget_count": 29,
  "frame_count": 356,
  "frame_rasterizer_count": 357,
  "new_gen_gc_count": 0,
  "old_gen_gc_count": 0,
  "frame_build_times": [

  "average_frame_build_time_millis": 1.704057534246574,
  "90th_percentile_frame_build_time_millis": 3.629,
  "99th_percentile_frame_build_time_millis": 18.656,
  "worst_frame_build_time_millis": 38.161,
  "missed_frame_build_budget_count": 6,
  "average_frame_rasterizer_time_millis": 8.447461748633874,
  "90th_percentile_frame_rasterizer_time_millis": 12.113,
  "99th_percentile_frame_rasterizer_time_millis": 30.952,
  "worst_frame_rasterizer_time_millis": 40.757,
  "missed_frame_rasterizer_budget_count": 23,
  "frame_count": 365,
  "frame_rasterizer_count": 366,
  "new_gen_gc_count": 0,
  "old_gen_gc_count": 0,
  "frame_build_times": [

after

  "average_frame_build_time_millis": 1.9809107692307677,
  "90th_percentile_frame_build_time_millis": 4.836,
  "99th_percentile_frame_build_time_millis": 17.616,
  "worst_frame_build_time_millis": 34.873,
  "missed_frame_build_budget_count": 5,
  "average_frame_rasterizer_time_millis": 20.8045582822086,
  "90th_percentile_frame_rasterizer_time_millis": 81.98,
  "99th_percentile_frame_rasterizer_time_millis": 112.914,
  "worst_frame_rasterizer_time_millis": 119.172,
  "missed_frame_rasterizer_budget_count": 83,
  "frame_count": 325,
  "frame_rasterizer_count": 326,
  "new_gen_gc_count": 0,
  "old_gen_gc_count": 0,
  "frame_build_times": [

  "average_frame_build_time_millis": 1.6553520000000002,
  "90th_percentile_frame_build_time_millis": 2.537,
  "99th_percentile_frame_build_time_millis": 20.072,
  "worst_frame_build_time_millis": 37.377,
  "missed_frame_build_budget_count": 6,
  "average_frame_rasterizer_time_millis": 8.136740641711222,
  "90th_percentile_frame_rasterizer_time_millis": 11.201,
  "99th_percentile_frame_rasterizer_time_millis": 29.918,
  "worst_frame_rasterizer_time_millis": 42.389,
  "missed_frame_rasterizer_budget_count": 17,
  "frame_count": 375,
  "frame_rasterizer_count": 374,
  "new_gen_gc_count": 0,
  "old_gen_gc_count": 0,
  "frame_build_times": [

  "average_frame_build_time_millis": 1.6299430894308966,
  "90th_percentile_frame_build_time_millis": 2.812,
  "99th_percentile_frame_build_time_millis": 17.016,
  "worst_frame_build_time_millis": 40.751,
  "missed_frame_build_budget_count": 6,
  "average_frame_rasterizer_time_millis": 8.856346883468834,
  "90th_percentile_frame_rasterizer_time_millis": 12.153,
  "99th_percentile_frame_rasterizer_time_millis": 34.18,
  "worst_frame_rasterizer_time_millis": 111.3,
  "missed_frame_rasterizer_budget_count": 27,
  "frame_count": 369,
  "frame_rasterizer_count": 369,
  "new_gen_gc_count": 0,
  "old_gen_gc_count": 0,
  "frame_build_times": [

Looking at the median results (8.85ms and 9.29ms) that's a 5% decrease. Given the wild variance in that test though it's hard to draw conclusions from it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App e: impeller
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants