Make sure to always update oldLayout when processing image states

* This is used to determine what barriers to apply
This commit is contained in:
baldurk
2019-12-12 11:37:03 +00:00
parent 20abaec49f
commit fb452c3c02
+2
View File
@@ -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