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] fix some OpenGL Linux desktop issues. #43727

Merged
merged 2 commits into from
Jul 15, 2023

Conversation

jonahwilliams
Copy link
Member

Fixes flutter/flutter#130514

The context wasn't current so we couldn't get the GL version.

The extension lookup was throwing an invalid enum error, the desktop opengl docs say to use a different method.

@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 Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on 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.

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 15, 2023
@auto-submit auto-submit bot merged commit 2408de6 into flutter:main Jul 15, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 17, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jul 17, 2023
…130716)

flutter/engine@6830877...e4cae43

2023-07-16 skia-flutter-autoroll@skia.org Roll Fuchsia Mac SDK from 4pmlR2uz3SrLRNNSG... to VYjne_BEm9inQ5fnq... (flutter/engine#43732)
2023-07-16 skia-flutter-autoroll@skia.org Roll Dart SDK from d34f04f4a152 to 827259dfffb9 (1 revision) (flutter/engine#43731)
2023-07-16 skia-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from rmzZN2ZAgpbjAFi5_... to Buo0mx6dVLK5kvgQ3... (flutter/engine#43730)
2023-07-16 chinmaygarde@google.com [Impeller] Fix pipeline stats traced to the timeline. (flutter/engine#43729)
2023-07-15 jonahwilliams@google.com [Impeller] fix some OpenGL Linux desktop issues. (flutter/engine#43727)
2023-07-15 skia-flutter-autoroll@skia.org Roll Skia from 0768501cd267 to ee4369879cc0 (1 revision) (flutter/engine#43728)
2023-07-15 skia-flutter-autoroll@skia.org Roll Skia from 6fb535aede4e to 0768501cd267 (3 revisions) (flutter/engine#43726)
2023-07-15 skia-flutter-autoroll@skia.org Roll Dart SDK from 0bd185c282d2 to d34f04f4a152 (1 revision) (flutter/engine#43724)
2023-07-15 skia-flutter-autoroll@skia.org Roll Fuchsia Mac SDK from oeYLDNShuD-FTgGwU... to 4pmlR2uz3SrLRNNSG... (flutter/engine#43723)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from rmzZN2ZAgpbj to Buo0mx6dVLK5
  fuchsia/sdk/core/mac-amd64 from oeYLDNShuD-F to VYjne_BEm9in

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 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
bdero added a commit that referenced this pull request Jul 18, 2023
Follow-up fix for #43727.

Fixes the GL playground on MacOS.
harryterkelsen pushed a commit to harryterkelsen/engine that referenced this pull request Jul 20, 2023
Fixes flutter/flutter#130514

The context wasn't current so we couldn't get the GL version.

The extension lookup was throwing an invalid enum error, the desktop opengl docs say to use a different method.
harryterkelsen pushed a commit to harryterkelsen/engine that referenced this pull request Jul 20, 2023
@ardera
Copy link
Contributor

ardera commented Jul 21, 2023

Does this really work? This will call gl_context_make_current on the platform thread, AFAICT without calling gl_context_clear_current after, and the raster thread will also attempt to call gl_context_make_current.

I also came across this issue (that FlutterEngineRunInitialized needs a GL context) and I had to use a different context because the raster thread was also calling gl_context_make_current. (While FlutterEngineRunInitialized was still running on the platform thread) See ardera/flutter-pi@369a818

I haven't tested yet with flutter-pi, so idk maybe it works fine. But if it doesn't work with flutter-pi, I'm wondering why it works with the desktop embedder.

@jonahwilliams
Copy link
Member Author

I mean maybe, but it really is just based off of a mirror of what we do on the Skia embedder: GPUSurfaceGLSkia

But in general the impeller backend doesn't work yet on desktop OpenGL.

@ardera
Copy link
Contributor

ardera commented Jul 21, 2023

Okay I'll try, maybe it works differently than I expected

With the fixes flutter-pi actually ran with impeller, though it wasn't that smooth and it crashed after 1-2 minutes

@jonahwilliams
Copy link
Member Author

jonahwilliams commented Jul 21, 2023

The OpenGL backend hasn't really seen a lot of focus, so I'd definitely expect poor performance. Through crashing shouldn't happen in general. If you find particular crashes or scenes that are unusually slow please file issues on them.

LouiseHsu pushed a commit to LouiseHsu/flutter that referenced this pull request Jul 31, 2023
…lutter#130716)

flutter/engine@6830877...e4cae43

2023-07-16 skia-flutter-autoroll@skia.org Roll Fuchsia Mac SDK from 4pmlR2uz3SrLRNNSG... to VYjne_BEm9inQ5fnq... (flutter/engine#43732)
2023-07-16 skia-flutter-autoroll@skia.org Roll Dart SDK from d34f04f4a152 to 827259dfffb9 (1 revision) (flutter/engine#43731)
2023-07-16 skia-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from rmzZN2ZAgpbjAFi5_... to Buo0mx6dVLK5kvgQ3... (flutter/engine#43730)
2023-07-16 chinmaygarde@google.com [Impeller] Fix pipeline stats traced to the timeline. (flutter/engine#43729)
2023-07-15 jonahwilliams@google.com [Impeller] fix some OpenGL Linux desktop issues. (flutter/engine#43727)
2023-07-15 skia-flutter-autoroll@skia.org Roll Skia from 0768501cd267 to ee4369879cc0 (1 revision) (flutter/engine#43728)
2023-07-15 skia-flutter-autoroll@skia.org Roll Skia from 6fb535aede4e to 0768501cd267 (3 revisions) (flutter/engine#43726)
2023-07-15 skia-flutter-autoroll@skia.org Roll Dart SDK from 0bd185c282d2 to d34f04f4a152 (1 revision) (flutter/engine#43724)
2023-07-15 skia-flutter-autoroll@skia.org Roll Fuchsia Mac SDK from oeYLDNShuD-FTgGwU... to 4pmlR2uz3SrLRNNSG... (flutter/engine#43723)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from rmzZN2ZAgpbj to Buo0mx6dVLK5
  fuchsia/sdk/core/mac-amd64 from oeYLDNShuD-F to VYjne_BEm9in

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 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
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.

[Impeller] GDK_IS_WINDOW assertion failure on startup / Linux Desktop.
3 participants