Skip to content

[Flutter GPU] Release builds on Linux and Windows cannot enable Flutter GPU #190871

Open

Description

@bdero

Flutter GPU has a permanent, project-level opt-in on every platform except Linux and Windows. iOS and macOS use FLTEnableFlutterGPU in Info.plist, Android uses the io.flutter.embedding.android.EnableFlutterGPU manifest key. On Linux and Windows the only way to set it is the --enable-flutter-gpu engine switch.

Release desktop builds ignore engine switches from the environment. GetSwitchesFromEnvironment in shell/platform/common/engine_switches.cc is wrapped in #ifndef FLUTTER_RELEASE, so the switch reaches the engine only under flutter run. A packaged release app on Linux or Windows therefore has no way to turn Flutter GPU on.

Steps to reproduce

  1. Create an app that calls into package:flutter_gpu.
  2. flutter run -d windows --enable-flutter-gpu (or -d linux) and confirm it works.
  3. flutter build windows --release (or linux) and launch the packaged executable directly.

Expected results

Some supported way to enable Flutter GPU for the release build, matching the other platforms.

Actual results

The first Flutter GPU call throws.

Exception: Flutter GPU must be enabled via the Flutter GPU manifest setting. This can be done
either via command line argument --enable-flutter-gpu or by adding the FLTEnableFlutterGPU key
set to true on iOS or io.flutter.embedding.android.EnableFlutterGPU metadata key to true on
Android.

The message lists no desktop option, because none existed.

Notes

Related to #167734, which is the Windows half of this reported as a sample failure. The most recent comment there describes the same packaging problem.

Fixed on master by #190684, which adds fl_dart_project_set_enable_flutter_gpu on Linux and DartProject::set_enable_flutter_gpu on Windows.

Activity

  1. added
    engine
    platform-windows
    platform-linux
    a: desktop
    on Aug 10, 2026
  2. moved this to 🤔 Needs Triage in Flutter GPUon Aug 10, 2026
  3. bdero commented on Aug 10, 2026

    @bdero
    MemberAuthor

    @reidbaker @loic-sharma @jtmcdole

    I know this is a long shot since the window closed last Tuesday and you've already pulled in the cherry-picks for the release... but I'm filing this in the off chance that we can still get this safe patch into 3.47.0. I didn't realize that the release flag was missing in Linux/Windows until last Friday, as my CI smoketests all use profile mode for those platforms. But flutter_gpu/flutter_scene is pretty much dead in the water for these platforms on 3.47 without it.

    It's currently possible to enable flutter_gpu on all platforms by passing the runtime flag, so it's in a half-available state for Linux/Windows. So not really a new API getting added. If we need to go 3.47.1 then so be it. But it would be pretty devastating to miss 3.47 stable altogether with these flags.

  4. reidbaker commented on Aug 10, 2026

    @reidbaker
    Member

    We talked I think about this in chat but the last cp to land was #190852. I am already running the post "all cherry picks are done" steps for the release. I am willing to take this as part of the first hotfix because you are right its not a feature it is a way to enable a feature.

  5. added
    team-fluttergpu
    on Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: desktopengineflutter-gpuplatform-linuxplatform-windowsteam-fluttergpu

    Type

    No type

    Projects

    • Status
      🤔 Needs Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions