Skip to content

[Impeller] Support lossy texture compression in the Vulkan backend. #129501

@chinmaygarde

Description

@chinmaygarde

We use lossy texture compression where available on iOS using MTLTextureCompressionTypeLossy. This is typically only available on newer iOS GPUs (A15 Bionic and above I believe). However, the memory savings are massive the visual differences unnoticeable.

We should opt into using the same kind of texture compression on Vulkan on Android. Universal support for this, like on iOS, is absent. But it is available on certain ARM Mali GPUs. ARM calls this ARM Fixed-Rate Compression (AFRC) and it available to opt-in via the VK_EXT_image_compression_control extension. This extension isn't widely available ~3% on vulkan.gpuinfo.org on Android as of this writing. But, notably, it is available on all Pixels 6 and above and may be the norm moving forward on higher end ARM Mali devices.

Unlike Metal, AFRC allows you to pick the compression ratio. Moving from a 2x to a whopping 4x ratio. More information about this and other Vulkan optimizations is in a recent talk about Vulkan best-practices for mobile.
Screenshot 2023-06-25 at 12 20 30 AM

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecte: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.team-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions