Call ReplacePresentableImageLayout earlier on initial layouts. Refs #185

This commit is contained in:
baldurk
2016-02-23 21:19:28 +01:00
parent a876e13c89
commit 9ee529e435
2 changed files with 1 additions and 2 deletions
-2
View File
@@ -663,8 +663,6 @@ bool WrappedVulkan::Serialise_BeginCaptureFrame(bool applyInitialState)
{
for(size_t i=0; i < imgBarriers.size(); i++)
{
ReplacePresentableImageLayout(imgBarriers[i].oldLayout);
ReplacePresentableImageLayout(imgBarriers[i].newLayout);
imgBarriers[i].srcAccessMask = MakeAccessMask(imgBarriers[i].oldLayout);
imgBarriers[i].dstAccessMask = MakeAccessMask(imgBarriers[i].newLayout);
}
+1
View File
@@ -256,6 +256,7 @@ void VulkanResourceManager::SerialiseImageStates(map<ResourceId, ImageLayouts> &
t.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
t.image = Unwrap(GetCurrentHandle<VkImage>(liveid));
t.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED;
ReplacePresentableImageLayout(state.newLayout);
t.newLayout = state.newLayout;
t.subresourceRange = state.subresourceRange;
barriers.push_back(t);