Skip to content

[Impeller][Vulkan] Explicitly supplied cubemap mip chains are clamped to base mip on Adreno #189965

Open

Description

@Ram-Dawson

Steps to reproduce

  1. Clone https://github.com/Ram-Dawson/flutter_gpu_manual_mip_repro and use its main branch.

  2. Use Flutter framework revision ea1bc5dc4f6fedce69957417b6907e45615146e2, the master revision used for this investigation.

  3. Run the repro on an Android device using Impeller Vulkan:

    flutter pub get
    flutter run --enable-flutter-gpu -d <device-tcp-serial>
  4. Select Cubemap mode and set roughness to 1.00. The app uploads all six faces for each of eight explicitly supplied cubemap mip levels. The color probe requests band 7.

  5. Select Cubemap mode and set roughness to 0.45. The color probe requests band 3.

  6. Compare Atlas mode, which represents the same roughness bands without cubemap mip sampling.

The primary affected device is a Redmi K60 Pro (socrates, Adreno 740) on Android 16 / HyperOS OS3.0.303.0. The app startup log reports Impeller Vulkan.

Expected results

The sampler should be able to read the complete manually supplied cubemap mip chain.

At roughness 1.00, the LOD probe requests and should observe gray band 7, and the environment reflection should become diffuse.

At roughness 0.45, the LOD probe requests and should observe green band 3.

Actual results

On Adreno Vulkan, the Cubemap path reads red band 0 at both roughness 1.00 and 0.45. The roughness 1.00 reflection remains overly sharp.

The equivalent Atlas path selects the expected roughness bands. The behavior persists in this standalone Flutter GPU repro, without flutter_scene, a scene graph, directional lights, shadow maps, or a material system.

Code sample

Code sample

The complete minimal reproducible sample is available at https://github.com/Ram-Dawson/flutter_gpu_manual_mip_repro.

main intentionally uses the normal mip-linear sampler against a complete manually supplied cubemap mip chain:

final cubeSampler = gpu.SamplerOptions(
  mipFilter: gpu.MipFilter.linear,
);

The LOD color probe makes the sampled mip observable rather than relying only on perceived blur. The repository README documents both the baseline and the local-engine patched comparison.

Screenshots or Video

Screenshots / Video demonstration
Official-engine baseline Patched local engine
Roughness 1.00 visual Official baseline cubemap reflection remains sharp at roughness 1.00 Patched cubemap reflection becomes diffuse at roughness 1.00
Roughness 1.00 LOD probe Official baseline requested band 7 but observes red band 0 Patched local engine observes gray band 7

Additional roughness 0.45 LOD probes are in the public repository: baseline, requested band 3 but observed red band 0 and patched, observed green band 3.

Logs

Logs
No Flutter or Dart exception is emitted. The failure is visible in the rendered Cubemap result and the LOD color probe.

Flutter Doctor output

Doctor output

The following was collected from the WSL baseline checkout used for reproduction. It intentionally identifies a user branch because this checkout is a locally pinned Flutter source tree. The wireless Android device was not connected to the WSL ADB daemon when this command was collected; the physical-device details used for reproduction are listed above.

[!] Flutter (Channel [user-branch], 3.47.0-1.0.pre-184, on Ubuntu 26.04 LTS 6.18.33.2-microsoft-standard-WSL2, locale C.UTF-8)
    ! Flutter version 3.47.0-1.0.pre-184 on channel [user-branch] at /home/user01/flutter_engine_ea1bc5dc_baseline
      Currently on an unknown channel.
    ! The flutter binary is not on your path.
    ! The dart binary is not on your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ea1bc5dc4f (2026-07-23 02:06:38 +0000)
    • Engine revision ea1bc5dc4f
    • Dart version 3.14.0 (build 3.14.0-53.0.dev)
    • DevTools version 2.60.0
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets, enable-dart-data-assets, enable-record-use, enable-swift-package-manager, omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration, enable-riscv64

[!] Android toolchain - develop for Android devices (Android SDK version 36.0.0)
    • Android SDK at /usr/lib/android-sdk
    • Emulator version unknown
    ✗ cmdline-tools component is missing.
    ✗ Android license status unknown.

