Skip to content

Conversation

@loic-sharma
Copy link
Member

@loic-sharma loic-sharma commented Jun 9, 2025

This updates Flutter Windows to fall back to glBlitFramebufferANGLE if glBlitFramebuffer is not available. This makes Flutter Windows work on devices where ANGLE supports only GLES 2.0.

Fixes: #169178

Background

ANGLE only implements GLES 2.0 on some Windows 10+ machines (1, 2).

Flutter Windows 3.27.4 and lower was using glBlitFramebuffer on GLES 2.0 devices, even though that requires GLES 3.0. This magically worked though, thanks to ANGLE.

However in 3.29.0, Impeller was updated to not resolve GLES 3.0 procs on GLES 2.0: flutter/engine#56636. This caused Flutter Windows to crash on GLES 2.0 devices since it was calling glBlitFramebuffer.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added engine flutter/engine related. See also e: labels. platform-windows Building on or for Windows specifically a: desktop Running on desktop e: impeller Impeller rendering backend issues and features requests labels Jun 9, 2025

if (!description_->HasExtension("GL_ANGLE_framebuffer_blit")) {
BlitFramebufferANGLE.Reset();
}
Copy link
Member Author

@loic-sharma loic-sharma Jun 9, 2025

Choose a reason for hiding this comment

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

I considered only loading this proc if we detect ANGLE, however, the GL_VERSION for the affected devices are 2.0.0, which causes DescriptionGLES::IsANGLE to return false.

@loic-sharma loic-sharma marked this pull request as ready for review June 9, 2025 23:30
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

@loic-sharma loic-sharma added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 12, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Jun 13, 2025
Merged via the queue into flutter:master with commit 2e0b9f2 Jun 13, 2025
182 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 13, 2025
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Jun 16, 2025
flutter/flutter@f79452e...8303a96

2025-06-13 [email protected] infa: linux_android_emulator_tests to bringup (bad kvm config) (flutter/flutter#170607)
2025-06-13 [email protected] Roll Skia from 70455b7c74dd to 438ea4e05e15 (1 revision) (flutter/flutter#170570)
2025-06-13 [email protected] [web] Add Paint dithering. (flutter/flutter#170362)
2025-06-13 [email protected] Reland (#167738)  but with some flags updated to use enum  (flutter/flutter#170505)
2025-06-13 [email protected] Roll Dart SDK from ac589dba5282 to 1a6f6d7c6f2c (4 revisions) (flutter/flutter#170566)
2025-06-13 [email protected] Roll Skia from 22018eab8c1f to 70455b7c74dd (1 revision) (flutter/flutter#170564)
2025-06-13 [email protected] Roll Fuchsia Linux SDK from Dueykg3VpLT5D_jSG... to lVfYTWxB0rTTuW_k3... (flutter/flutter#170557)
2025-06-13 [email protected] [Windows] Use ANGLE blit extension on GLES 2.0 (flutter/flutter#170298)
2025-06-12 [email protected] chore: move experimental setup steps to composite action (flutter/flutter#170496)
2025-06-12 [email protected] [Impeller] fix mask filter application to Vertices. (flutter/flutter#170548)
2025-06-12 [email protected] Roll Skia from b41e7017658e to 22018eab8c1f (2 revisions) (flutter/flutter#170551)
2025-06-12 [email protected] Add CupertinoSheetRoute widget of the week video (flutter/flutter#170026)
2025-06-12 [email protected] Fix stray `--packages` argument from `workspace` refactor; add a test. (flutter/flutter#170449)
2025-06-12 [email protected] Roll pub packages (flutter/flutter#170522)
2025-06-12 [email protected] Navigator should call didpop when popping page based route (flutter/flutter#170376)
2025-06-12 [email protected] Relax RadioGroup semantics to allow non-radio children (flutter/flutter#170273)
2025-06-12 [email protected] [ Widget Preview ] Refactor the `flutter widget-preview` command (flutter/flutter#170467)
2025-06-12 [email protected] Pause UIScene migration (flutter/flutter#170490)
2025-06-12 [email protected] Roll Dart SDK from 9f741ef8a689 to ac589dba5282 (3 revisions) (flutter/flutter#170519)
2025-06-12 [email protected] Roll Packages from 0b322a2 to 6d3aaf4 (2 revisions) (flutter/flutter#170528)
2025-06-12 [email protected] Fix the path to `packages_autoroller`. (flutter/flutter#170538)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: 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
@loic-sharma loic-sharma added the cp: stable cherry pick this pull request to stable release candidate branch label Jun 20, 2025
flutteractionsbot pushed a commit to flutteractionsbot/flutter that referenced this pull request Jun 20, 2025
This updates Flutter Windows to fall back to
[`glBlitFramebufferANGLE`](https://github.com/google/angle/blob/main/extensions/ANGLE_framebuffer_blit.txt)
if `glBlitFramebuffer` is not available. This makes Flutter Windows work
on devices where ANGLE supports only GLES 2.0.

Fixes: flutter#169178

### Background

ANGLE only implements GLES 2.0 on some Windows 10+ machines
([1](flutter#169178 (comment)),
[2](flutter#169178 (comment))).

Flutter Windows 3.27.4 and lower was using `glBlitFramebuffer` on GLES
2.0 devices, even though that requires GLES 3.0. This magically worked
though, thanks to ANGLE.

However in 3.29.0, Impeller was updated to not resolve GLES 3.0 procs on
GLES 2.0: flutter/engine#56636. This caused
Flutter Windows to crash on GLES 2.0 devices since it was calling
`glBlitFramebuffer`.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
Ortes pushed a commit to Ortes/packages that referenced this pull request Jun 25, 2025
…r#9433)

flutter/flutter@f79452e...8303a96

2025-06-13 [email protected] infa: linux_android_emulator_tests to bringup (bad kvm config) (flutter/flutter#170607)
2025-06-13 [email protected] Roll Skia from 70455b7c74dd to 438ea4e05e15 (1 revision) (flutter/flutter#170570)
2025-06-13 [email protected] [web] Add Paint dithering. (flutter/flutter#170362)
2025-06-13 [email protected] Reland (#167738)  but with some flags updated to use enum  (flutter/flutter#170505)
2025-06-13 [email protected] Roll Dart SDK from ac589dba5282 to 1a6f6d7c6f2c (4 revisions) (flutter/flutter#170566)
2025-06-13 [email protected] Roll Skia from 22018eab8c1f to 70455b7c74dd (1 revision) (flutter/flutter#170564)
2025-06-13 [email protected] Roll Fuchsia Linux SDK from Dueykg3VpLT5D_jSG... to lVfYTWxB0rTTuW_k3... (flutter/flutter#170557)
2025-06-13 [email protected] [Windows] Use ANGLE blit extension on GLES 2.0 (flutter/flutter#170298)
2025-06-12 [email protected] chore: move experimental setup steps to composite action (flutter/flutter#170496)
2025-06-12 [email protected] [Impeller] fix mask filter application to Vertices. (flutter/flutter#170548)
2025-06-12 [email protected] Roll Skia from b41e7017658e to 22018eab8c1f (2 revisions) (flutter/flutter#170551)
2025-06-12 [email protected] Add CupertinoSheetRoute widget of the week video (flutter/flutter#170026)
2025-06-12 [email protected] Fix stray `--packages` argument from `workspace` refactor; add a test. (flutter/flutter#170449)
2025-06-12 [email protected] Roll pub packages (flutter/flutter#170522)
2025-06-12 [email protected] Navigator should call didpop when popping page based route (flutter/flutter#170376)
2025-06-12 [email protected] Relax RadioGroup semantics to allow non-radio children (flutter/flutter#170273)
2025-06-12 [email protected] [ Widget Preview ] Refactor the `flutter widget-preview` command (flutter/flutter#170467)
2025-06-12 [email protected] Pause UIScene migration (flutter/flutter#170490)
2025-06-12 [email protected] Roll Dart SDK from 9f741ef8a689 to ac589dba5282 (3 revisions) (flutter/flutter#170519)
2025-06-12 [email protected] Roll Packages from 0b322a2 to 6d3aaf4 (2 revisions) (flutter/flutter#170528)
2025-06-12 [email protected] Fix the path to `packages_autoroller`. (flutter/flutter#170538)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: 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
mboetger pushed a commit to mboetger/flutter that referenced this pull request Jul 21, 2025
This updates Flutter Windows to fall back to
[`glBlitFramebufferANGLE`](https://github.com/google/angle/blob/main/extensions/ANGLE_framebuffer_blit.txt)
if `glBlitFramebuffer` is not available. This makes Flutter Windows work
on devices where ANGLE supports only GLES 2.0.

Fixes: flutter#169178

### Background

ANGLE only implements GLES 2.0 on some Windows 10+ machines
([1](flutter#169178 (comment)),
[2](flutter#169178 (comment))).

Flutter Windows 3.27.4 and lower was using `glBlitFramebuffer` on GLES
2.0 devices, even though that requires GLES 3.0. This magically worked
though, thanks to ANGLE.

However in 3.29.0, Impeller was updated to not resolve GLES 3.0 procs on
GLES 2.0: flutter/engine#56636. This caused
Flutter Windows to crash on GLES 2.0 devices since it was calling
`glBlitFramebuffer`.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
vashworth pushed a commit to vashworth/packages that referenced this pull request Jul 30, 2025
…r#9433)

flutter/flutter@f79452e...8303a96

2025-06-13 [email protected] infa: linux_android_emulator_tests to bringup (bad kvm config) (flutter/flutter#170607)
2025-06-13 [email protected] Roll Skia from 70455b7c74dd to 438ea4e05e15 (1 revision) (flutter/flutter#170570)
2025-06-13 [email protected] [web] Add Paint dithering. (flutter/flutter#170362)
2025-06-13 [email protected] Reland (#167738)  but with some flags updated to use enum  (flutter/flutter#170505)
2025-06-13 [email protected] Roll Dart SDK from ac589dba5282 to 1a6f6d7c6f2c (4 revisions) (flutter/flutter#170566)
2025-06-13 [email protected] Roll Skia from 22018eab8c1f to 70455b7c74dd (1 revision) (flutter/flutter#170564)
2025-06-13 [email protected] Roll Fuchsia Linux SDK from Dueykg3VpLT5D_jSG... to lVfYTWxB0rTTuW_k3... (flutter/flutter#170557)
2025-06-13 [email protected] [Windows] Use ANGLE blit extension on GLES 2.0 (flutter/flutter#170298)
2025-06-12 [email protected] chore: move experimental setup steps to composite action (flutter/flutter#170496)
2025-06-12 [email protected] [Impeller] fix mask filter application to Vertices. (flutter/flutter#170548)
2025-06-12 [email protected] Roll Skia from b41e7017658e to 22018eab8c1f (2 revisions) (flutter/flutter#170551)
2025-06-12 [email protected] Add CupertinoSheetRoute widget of the week video (flutter/flutter#170026)
2025-06-12 [email protected] Fix stray `--packages` argument from `workspace` refactor; add a test. (flutter/flutter#170449)
2025-06-12 [email protected] Roll pub packages (flutter/flutter#170522)
2025-06-12 [email protected] Navigator should call didpop when popping page based route (flutter/flutter#170376)
2025-06-12 [email protected] Relax RadioGroup semantics to allow non-radio children (flutter/flutter#170273)
2025-06-12 [email protected] [ Widget Preview ] Refactor the `flutter widget-preview` command (flutter/flutter#170467)
2025-06-12 [email protected] Pause UIScene migration (flutter/flutter#170490)
2025-06-12 [email protected] Roll Dart SDK from 9f741ef8a689 to ac589dba5282 (3 revisions) (flutter/flutter#170519)
2025-06-12 [email protected] Roll Packages from 0b322a2 to 6d3aaf4 (2 revisions) (flutter/flutter#170528)
2025-06-12 [email protected] Fix the path to `packages_autoroller`. (flutter/flutter#170538)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: 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
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: desktop Running on desktop cp: stable cherry pick this pull request to stable release candidate branch e: impeller Impeller rendering backend issues and features requests engine flutter/engine related. See also e: labels. platform-windows Building on or for Windows specifically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows Flutter apps crash silently on some machines after 3.27.4

2 participants