[fuchsia] Avoid unnecessary layout transition. (#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 efe3f4569a
commit c19459ab7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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(),