You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Impeller] Support configurable Vulkan image layout handoff for embedder backing stores #194238
In #193003, Impeller returns Vulkan backing stores in VK_IMAGE_LAYOUT_GENERAL. Skia returned them in VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL.
This difference means that switching from skia vulkan to impeller vulkan will break an embedder which previously used skia with backingstores expecting the layout Skia uses. The form of the breakage would be synchronization and validation failures (VUID-vkCmdPipelineBarrier-oldLayout-01181).
Also, VK_IMAGE_LAYOUT_GENERAL can disable hardware framebuffer compression on tile-based mobile GPUs.
The reason that PR uses VK_IMAGE_LAYOUT_GENERAL is because that PR uses a shortcut to create its render target for the backingstore. It calls SurfaceVK::WrapSwapchainImage with a dummy present callback. This leads to them being treated as onscreen swapchains, which uses VK_IMAGE_LAYOUT_GENERAL.
We should provide a contract for embedders to request a particular image layout.
I propose adding a presentation_layout field to FlutterVulkanBackingStore in embedder.h. We can keep the default on VK_IMAGE_LAYOUT_GENERAL.
We should also extract a dedicated helper for wrapping offscreen render targets to get rid of the SurfaceVK::WrapSwapchainImage shortcut.
Android expects VK_IMAGE_LAYOUT_GENERAL, so this issue is not blocking for the android embedder migration, but it may still be useful for other potential embedders
Activity
andywolff commentedon Oct 12, 2026
A note regarding RFC 410 (flutter/rfc#24)
Android expects
VK_IMAGE_LAYOUT_GENERAL, so this issue is not blocking for the android embedder migration, but it may still be useful for other potential embedders