Skip to content

[Vulkan Embedder API] Add engine setting to perform image uploads on the raster thread for safe single-queue operation. #134573

@bdero

Description

@bdero

The Vulkan embedder API takes a single VkQueue, which is used for both graphics and transfers. But Flutter does uploads on the IO thread, and so this is not currently safe. We could internally work around this problem in the engine by wrapping queue calls with a lock, but this doesn't solve the problem since the user-authored embedder may also submit things to this queue on the raster thread.

In the meantime, embedder authors can work around this problem by intercepting GetDeviceProcAddr in the instance proc address callback supplied to the engine. And then the custom GetDeviceProcAddr can intercept vkQueueSubmit and vkQueueWaitIdle with a version that blocks on a mutex lock.

Follow-up for #133933.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work liste: embedderUsers of the Embedder APIengineflutter/engine related. See also e: labels.team-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