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

[Impeller] Implement a MockGLES, that provides trampolines for ProcGLESTable #46433

Merged
merged 10 commits into from
Oct 3, 2023

Conversation

matanlurey
Copy link
Contributor

Unblocks testing flutter/flutter#135715. See README.md for details.

I made one non-testing change to the proc_table itself, which is if a function call will fail, we will print out what is about to fail in the validation log. It was useful when debugging the test creation itself, and it's only enabled when GL call checks are enabled anyway.

@gaaclarke I originally implemented it with FML_THREAD_LOCAL, but figured doing a global lock essentially was the same thing, and would prevent parallel test runs from stepping on each-other in weird ways?

/cc @chinmaygarde for visibility.

@matanlurey matanlurey self-assigned this Sep 30, 2023
@matanlurey matanlurey changed the title Implement a MockGLES, that provides trampolines for ProcGLESTable [Impeller] Implement a MockGLES, that provides trampolines for ProcGLESTable Sep 30, 2023
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.

Code lgtm, docs lgtm, I just have some notes.

Copy link
Contributor Author

@matanlurey matanlurey left a comment

Choose a reason for hiding this comment

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

Thanks for the review!

@matanlurey matanlurey requested a review from gaaclarke October 3, 2023 17:23
@matanlurey
Copy link
Contributor Author

Changed made. I'd like one more look from @gaaclarke and @jonahwilliams before submitting. Thanks!

matanlurey added a commit that referenced this pull request Oct 3, 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=/
```
Copy link
Contributor

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

LGTM

@matanlurey matanlurey merged commit 0141ba2 into flutter:main Oct 3, 2023
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 skia-flutter-autoroll@skia.org Roll Skia from c66c89c56549 to 4cc56b6b3453 (1 revision) (flutter/engine#46525)
2023-10-03 matanlurey@users.noreply.github.com [Impeller] Implement a `MockGLES`, that provides trampolines for `ProcGLESTable` (flutter/engine#46433)
2023-10-03 matanlurey@users.noreply.github.com [Impeller] Invoke `glDebugMessageControl` before `glPushDebugGroup` (flutter/engine#46392)
2023-10-03 skia-flutter-autoroll@skia.org 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 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
Mairramer pushed a commit to Mairramer/flutter that referenced this pull request Oct 10, 2023
…lutter#135938)

flutter/engine@8ab7c88...eef2449

2023-10-03 skia-flutter-autoroll@skia.org Roll Skia from c66c89c56549 to 4cc56b6b3453 (1 revision) (flutter/engine#46525)
2023-10-03 matanlurey@users.noreply.github.com [Impeller] Implement a `MockGLES`, that provides trampolines for `ProcGLESTable` (flutter/engine#46433)
2023-10-03 matanlurey@users.noreply.github.com [Impeller] Invoke `glDebugMessageControl` before `glPushDebugGroup` (flutter/engine#46392)
2023-10-03 skia-flutter-autoroll@skia.org 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 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
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=/
```
harryterkelsen pushed a commit that referenced this pull request Oct 23, 2023
…cGLESTable` (#46433)

Unblocks testing flutter/flutter#135715. See
`README.md` for details.

I made one non-testing change to the proc_table itself, which is if a
function call will fail, we will print out what is about to fail in the
validation log. It was useful when debugging the test creation itself,
and it's only enabled when GL call checks are enabled anyway.

@gaaclarke I originally implemented it with `FML_THREAD_LOCAL`, but
figured doing a global lock essentially was the same thing, and would
prevent parallel test runs from stepping on each-other in weird ways?

/cc @chinmaygarde for visibility.
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.

3 participants