Skip to content

Add embedder API to enable the Vulkan pipeline cache #186374

Open

Description

@loic-sharma

Background

To improve startup performance in later runs of the app, Impeller can use Vulkan's pipeline cache to cache some shader pipeline data to disk. To enable this feature, the embedder must configure Impeller Vulkan's pipeline cache directory (ContextVK::Settings::cache_directory).

However, this feature is not yet available on the embedder API, so out-of-tree embedders cannot benefit from this optimization.

Work

Add an embedder API to configure Impeller Vulkan's cache directory.

Strawman API:

/// Callback for when a VkImage has been written to and is ready for use by the
/// embedder.
typedef bool (*FlutterVulkanPresentCallback)(
    void* /* user data */,
    const FlutterVulkanImage* /* image */);

typedef struct {
  /// The size of this struct. Must be sizeof(FlutterVulkanRendererConfig).
  size_t struct_size;

  // ...

  /// The path to the Vulkan pipeline cache data.
  /// The string can be collected after the call to `FlutterEngineRun` returns.
  /// The string must be NULL terminated.
  /// If NULL, Impeller will not use the Vulkan pipeline cache.
  const char* cache_path;

} FlutterVulkanRendererConfig;

Resources

Activity

  1. added
    e: embedderUsers of the Embedder API
    perf: startupPerformance issues related to app startup time
    c: new featureNothing broken; request for a new capability
    on May 11, 2026
  2. added
    P2Important issues not at the top of the work list
    on May 18, 2026
  3. xiaowei-guan commented on Oct 21, 2026

    @xiaowei-guan
    Contributor

    @loic-sharma How can the pipeline cache feature be verified? In a typical app, there is no noticeable improvement in startup time.

  4. loic-sharma commented on Oct 22, 2026

    @loic-sharma
    MemberAuthor

    @andywolff Would you know?

  5. andywolff commented on Oct 22, 2026

    @andywolff
    Contributor

    I haven't dealt with this kind of thing much yet, but maybe @walley892 can answer. He's been working on startup time improvements.

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

    P2Important issues not at the top of the work listc: new featureNothing broken; request for a new capabilitye: embedderUsers of the Embedder APIperf: startupPerformance issues related to app startup timeteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions