Vulkan: Fix layout of destination image of T2T copies

Bug=dawn:18

Change-Id: Ie218b70376b6630449764ac789c9f47c7d5fae2b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/6080
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
Yunchao He 2019-03-28 12:07:41 +00:00 committed by Commit Bot service account
parent 494552b886
commit e821ed6781
1 changed files with 3 additions and 1 deletions

View File

@ -348,8 +348,10 @@ namespace dawn_native { namespace vulkan {
VkImageCopy region = ComputeImageCopyRegion(src, dst, copy->copySize);
// The dstImage is written to so the Dawn guarantees make sure it is in the
// TRANSFER_DST_OPTIMAL layout
device->fn.CmdCopyImage(commands, srcImage, VK_IMAGE_LAYOUT_GENERAL, dstImage,
VK_IMAGE_LAYOUT_GENERAL, 1, &region);
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, &region);
} break;
case Command::BeginRenderPass: {