Skip to content

[Impeller] reduce texture fill cost of backdrop blurs #142154

@jonahwilliams

Description

@jonahwilliams

A number of improvements to blur performance have landed, primarily centered around scaling down the input texture before doing the blur. As a result, the example in #132735 is much faster. From running a metal trace, we can now see that a majority of time is spent in texture fill ops, which provides some hints for next potential optimizations.

image

We had previously discussed using linear interpolation in the blur shader, but based on this profile some other things we could try:

  1. Skip the downsample, instead sample from a fixed miplevel of the input texture. This would make the blur slightly more costly, but we would be able to reduce the texture ops.

  2. For the second blur pass, rather than writing that into a new texture and filling that texture to parent pass, adjust the uvs and write the second texture directly into the parent. Since the FilterContents return a Snapshot, i'm not sure exactly how we'd do that.

FYI @gaaclarke

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecte: impellerImpeller rendering backend issues and features requeststeam-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