Skip to content

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

Closed

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.

Activity

  1. jason-simmons commented on May 5, 2026

    @jason-simmons
    Contributor
  2. mikaelwills commented on May 6, 2026

    @mikaelwills
    Author

    Thanks for the pointer, but #185026 looks like a different bug to me.

    That one is a webview_flutter rendering issue: Flutter Web app embedded in a system Android WebView paints a blank screen on specific Samsung devices, doesn't repro with flutter_inappwebview, and the OP hasn't yet provided a minimal repro. The gralloc4 / format 0x38 lines in their logs are incidental the reported symptom is a blank WebView, not engine-init failure.

    This issue is Impeller-Vulkan engine init on MediaTek MT8788 / Mali-G57, no WebView involved, fires before any user code runs, with a clean working fallback on Skia (--enable-impeller=false) and a downstream WebRTC video-glitch repro on Impeller only.

    The closer match is #182808 (Impeller-Vulkan / format 0x38 / MediaTek / Vivo Android 15). That one was closed by the OP without explanation and locked, which is why I filed fresh on different MediaTek hardware and current stable.

    Happy to gather anything else that would help e.g. a flutter run -v engine init dump, Vulkan validation layer output, etc

  3. added
    platform-androidAndroid applications specifically
    engineflutter/engine related. See also e: labels.
    e: impellerImpeller rendering backend issues and features requests
    on May 6, 2026
  4. mbcorona commented on May 6, 2026

    @mbcorona
    Member

    Hi @mikaelwills , Thanks for the detailed clarification and the exact logcat output.
    I am routing this directly to team-engine for investigation.

  5. gaaclarke commented on May 11, 2026

    @gaaclarke
    Member

    Can you run adb shell getprop on that device? This is an older SoC and it seems like the drivers may be buggy. There is little chance they will fix them so we can block them from using vulkan from our side.

  6. added
    P1High-priority issues at the top of the work list
    on May 11, 2026
  7. mikaelwills commented on May 12, 2026

    @mikaelwills
    Author

    Thanks @gaaclarke , here it is, the device is an AVA remote

    ava_getprop.log

  8. gaaclarke commented on May 12, 2026

    @gaaclarke
    Member

    Devices like this are attempted to be banned on main already:

    if (api_level < kMinimumAndroidApiLevelForMediaTekVulkan &&

    It's interesting that the comment says the API has to be less that 34, which would block this device. But the actual constant says 31 which would not.

    #165939 dropped that value down to 31.

  9. gaaclarke commented on May 12, 2026

    @gaaclarke
    Member

    fyi the report talks of mt8788, but the getprops has a different gpu listed: [ro.vendor.mediatek.platform]: [MT6771]

  10. gaaclarke commented on May 12, 2026

    @gaaclarke
    Member

    However [ro.hardware]: [mt8788], I'm not sure what the ro.vendor.mediatek.platform is referring to then.

  11. github-actions commented on May 26, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  12. locked as resolved and limited conversation to collaborators on May 26, 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

    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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions