diff --git a/src/dawn/native/vulkan/BufferVk.cpp b/src/dawn/native/vulkan/BufferVk.cpp index 5bec8da4ac..8e0811cc26 100644 --- a/src/dawn/native/vulkan/BufferVk.cpp +++ b/src/dawn/native/vulkan/BufferVk.cpp @@ -262,10 +262,11 @@ bool Buffer::TransitionUsageAndGetResourceBarrier(wgpu::BufferUsage usage, VkPipelineStageFlags* srcStages, VkPipelineStageFlags* dstStages) { bool lastIncludesTarget = IsSubset(usage, mLastUsage); - bool lastReadOnly = IsSubset(mLastUsage, kReadOnlyBufferUsages); + constexpr wgpu::BufferUsage kReuseNoBarrierBufferUsages = + kReadOnlyBufferUsages | wgpu::BufferUsage::MapWrite; + bool lastCanBeReusedWithoutBarrier = IsSubset(mLastUsage, kReuseNoBarrierBufferUsages); - // We can skip transitions to already current read-only usages. - if (lastIncludesTarget && lastReadOnly) { + if (lastIncludesTarget && lastCanBeReusedWithoutBarrier) { return false; }