Skip to content

GPU access using engine built with --disable-desktop-embeddings #153196

@jwinarske

Description

@jwinarske

Steps to reproduce

@bdero

  1. switch to main channel
  2. Build flutter engine (main) using --runtime-mode=debug --embedder-for-target --enable-fontconfig --disable-desktop-embeddings --no-build-embedder-examples --enable-impeller-3d --no-lto --no-goma --no-rbe --no-stripped --no-enable-unittests
  3. Follow steps in this article to create and run app: https://medium.com/flutter/getting-started-with-flutter-gpu-f33d497b7c11

Expected results

Expect symbols to be exported by engine build

Actual results

══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
The following ArgumentError was thrown during paint():
Invalid argument(s): Couldn't resolve native function 'InternalFlutterGpu_Context_InitializeDefault'
in 'package:flutter_gpu/gpu.dart' : No asset with id 'package:flutter_gpu/gpu.dart' found. No
available native assets. Attempted to fallback to process lookup.
.desktop-homescreen/lib/libflutter_engine.so: undefined symbol:
InternalFlutterGpu_Context_InitializeDefault.

Indicates the build is not exporting the symbols even though

#define FLUTTER_GPU_EXPORT __attribute__((visibility("default")))
...
FLUTTER_GPU_EXPORT
extern Dart_Handle InternalFlutterGpu_Context_InitializeDefault(
    Dart_Handle wrapper);

flutter_test is correctly exporting the GPU symbols.

I'm using this to list symbols

nm -S flutter_tester  | c++filt |grep InternalFlutterGpu
nm -S libflutter_engine.so  | c++filt |grep InternalFlutterGpu

Code sample

Code sample
[Paste your code here]

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[Paste your output here]

Metadata

Metadata

Assignees

Labels

P3Issues that are less important to the Flutter projectengineflutter/engine related. See also e: labels.team-engineOwned by Engine teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-engineTriaged by Engine team

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions