Skip to content

Conversation

@bdero
Copy link
Member

@bdero bdero commented Jul 22, 2025

Continuation of #165630.

Resolves #164278.
Resolves bdero/flutter_scene#35.
Partly fixes: #160948.

@github-actions github-actions bot added engine flutter/engine related. See also e: labels. e: impeller Impeller rendering backend issues and features requests labels Jul 22, 2025
@github-project-automation github-project-automation bot moved this to 🤔 Needs Triage in Flutter GPU Jul 22, 2025
@bdero bdero moved this from 🤔 Needs Triage to ⚙️ In Progress in Flutter GPU Jul 22, 2025
@bdero bdero requested a review from chinmaygarde July 22, 2025 23:40
break;
case PixelFormat::kR32G32B32A32Float:
internal_format = GL_RGBA;
internal_format = GL_RGBA32F;
Copy link
Member

Choose a reason for hiding this comment

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

Does some form of capability checking already exist for these?

Fixing the enum values here sgtm though.

Copy link
Member Author

Choose a reason for hiding this comment

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

Err, doesn't look like it. I suppose it's GLES 3+ only.

TextureDescriptor desc);

TextureGLES(std::shared_ptr<ReactorGLES> reactor, TextureDescriptor desc);
TextureGLES(std::shared_ptr<ReactorGLES> reactor,
Copy link
Member

Choose a reason for hiding this comment

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

Let's document the argument. Something like, "Whether the calling thread has a reactor worker.". Or something that ties the usage to the way the reactor works.

Thinking about this some more, can't this value be implicitly determined using ReactorGLES::CanReactOnCurrentThread?

Copy link
Member Author

@bdero bdero Jul 25, 2025

Choose a reason for hiding this comment

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

Added docstrings.

So long as we have the concept of "untracked" handles (which I'm not really a fan of), it would seem that we'd need to punt this responsibility onto the user of the API, since only the user can know if they're going to destroy the texture off the GL context thread.

In either case, I tried this just for kicks, and CanReactOnCurrentThread segfaults while attempting to acquire the mutex lock for some reason... :(

Copy link
Member

Choose a reason for hiding this comment

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

I can take a look at the crasher. Can you file an issue for that?

Copy link
Member Author

Choose a reason for hiding this comment

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

SGTM, I detailed the crash here: #172880

@bdero bdero requested a review from chinmaygarde July 25, 2025 23:27
@bdero bdero added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 28, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Jul 28, 2025
Merged via the queue into flutter:master with commit 831a7a1 Jul 28, 2025
176 of 177 checks passed
@github-project-automation github-project-automation bot moved this from ⚙️ In Progress to ✅ Done in Flutter GPU Jul 28, 2025
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jul 28, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 29, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 29, 2025
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Jul 29, 2025
flutter/flutter@cfbaa18...46b097a

2025-07-29 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Manual roll of Dart from 5ede85aff798 to 14ea8d342149 (#172783)" (flutter/flutter#172900)
2025-07-29 [email protected] Manual roll of Dart from 5ede85aff798 to 14ea8d342149 (flutter/flutter#172783)
2025-07-29 [email protected] Revert "Remove 2023 deprecated `'platforms'` key from daemon output (#172593)" (flutter/flutter#172883)
2025-07-29 [email protected] Migrate Embedder code to impeller/DL geometry classes (flutter/flutter#172804)
2025-07-28 [email protected] [Flutter GPU] Fix Android/GLES crashers. (flutter/flutter#172588)
2025-07-28 [email protected] Roll Packages from 963550c to 6b2e34e (7 revisions) (flutter/flutter#172869)
2025-07-28 [email protected] Reland licenses cpp switch (flutter/flutter#172671)
2025-07-28 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[flutter_tools] Add --no-codesign support for macOS build (#169034)" (flutter/flutter#172878)
2025-07-28 [email protected] [flutter_tools] Add --no-codesign support for macOS build (flutter/flutter#169034)
2025-07-28 [email protected] Add `--config-only` build option for Linux and Windows (flutter/flutter#172239)
2025-07-28 [email protected] Add Gemini Code Assist review config and style guide (flutter/flutter#172785)
2025-07-28 [email protected] [ios]update provisioning profile for 2025-2026 cert for chromium bots (flutter/flutter#171021)

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
vashworth pushed a commit to vashworth/packages that referenced this pull request Jul 30, 2025
…r#9695)

flutter/flutter@cfbaa18...46b097a

2025-07-29 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Manual roll of Dart from 5ede85aff798 to 14ea8d342149 (#172783)" (flutter/flutter#172900)
2025-07-29 [email protected] Manual roll of Dart from 5ede85aff798 to 14ea8d342149 (flutter/flutter#172783)
2025-07-29 [email protected] Revert "Remove 2023 deprecated `'platforms'` key from daemon output (#172593)" (flutter/flutter#172883)
2025-07-29 [email protected] Migrate Embedder code to impeller/DL geometry classes (flutter/flutter#172804)
2025-07-28 [email protected] [Flutter GPU] Fix Android/GLES crashers. (flutter/flutter#172588)
2025-07-28 [email protected] Roll Packages from 963550c to 6b2e34e (7 revisions) (flutter/flutter#172869)
2025-07-28 [email protected] Reland licenses cpp switch (flutter/flutter#172671)
2025-07-28 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[flutter_tools] Add --no-codesign support for macOS build (#169034)" (flutter/flutter#172878)
2025-07-28 [email protected] [flutter_tools] Add --no-codesign support for macOS build (flutter/flutter#169034)
2025-07-28 [email protected] Add `--config-only` build option for Linux and Windows (flutter/flutter#172239)
2025-07-28 [email protected] Add Gemini Code Assist review config and style guide (flutter/flutter#172785)
2025-07-28 [email protected] [ios]update provisioning profile for 2025-2026 cert for chromium bots (flutter/flutter#171021)

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
ksokolovskyi pushed a commit to ksokolovskyi/flutter that referenced this pull request Aug 19, 2025
Continuation of flutter#165630.

Resolves flutter#164278.
Resolves bdero/flutter_scene#35.
Partly fixes: flutter#160948.

* Fixes OpenGLES crashers.
  * Threadsafe GLES pipeline creation.
  * Threadsafe GLES texture creation.
  * Fix GLES internal float texture formats.
  * Encode GLES passes on the raster thread.
  * Overwrite GLES textures on the raster thread.
* Fixes vulkan memory leak
(flutter#164278).
mboetger pushed a commit to mboetger/flutter that referenced this pull request Sep 18, 2025
Continuation of flutter#165630.

Resolves flutter#164278.
Resolves bdero/flutter_scene#35.
Partly fixes: flutter#160948.

* Fixes OpenGLES crashers.
  * Threadsafe GLES pipeline creation.
  * Threadsafe GLES texture creation.
  * Fix GLES internal float texture formats.
  * Encode GLES passes on the raster thread.
  * Overwrite GLES textures on the raster thread.
* Fixes vulkan memory leak
(flutter#164278).
JSUYA pushed a commit to JSUYA/flutter that referenced this pull request Sep 19, 2025
[Flutter GPU] Fix Android/GLES crashers. (flutter#172588)

Continuation of flutter#165630.

Resolves flutter#164278.
Resolves bdero/flutter_scene#35.
Partly fixes: flutter#160948.

* Fixes OpenGLES crashers.
  * Threadsafe GLES pipeline creation.
  * Threadsafe GLES texture creation.
  * Fix GLES internal float texture formats.
  * Encode GLES passes on the raster thread.
  * Overwrite GLES textures on the raster thread.
* Fixes vulkan memory leak
(flutter#164278).
korca0220 pushed a commit to korca0220/flutter that referenced this pull request Sep 22, 2025
Continuation of flutter#165630.

Resolves flutter#164278.
Resolves bdero/flutter_scene#35.
Partly fixes: flutter#160948.

* Fixes OpenGLES crashers.
  * Threadsafe GLES pipeline creation.
  * Threadsafe GLES texture creation.
  * Fix GLES internal float texture formats.
  * Encode GLES passes on the raster thread.
  * Overwrite GLES textures on the raster thread.
* Fixes vulkan memory leak
(flutter#164278).
JSUYA pushed a commit to flutter-tizen/flutter that referenced this pull request Sep 23, 2025
[Flutter GPU] Fix Android/GLES crashers. (flutter#172588)

Continuation of flutter#165630.

Resolves flutter#164278.
Resolves bdero/flutter_scene#35.
Partly fixes: flutter#160948.

* Fixes OpenGLES crashers.
  * Threadsafe GLES pipeline creation.
  * Threadsafe GLES texture creation.
  * Fix GLES internal float texture formats.
  * Encode GLES passes on the raster thread.
  * Overwrite GLES textures on the raster thread.
* Fixes vulkan memory leak
(flutter#164278).
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 12, 2025
lucaantonelli pushed a commit to lucaantonelli/flutter that referenced this pull request Nov 21, 2025
Continuation of flutter#165630.

Resolves flutter#164278.
Resolves bdero/flutter_scene#35.
Partly fixes: flutter#160948.

* Fixes OpenGLES crashers.
  * Threadsafe GLES pipeline creation.
  * Threadsafe GLES texture creation.
  * Fix GLES internal float texture formats.
  * Encode GLES passes on the raster thread.
  * Overwrite GLES textures on the raster thread.
* Fixes vulkan memory leak
(flutter#164278).
JSUYA added a commit to flutter-tizen/flutter that referenced this pull request Dec 12, 2025
- flutter#172588 has been included in
3.38. So it excludes that was applied in 3.35.3.
- Added the `--no-lto` gn option.
- `flto` for linux was added but it have been disabled in Flutter CI due
to build performance issues.
  - flutter#176191
  - flutter#177660
  - flutter#177694
- If we want to apply the flto option, we need a container with an
updated toolchain.

tool: flutter-tizen/flutter-tizen#714
embedder: flutter-tizen/embedder#134

flutter-tizen/flutter-tizen#687
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e: impeller Impeller rendering backend issues and features requests engine flutter/engine related. See also e: labels. flutter-gpu

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

flutter_gpu - potential memory leak on Android (Vulkan) Impeller GPU calls fail to render on Windows (GLES) Out of memory error

2 participants