Skip to content

[Impeller][Vulkan] gralloc4 rejects format 0x38 on MediaTek MT8788 (Mali-G57) buffer allocation fails at engine init #186067

Description

@mikaelwills

Steps to reproduce

Run any Flutter app with Impeller enabled (default) on a MediaTek
MT8788 device. The errors fire during Flutter engine
initialisation, before any user code runs.

This is the same fingerprint as #182808 (closed by the OP without
explanation, locked, never investigated by the engine team). Filing
fresh because that issue is locked, on a different MediaTek
device, and on current stable.

Expected results

Flutter engine initialises cleanly under Impeller-Vulkan.
No gralloc / ION errors during startup.

Actual results

Impeller-Vulkan asks gralloc4 for a 4x4 buffer of format 0x38 (=
56, R8G8B8A8_UNORM-ish). Gralloc HAL reports "unrecognized format".
Buffer allocation fails. ION ioctl fails. The same allocation
pattern repeats during runtime including during WebRTC video
calls, where it manifests as visible video glitching that does not
occur with --enable-impeller=false.

Same hardware on Skia: clean startup, clean video.

Logcat (Flutter 3.41.9 stable, engine 9161402dc0)

App startup:

I/flutter: Using the Impeller rendering backend (Vulkan).
E/gralloc4: ERROR: Format allocation info not found for format: 38
E/gralloc4: ERROR: Unrecognized and/or unsupported format 0x38 and
usage 0xb00
E/GraphicBufferAllocator: Failed to allocate (4 x 4) layerCount 1
format 56 usage b00: 5
E/AHardwareBuffer: GraphicBuffer(w=4, h=4, lc=1) failed (Unknown
error -5), handle=0x0
E/ion: ioctl c0044901 failed with code -1: Invalid argument

The format-0x38 / GraphicBufferAllocator failure repeats throughout
the app lifetime 8 occurrences in 50s of normal use, fires again
as soon as a video pane initialises.

During a WebRTC video call (downstream symptom):

I/org.webrtc.Logging: AndroidVideoDecoder: ctor name:
c2.mtk.avc.decoder type: H264
D/MediaCodec: [c2.mtk.avc.decoder] connectToSurface
D/CCodecBufferChannel: [c2.mtk.avc.decoder#...] flushed work;
ignored.
D/CCodecBufferChannel: [c2.mtk.avc.decoder#...] Discard frames from
previous generation.
D/PipelineWatcher: onWorkDone: frameIndex not found
(18446744073709551615); ignored

Decoder errors fire on both Skia and Impeller Skia masks them,
Impeller doesn't (visible glitching).

Code sample

Cannot provide minimal repro issue fires in any Flutter app on
this hardware during engine init, before user code. The video call
portion uses Siprix VoIP SDK in our app but the gralloc/ION errors
are not Siprix-specific.

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Filtered logcat (47 lines, covers startup gralloc sequence + video call decoder init + steady-state error sample):

ava-rx2-impeller-3.41.9.log

  • Model: AVA RX2 (AVA-RM-RX2-US)
  • SoC: MediaTek MT8788
  • GPU: Mali-G57 (driver r26p0-01eac0)
  • Android: 13 (API 33)
  • Build fingerprint: AVA/AVA-RM-RX2-US/AVA-RM-RX2-US:13/TP1A.220624
    .014/1764584825:user/release-keys

Flutter Doctor output

Doctor output
flutter doctor -v
[✓] Flutter (Channel stable, 3.27.1, on macOS 26.3.1 25D771280a darwin-arm64,
    locale en-GB)
    • Flutter version 3.27.1 on channel stable at
      /Users/Mikael.Wills/fvm/versions/3.27.1
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 17025dd882 (1 year, 5 months ago), 2024-12-17 03:23:09
      +0900
    • Engine revision cb4b5fff73
    • Dart version 3.6.0
    • DevTools version 2.40.2

[✓] Android toolchain - develop for Android devices (Android SDK version 37.0.0)
    • Android SDK at /Users/Mikael.Wills/Library/Android/sdk
    • Platform android-37.0, build-tools 37.0.0
    • ANDROID_HOME = /Users/Mikael.Wills/Library/Android/sdk
    • Java binary at: /Applications/Android
      Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      21.0.10+-117844308-b1163.108)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 26.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 17E202
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2025.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • 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
      21.0.10+-117844308-b1163.108)

[✓] IntelliJ IDEA Community Edition (version 2025.2.5)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • 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

[✓] Connected device (5 available)
    • RX2 (mobile)                    • RONU8ETQX                 • android-arm64
      • Android 13 (API 33)
    
[✓] Network resources
    • All expected network resources are available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority issues at the top of the work liste: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.platform-androidAndroid applications specificallyteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions