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

Conversation

@matanlurey
Copy link
Contributor

@matanlurey matanlurey commented Sep 29, 2023

Closes flutter/flutter#135715.

I plan to add tests before submitting once #46433 lands, probably something around glDebugMessageControl being emitted once per context, since that's what we need to keep working for Pixel phones.

Output

Screenshot of app running locally, showing lack of off-screen MSAA

flutter_01

$ fl run --enable-impeller --local-engine=$ENGINE/out/android_debug_unopt_arm64 --local-engine-host=$ENGINE/out/host_debug_unopt_arm64

Launching lib/main.dart on Pixel 5 in debug mode...
Running Gradle task 'assembleDebug'...                             33.7s
✓  Built build/app/outputs/flutter-apk/app-debug.apk.
Installing build/app/outputs/flutter-apk/app-debug.apk...          17.8s
E/flutter (17749): [ERROR:flutter/shell/platform/android/android_context_gl_impeller.cc(80)] Using the Impeller rendering backend (OpenGLES).
Syncing files to device Pixel 5...                                  70ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

A Dart VM Service on Pixel 5 is available at: http://127.0.0.1:57181/CrsakIgCHFY=/
I/cle_opacity_foo(17749): Compiler allocated 4413KB to compile void android.view.ViewRootImpl.performTraversals()
The Flutter DevTools debugger and profiler on Pixel 5 is available at:
http://127.0.0.1:9101?uri=http://127.0.0.1:57181/CrsakIgCHFY=/

@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 or stuartmorgan on 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.

@matanlurey matanlurey changed the title Invoke glDebugMessageControl before glPushDebugGroup [Impeller] Invoke glDebugMessageControl before glPushDebugGroup Sep 29, 2023
bool ReactorGLES::FlushOps() {
TRACE_EVENT0("impeller", __FUNCTION__);

#ifdef IMPELLER_DEBUG
Copy link
Member

Choose a reason for hiding this comment

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

How about setting the proc tables entries to be no-ops in case IMPELLER_DEBUG is set? Prevents having to litter the code with ifdef IMPELLER_DEBUG.

Copy link
Member

Choose a reason for hiding this comment

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

We do this for extensions in the proc table. For instance, get the proc but reset it if the extension is absent. You can do the same for debug extensions, discard ifndef IMPELLER_DEBUG.

#include "flutter/fml/trace_event.h"
#include "impeller/base/config.h"
#include "impeller/base/validation.h"
#include "fml/closure.h"
Copy link
Member

Choose a reason for hiding this comment

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

The fml bits use flutter/fml. See the include right above.

@matanlurey matanlurey merged commit d29369f into flutter:main Oct 3, 2023
@matanlurey matanlurey deleted the impeller-openGLES-debugGroupKHR-crashFix branch October 3, 2023 22:14
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 3, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Oct 4, 2023
…135938)

flutter/engine@8ab7c88...eef2449

2023-10-03 [email protected] Roll Skia from c66c89c56549 to 4cc56b6b3453 (1 revision) (flutter/engine#46525)
2023-10-03 [email protected] [Impeller] Implement a `MockGLES`, that provides trampolines for `ProcGLESTable` (flutter/engine#46433)
2023-10-03 [email protected] [Impeller] Invoke `glDebugMessageControl` before `glPushDebugGroup` (flutter/engine#46392)
2023-10-03 [email protected] Roll Dart SDK from 318c46832196 to 817f77ceba40 (1 revision) (flutter/engine#46520)

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://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
Mairramer pushed a commit to Mairramer/flutter that referenced this pull request Oct 10, 2023
…lutter#135938)

flutter/engine@8ab7c88...eef2449

2023-10-03 [email protected] Roll Skia from c66c89c56549 to 4cc56b6b3453 (1 revision) (flutter/engine#46525)
2023-10-03 [email protected] [Impeller] Implement a `MockGLES`, that provides trampolines for `ProcGLESTable` (flutter/engine#46433)
2023-10-03 [email protected] [Impeller] Invoke `glDebugMessageControl` before `glPushDebugGroup` (flutter/engine#46392)
2023-10-03 [email protected] Roll Dart SDK from 318c46832196 to 817f77ceba40 (1 revision) (flutter/engine#46520)

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://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
harryterkelsen pushed a commit that referenced this pull request Oct 23, 2023
…46392)

Closes flutter/flutter#135715.

I plan to add tests before submitting once
#46433 lands, probably something
around `glDebugMessageControl` being emitted once per context, since
that's what we need to keep working for Pixel phones.

## Output

<details>

<summary>Screenshot of app running locally, showing lack of off-screen
MSAA</summary>


![flutter_01](https://github.com/flutter/engine/assets/168174/23642582-ce4c-47dc-8edf-7e6cfd12a074)

</details>

```shell
$ fl run --enable-impeller --local-engine=$ENGINE/out/android_debug_unopt_arm64 --local-engine-host=$ENGINE/out/host_debug_unopt_arm64

Launching lib/main.dart on Pixel 5 in debug mode...
Running Gradle task 'assembleDebug'...                             33.7s
✓  Built build/app/outputs/flutter-apk/app-debug.apk.
Installing build/app/outputs/flutter-apk/app-debug.apk...          17.8s
E/flutter (17749): [ERROR:flutter/shell/platform/android/android_context_gl_impeller.cc(80)] Using the Impeller rendering backend (OpenGLES).
Syncing files to device Pixel 5...                                  70ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

A Dart VM Service on Pixel 5 is available at: http://127.0.0.1:57181/CrsakIgCHFY=/
I/cle_opacity_foo(17749): Compiler allocated 4413KB to compile void android.view.ViewRootImpl.performTraversals()
The Flutter DevTools debugger and profiler on Pixel 5 is available at:
http://127.0.0.1:9101?uri=http://127.0.0.1:57181/CrsakIgCHFY=/
```
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

[Impeller] OpenGLES proc table crashes when unopt

4 participants