[fuchsia] Avoid unnecessary layout transition. (flutter/engine#18653)

See https://github.com/KhronosGroup/Vulkan-Samples/blob/master/samples/performance/layout_transitions/layout_transitions_tutorial.md#transaction-elimination-on-mali-gpus
for an explanation of why transitioning the layout hurts performance
on Mali drivers.

Co-authored-by: David Reveman <reveman@google.com>
This commit is contained in:
David Reveman
2020-05-28 22:43:40 -04:00
committed by GitHub
parent 3953882fbb
commit 522571c935

View File

@@ -214,7 +214,7 @@ bool VulkanSurfaceProducer::TransitionSurfacesToExternal(
.srcAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT,
.dstAccessMask = 0,
.oldLayout = imageInfo.fImageLayout,
.newLayout = VK_IMAGE_LAYOUT_GENERAL,
.newLayout = imageInfo.fImageLayout,
.srcQueueFamilyIndex = 0,
.dstQueueFamilyIndex = VK_QUEUE_FAMILY_EXTERNAL_KHR,
.image = vk_surface->GetVkImage(),