Skip to content

[Impeller][Vulkan] Unhandled VK_ERROR_COMPRESSION_EXHAUSTED_EXT render-target allocation failure crashes the raster thread on PowerVR (Pixel 10) #187564

Description

@rlueders

Steps to reproduce

Run the demo app on a pixel 10 with impeller enabled. It will crash.
Run the demo app on a pixel 10 with impeller disabled. It does not crash.

Expected results

Demo app doesn't crash with impeller enabled.

Actual results

Demo app crashes.

I/flutter: Using the Impeller rendering backend (Vulkan).
E/flutter: [ERROR:flutter/impeller/renderer/backend/vulkan/allocator_vk.cc(361)]
  Impeller validation: Unable to allocate Vulkan Image: ErrorCompressionExhaustedEXT
  Type: Texture2D Mode: DevicePrivate Usage: { ShaderRead, RenderTarget }
  [VK]Format: R8G8B8A8Unorm
  [VK]Usage: { TransferSrc | TransferDst | Sampled | ColorAttachment | InputAttachment }
  [VK]Mem. Flags: { DeviceLocal }
E/flutter: [ERROR:flutter/impeller/renderer/render_target.cc(439)]
  Impeller validation: Could not create color texture.
E/flutter: [ERROR:flutter/impeller/renderer/render_target.cc(26)]
  Impeller validation: Render target does not have color attachment at index 0.
F/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid NNNN (1.raster)

Code sample

import 'dart:ui' as ui;

import 'package:flutter/material.dart';

void main() => runApp(const App());

class App extends StatelessWidget {
  const App({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        backgroundColor: Colors.black,
        body: Stack(
          fit: StackFit.expand,
          children: <Widget>[
            // Many large blurred tiles = high baseline render-target pressure.
            GridView.count(
              crossAxisCount: 3,
              physics: const NeverScrollableScrollPhysics(),
              children: List<Widget>.generate(
                60,
                (int i) => RepaintBoundary(
                  child: ImageFiltered(
                    imageFilter: ui.ImageFilter.blur(sigmaX: 6, sigmaY: 6),
                    child: CustomPaint(painter: _HeavyTile(i)),
                  ),
                ),
              ),
            ),
            // Nested full-screen BackdropFilters — each forces another large
            // offscreen render target (the saveLayer / back_texture path).
            for (int i = 0; i < 24; i++)
              Positioned.fill(
                child: Opacity(
                  opacity: 0.3,
                  child: BackdropFilter(
                    filter: ui.ImageFilter.blur(sigmaX: 10, sigmaY: 10),
                    child: const SizedBox.expand(),
                  ),
                ),
              ),
            const Center(
              child: Text('HEAVY',
                  style: TextStyle(color: Colors.white, fontSize: 56)),
            ),
          ],
        ),
      ),
    );
  }
}

/// One tile: a storm of blurred saveLayers — expensive offscreen work.
class _HeavyTile extends CustomPainter {
  _HeavyTile(this.seed);
  final int seed;

  @override
  void paint(Canvas canvas, Size size) {
    for (int i = 0; i < 40; i++) {
      final double dx = ((seed * 37 + i * 53) % 100) / 100 * size.width;
      final double dy = ((seed * 71 + i * 29) % 100) / 100 * size.height;
      final double r = 8.0 + ((seed + i * 13) % 30);
      final Rect rect = Rect.fromCircle(center: Offset(dx, dy), radius: r);
      canvas.saveLayer(rect, Paint());
      canvas.drawCircle(
        Offset(dx, dy),
        r,
        Paint()
          ..color = Colors.tealAccent.withValues(alpha: 0.4)
          ..maskFilter = const MaskFilter.blur(BlurStyle.normal, 6),
      );
      canvas.restore();
    }
  }

  @override
  bool shouldRepaint(_HeavyTile old) => false;
}

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.44.1, on macOS 26.5 25F71 darwin-arm64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0)
[✓] Xcode - develop for iOS and macOS (Xcode 26.5)
[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Connected device (3 available)
[✓] Network resources

! Doctor found issues in 1 category.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not 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