From b0ae792954a1d0a17fe36ffac8f0d5cd522aa858 Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Fri, 2 Feb 2018 17:11:34 -0500 Subject: [PATCH] Vulkan: Don't implicitly transition texture already in output attachment --- src/backend/vulkan/CommandBufferVk.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/backend/vulkan/CommandBufferVk.cpp b/src/backend/vulkan/CommandBufferVk.cpp index a4be2a9235..449ed2d30a 100644 --- a/src/backend/vulkan/CommandBufferVk.cpp +++ b/src/backend/vulkan/CommandBufferVk.cpp @@ -127,6 +127,11 @@ namespace backend { namespace vulkan { for (uint32_t i = 0; i < renderPass->GetAttachmentCount(); ++i) { Texture* attachment = ToBackend(framebuffer->GetTextureView(i)->GetTexture()); + + if (attachment->GetUsage() & nxt::TextureUsageBit::OutputAttachment) { + continue; + } + attachment->RecordBarrier(commands, attachment->GetUsage(), nxt::TextureUsageBit::OutputAttachment); attachment->UpdateUsageInternal(nxt::TextureUsageBit::OutputAttachment);