From c19459ab7d3f30c87a403aee6aadb483968c82ec Mon Sep 17 00:00:00 2001 From: David Reveman Date: Thu, 28 May 2020 22:43:40 -0400 Subject: [PATCH] [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 --- shell/platform/fuchsia/flutter/vulkan_surface_producer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/platform/fuchsia/flutter/vulkan_surface_producer.cc b/shell/platform/fuchsia/flutter/vulkan_surface_producer.cc index 38479f13d0c..08dee013f1a 100644 --- a/shell/platform/fuchsia/flutter/vulkan_surface_producer.cc +++ b/shell/platform/fuchsia/flutter/vulkan_surface_producer.cc @@ -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(),