[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
    ! Cannot find Chrome.

[✗] Linux toolchain - develop for Linux desktop
    ✗ clang++ is required for Linux development.
    ✗ CMake is required for Linux development.
    • ninja version 1.13.2
    • pkg-config version 2.5.1
    ✗ GTK 3.0 development libraries are required for Linux development.
    ! Unable to access driver information using 'eglinfo'.

[✓] Connected device (1 available)
    • Linux (desktop) • linux • linux-x64 • Ubuntu 26.04 LTS 6.18.33.2-microsoft-standard-WSL2

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 4 categories.

Activity

  1. added
    in triagePresently being triaged by the triage team
    platform-androidAndroid applications specifically
    c: renderingUI glitches reported at the engine/skia or impeller rendering level
    engineflutter/engine related. See also e: labels.
    e: impellerImpeller rendering backend issues and features requests
    fyi-engineFor the attention of Engine team
    and removed
    in triagePresently being triaged by the triage team
    on Jul 24, 2026
  2. moved this to 🤔 Needs Triage in Flutter GPUon Jul 24, 2026
  3. puneetkukreja98 commented on Jul 24, 2026

    @puneetkukreja98
    Contributor

    @Ram-Dawson Thanks for reporting the issue! I tested this on my physical Moto device running Android 16 and got the same results shown under 'official-engine baseline' in the attachment above. Routing this to team-fluttergpu for further investigation.

    Update: I ran the application on macOS and the iPhone 17 simulator (iOS 26.5), and the issue does not reproduce there. My actual results on both macOS and iOS match the images under "patched local engine" shown in the report above.

    Flutter doctor -v:

    [✓] Flutter (Channel master, 3.47.0-1.0.pre-201, on macOS 26.4.1 25E253 darwin-arm64, locale en-US) [5.7s]
        • Flutter version 3.47.0-1.0.pre-201 on channel master at /Users/puneetkukreja/flutter-contribution/flutter
        • Upstream repository https://github.com/puneetkukreja98/flutter
        • FLUTTER_GIT_URL = https://github.com/puneetkukreja98/flutter
        • Framework revision 0ed149e63d (11 hours ago), 2026-07-23 20:34:05 -0400
        • Engine revision 0ed149e63d
        • Dart version 3.14.0 (build 3.14.0-60.0.dev)
        • DevTools version 2.60.0
        • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets, enable-record-use,
          enable-swift-package-manager, omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration, enable-riscv64
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 37.0.0-rc1) [4.3s]
        • Android SDK at /Users/puneetkukreja/Library/Android/sdk
        • Emulator version 36.6.11.0 (build_id 15507667) (CL:N/A)
        • Platform android-37.1, build-tools 37.0.0-rc1
        • Java binary at: /Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/bin/java
          This JDK is specified in your Flutter configuration.
          To change the current JDK, run: `flutter config --jdk-dir="path/to/jdk"`.
        • Java version Java(TM) SE Runtime Environment (build 17.0.12+8-LTS-286)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 26.6) [3.2s]
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Build 17F113
        • CocoaPods version 1.16.2
    
    [✓] Chrome - develop for the web [7ms]
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Connected device (4 available) [12.0s]    
        • moto g57 power (mobile)             • ZN52278M76                • android-arm64  • Android 16 (API 36)
        • Puneet’s iPhone (wireless) (mobile) • 00008110-00167CEE0C46401E • ios            • iOS 18.0.1 22A3370
        • macOS (desktop)                     • macos                     • darwin-arm64   • macOS 26.4.1 25E253 darwin-arm64
        • Chrome (web)                        • chrome                    • web-javascript • Google Chrome 150.0.7871.184
    
    [✓] Network resources [1,094ms]
        • All expected network resources are available.
    
    • No issues found!
    
  4. Ram-Dawson commented on Jul 24, 2026

    @Ram-Dawson
    ContributorAuthor

    @puneetkukreja98 Thanks for testing. This appears to be specific to Qualcomm Adreno Vulkan devices: Flutter enables a workaround for known automatic mipmap-generation corruption on these drivers, which currently forces sampler LOD to mip 0 even for a complete manually supplied mip chain with explicit textureLod sampling. I reproduced this on Adreno 740, and my patched local engine fixes the car’s over-bright reflections. I opened #189966 for that opt-in manual-mip case; it still needs maintainer review.

  5. gaaclarke commented on Jul 27, 2026

    @gaaclarke
    Member

    fyi @bdero

  6. moved this from 🤔 Needs Triage to 🐞 Bugs in Flutter GPUon Aug 1, 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

    c: renderingUI glitches reported at the engine/skia or impeller rendering levele: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.flutter-gpuplatform-androidAndroid applications specificallyteam-fluttergpuOwned by Flutter GPU team

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions