未验证 提交 7f388bf8 编写于 作者: D David Reveman 提交者: GitHub

[fuchsia] Limit unnecessary layout transition to aarch64. (#18833)

This is causing rendering artifacts on intel.
Co-authored-by: NDavid Reveman <reveman@google.com>
上级 a25d851e
...@@ -209,16 +209,22 @@ bool VulkanSurfaceProducer::TransitionSurfacesToExternal( ...@@ -209,16 +209,22 @@ bool VulkanSurfaceProducer::TransitionSurfacesToExternal(
} }
VkImageMemoryBarrier image_barrier = { VkImageMemoryBarrier image_barrier = {
.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER,
.pNext = nullptr, .pNext = nullptr,
.srcAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, .srcAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT,
.dstAccessMask = 0, .dstAccessMask = 0,
.oldLayout = imageInfo.fImageLayout, .oldLayout = imageInfo.fImageLayout,
.newLayout = imageInfo.fImageLayout, // Understand why this is causing issues on Intel. TODO(fxb/53449)
.srcQueueFamilyIndex = 0, #if defined(__aarch64__)
.dstQueueFamilyIndex = VK_QUEUE_FAMILY_EXTERNAL_KHR, .newLayout = imageInfo.fImageLayout,
.image = vk_surface->GetVkImage(), #else
.subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1}}; .newLayout = VK_IMAGE_LAYOUT_GENERAL,
#endif
.srcQueueFamilyIndex = 0,
.dstQueueFamilyIndex = VK_QUEUE_FAMILY_EXTERNAL_KHR,
.image = vk_surface->GetVkImage(),
.subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1}
};
if (!command_buffer->InsertPipelineBarrier( if (!command_buffer->InsertPipelineBarrier(
VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册