Vulkan: Don't implicitly transition texture already in output attachment

This commit is contained in:
Corentin Wallez 2018-02-02 17:11:34 -05:00 committed by Corentin Wallez
parent 9e59b4ddf1
commit b0ae792954
1 changed files with 5 additions and 0 deletions

View File

@ -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);