Skip to content

[Impeller] Vulkan pipeline cache can miss async-compiled pipelines because the dirty flag is set on request #197081

Open

Description

@walley892

In PipelineLibraryVK (impeller/renderer/backend/vulkan/pipeline_library_vk.cc), cache_dirty_ is set in GetPipeline when a pipeline is requested, before it's compiled. Compiles are usually asynchronous (compile_queue_ for graphics pipelines, the worker task runner for compute). So the periodic save in DidAcquireSurfaceFrame can run before a requested pipeline has finished compiling:

  1. A pipeline is requested, which sets cache_dirty_ = true and queues the compile.
  2. The 50-frame save runs. It clears cache_dirty_ and reads the Vulkan pipeline cache, which doesn't include the new
    pipeline yet.
  3. The compile finishes and the pipeline is added to the Vulkan pipeline cache, but nothing marks the cache dirty again.

Activity

  1. added
    in triage
    engine
    e: impeller
    team-engine
    and removed
    in triage
    on Nov 23, 2026
  2. added
    P2
    triaged-engine
    on Nov 23, 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

    P2e: impellerengineteam-enginetriaged-engine

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions