From fb452c3c02eb87d7e326d295b0cda19a9062de91 Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 12 Dec 2019 11:37:03 +0000 Subject: [PATCH] Make sure to always update oldLayout when processing image states * This is used to determine what barriers to apply --- renderdoc/driver/vulkan/vk_manager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/renderdoc/driver/vulkan/vk_manager.cpp b/renderdoc/driver/vulkan/vk_manager.cpp index fa41a9592..f387c42d3 100644 --- a/renderdoc/driver/vulkan/vk_manager.cpp +++ b/renderdoc/driver/vulkan/vk_manager.cpp @@ -724,6 +724,7 @@ void VulkanResourceManager::ApplyBarriers(uint32_t queueFamilyIndex, // apply it (prevstate is from the start of all barriers accumulated, so only set once) if(it->oldLayout == UNKNOWN_PREV_IMG_LAYOUT) it->oldLayout = t.oldLayout; + t.oldLayout = it->newLayout; it->newLayout = t.newLayout; // continue as there might be more, but we're done @@ -777,6 +778,7 @@ void VulkanResourceManager::ApplyBarriers(uint32_t queueFamilyIndex, // once) if(it->oldLayout == UNKNOWN_PREV_IMG_LAYOUT) it->oldLayout = t.oldLayout; + t.oldLayout = it->newLayout; it->newLayout = t.newLayout; // continue as there might be more, but we're done