Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[Impeller] Remove additional shader bootstrap. #52368

Merged
merged 5 commits into from
Apr 24, 2024

Conversation

jonahwilliams
Copy link
Member

Because these shaders must first acquire the prototype shader, it causes ContentContext creation to block. We can re-explore dealing with PSO generation in a different manner that isn't on the startup fast path.

flutter/flutter#143540

Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

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

We looked at this the other day and I thought we saw that this change had a positive effect on our benchmarks?

It was suspect to me because of the immediate synchronization but I could see how it could result in more deterministic results. I think it's a good idea, but maybe we should just schedule this work to happen on the worker pool instead of happening on the raster thread.

Comment on lines -590 to -583
// Initialize commonly used shaders that aren't defaults. These settings were
// chosen based on the knowledge that we mix and match triangle and
// triangle-strip geometry, and also have fairly agressive srcOver to src
// blend mode conversions.
Copy link
Member

Choose a reason for hiding this comment

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

There is a comment above that references this if I remember correctly, we should remove that too.

Copy link
Member Author

Choose a reason for hiding this comment

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

removed

Copy link
Member

Choose a reason for hiding this comment

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

I think you forgot to push it. It's this one:

  // These pipelines are created first since they are immediately used by
  // InitializeCommonlyUsedShadersIfNeeded. Their order matches the order in
  // InitializeCommonlyUsedShadersIfNeeded.

Copy link
Member Author

Choose a reason for hiding this comment

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

oh that one!

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@jonahwilliams
Copy link
Member Author

It does have a positive impact on the first frame benchmarks but its likely increasing the paint on the current set of startup benchmarks we're hitting in g3.

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 24, 2024
@auto-submit auto-submit bot merged commit c617409 into flutter:main Apr 24, 2024
29 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 25, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Apr 25, 2024
…147348)

flutter/engine@b30c0a7...f48f3b6

2024-04-24 [email protected] [Impeller] only use porter duff or vertices.uber for drawVertices. (flutter/engine#52345)
2024-04-24 [email protected] Roll Fuchsia Linux SDK from le_-uFgRD5DjvvqgL... to PJBX8xxRnd5vCFnQM... (flutter/engine#52376)
2024-04-24 [email protected] [Impeller] Remove additional shader bootstrap. (flutter/engine#52368)
2024-04-24 [email protected] Remove TODO I will never do: `runIfNot` is deprecated. (flutter/engine#52308)
2024-04-24 [email protected] Roll Dart SDK from 38c43a01a51e to 9a0f141e9a67 (1 revision) (flutter/engine#52373)
2024-04-24 [email protected] [Impeller] Cleanup legacy StencilModes and document overdraw prevention. (flutter/engine#52372)
2024-04-24 [email protected] Roll Skia from afcc1db27593 to 864f6d868ec0 (1 revision) (flutter/engine#52371)
2024-04-24 [email protected] Move zlib to //flutter/third_party (flutter/engine#52366)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from le_-uFgRD5Dj to PJBX8xxRnd5v

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 [email protected],[email protected],[email protected] 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://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App e: impeller
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants