From 9daa4ad1c81c8bc36062e6cc2b2632b4fc15f6b0 Mon Sep 17 00:00:00 2001 From: Jiawei Shao Date: Fri, 31 Aug 2018 16:07:24 +0800 Subject: [PATCH] Fix the barrier in vulkan::Texture::TransitionUsageNow to make the barrier cover all the slices in a 2D array texture. --- src/dawn_native/vulkan/TextureVk.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dawn_native/vulkan/TextureVk.cpp b/src/dawn_native/vulkan/TextureVk.cpp index 6f9632e2ab..6deb69b0e2 100644 --- a/src/dawn_native/vulkan/TextureVk.cpp +++ b/src/dawn_native/vulkan/TextureVk.cpp @@ -333,7 +333,7 @@ namespace dawn_native { namespace vulkan { barrier.subresourceRange.baseMipLevel = 0; barrier.subresourceRange.levelCount = GetNumMipLevels(); barrier.subresourceRange.baseArrayLayer = 0; - barrier.subresourceRange.layerCount = 1; + barrier.subresourceRange.layerCount = GetArrayLayers(); ToBackend(GetDevice()) ->fn.CmdPipelineBarrier(commands, srcStages, dstStages, 0, 0, nullptr, 0, nullptr, 1,