-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Description
Steps to reproduce
As of a few weeks ago, enabling Impeller and making flutter_gpu
calls on Windows (OpenGL / GLES) was actually working as desired, despite not yet being listed as a supported platform. This only broke in a recent update to the main
channel - right now, I'm unable to render anything to a flutter_gpu
RenderTarget
and only see a black texture instead.
The bug must have been introduced in revision 1ef8d51, as the commit right before still works as expected. The following PRs are relevant to the main suspect commit:
- [Impeller] libImpeller: Reset the GL state when transitioning control back to the embedder. engine#56597
- [Impeller] Maintain separate queues of GLES operations for each thread in the reactor engine#56573
- Added assert for opengles thread safety engine#56585
Expected results
I've set up a minimal example, in which a single render pass with a blue clear value should get drawn.
The outlined rectangle container should get painted with the GPU-rendered texture and turn blue.
(Captured on Flutter main channel, revision 6281dca)
Actual results
The outlined rectangle container stays black.
(Captured on Flutter main channel, revision 1ef8d51)
Code sample
The minimal example from the screenshots above is available at https://github.com/doodlezucc/flutter_gpu_minimal.git
Rendering fails only since commit 1ef8d51 of the Flutter main branch. The previous commit 6281dca works as expected.
Screenshots or Video
No response
Logs
Logs
Launching lib\main.dart on Windows in debug mode...
√ Built build\windows\x64\runner\Debug\flutter_gpu_minimal.exe
[IMPORTANT:flutter/shell/platform/embedder/embedder_surface_gl_impeller.cc(97)] Using the Impeller rendering backend (OpenGL).
Connecting to VM Service at ws://127.0.0.1:56036/5vXAi2R2xgo=/ws
Connected to the VM Service.
Application finished.
Exited (-1).
Flutter Doctor output
Doctor output
[!] Flutter (Channel [user-branch], 3.27.0-1.0.pre.525, on Microsoft Windows [Version 10.0.19045.5247], locale de-DE)
! Flutter version 3.27.0-1.0.pre.525 on channel [user-branch] at C:\Users\[...]\Documents\flutter\flutter
Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/setup.
! Upstream repository unknown source is not a standard remote.
Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error.
• Framework revision 1ef8d51282 (6 weeks ago), 2024-11-15 21:02:25 -0500
• Engine revision f649330aff
• Dart version 3.7.0 (build 3.7.0-153.0.dev)
• DevTools version 2.41.0-dev.2
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
[√] Windows Version (10 Home 64-bit, 22H2, 2009)
[√] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
• Android SDK at C:\Users\[...]\AppData\Local\Android\sdk
• Platform android-35, build-tools 35.0.0
• Java binary at: C:\Program Files\Android\Android Studio1\jbr\bin\java
• Java version OpenJDK Runtime Environment (build 17.0.11+0--11852314)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.10.5)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.10.35122.118
• Windows 10 SDK version 10.0.22621.0
[√] Android Studio (version 2024.1)
• Android Studio at C:\Program Files\Android\Android Studio1
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.11+0--11852314)
[√] IntelliJ IDEA Community Edition (version 2024.1)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2024.1.4
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
[√] VS Code (version 1.96.2)
• VS Code at C:\Users\[...]\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.102.0
[√] Connected device (2 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19045.5247]
• Chrome (web) • chrome • web-javascript • Google Chrome 131.0.6778.205
[√] Network resources
• All expected network resources are available.
! Doctor found issues in 1 category.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status