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] Intel iOS Simulators must block on GPU completion. #53073

Merged
merged 3 commits into from
Jun 4, 2024

Conversation

jonahwilliams
Copy link
Member

@jonahwilliams jonahwilliams commented May 28, 2024

See also: flutter/flutter#148660

Intel iOS simulators do not seem to enforce any backpressure on drawable acquisition. Fix this via blocking on completion in the surface_mtl.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Copy link
Member

@chinmaygarde chinmaygarde left a comment

Choose a reason for hiding this comment

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

We should also perhaps set -[CAMetalLayer setAllowsNextDrwabaleTimeout:NO]. There appears to be a one second timeout today which may be being tripped?

@jonahwilliams
Copy link
Member Author

The behavior that Jason observed was that on the Intel simulators we would always get the drawable immediately when asked, even if we had previously queued up dozens of frames.

@zanderso
Copy link
Member

From PR review triage: This fix is waiting on verification on an intel mac.

@jason-simmons
Copy link
Member

With this patch I'm still seeing flickering when running the CircularProgressIndicator app from flutter/flutter#148660 on the Intel Mac Mini iOS simulator

@jonahwilliams
Copy link
Member Author

@jason-simmons what if we change the waitUntilScheduled to waitUntilCompleted ?

@jason-simmons
Copy link
Member

The animation runs smoothly on the simulator when using waitUntilCompleted.

waitUntilCompleted consistently blocks for at least 1/60th of a second.

@jonahwilliams
Copy link
Member Author

Ok sounds like that is our best option. I can update this code to ifdef for intel sims

@jonahwilliams jonahwilliams changed the title [Impeller] try to limit iOS surface from running ahead too far. [Impeller] Intel iOS Simulators must block on GPU completion. Jun 4, 2024
@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 4, 2024
@auto-submit auto-submit bot merged commit dddabdd into flutter:main Jun 4, 2024
28 checks passed
@jonahwilliams jonahwilliams deleted the semaphore_ios branch June 5, 2024 00:17
jonahwilliams added a commit to jonahwilliams/engine that referenced this pull request Jun 5, 2024
…r#53073)

See also: flutter/flutter#148660

Intel iOS simulators do not seem to enforce any backpressure on drawable acquisition. Fix this via blocking on completion in the surface_mtl.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 5, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 5, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 5, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 5, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 5, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 5, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 5, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 5, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 5, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jun 5, 2024
…149770)

flutter/engine@11a32d4...f377330

2024-06-05 skia-flutter-autoroll@skia.org Roll Skia from 37755d48cca3 to 8448abc95867 (7 revisions) (flutter/engine#53230)
2024-06-05 skia-flutter-autoroll@skia.org Roll Dart SDK from dac7c04c7342 to f838a9a8d45f (3 revisions) (flutter/engine#53225)
2024-06-05 skia-flutter-autoroll@skia.org Roll Skia from 337c3c4d1f1b to 37755d48cca3 (45 revisions) (flutter/engine#53224)
2024-06-05 yjbanov@google.com [web] enable always_specify_types for web_ui (flutter/engine#53226)
2024-06-05 matanlurey@users.noreply.github.com Re-land #52859: Revamp the engine style guide, remove `always_specify_types` (flutter/engine#53223)
2024-06-05 skia-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from pagJoGS4kQ8Efa_if... to 2xWubo2mRP_2_wXKJ... (flutter/engine#53222)
2024-06-05 fmil@google.com [icu] Manual roll of icu (flutter/engine#53199)
2024-06-05 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[ios][platform_view] Use CAShapeLayer as the mask to avoid software rendering  (#53072)" (flutter/engine#53220)
2024-06-05 41930132+hellohuanlin@users.noreply.github.com [ios][platform_view] Use CAShapeLayer as the mask to avoid software rendering  (flutter/engine#53072)
2024-06-05 skia-flutter-autoroll@skia.org Roll Dart SDK from 343c20614708 to dac7c04c7342 (1 revision) (flutter/engine#53209)
2024-06-04 jonahwilliams@google.com [Impeller] Intel iOS Simulators must block on GPU completion. (flutter/engine#53073)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from pagJoGS4kQ8E to 2xWubo2mRP_2

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 matanl@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://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
auto-submit bot pushed a commit that referenced this pull request Jul 1, 2024
…3073) (#53205)

See also: flutter/flutter#148660

Intel iOS simulators do not seem to enforce any backpressure on drawable acquisition. Fix this via blocking on completion in the surface_mtl.
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
None yet
Development

Successfully merging this pull request may close these issues.

4 participants