mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 10:00:40 +00:00
Don't transition images to UNDEFINED if that's their initial known state
This commit is contained in:
@@ -284,8 +284,14 @@ void VulkanResourceManager::SerialiseImageStates(SerialiserType &ser,
|
||||
state.dstQueueFamilyIndex = t.dstQueueFamilyIndex;
|
||||
t.image = Unwrap(GetCurrentHandle<VkImage>(liveid));
|
||||
t.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED;
|
||||
ReplacePresentableImageLayout(state.newLayout);
|
||||
t.newLayout = state.newLayout;
|
||||
|
||||
// sanitise the new layout
|
||||
ReplacePresentableImageLayout(state.newLayout);
|
||||
if(t.newLayout == VK_IMAGE_LAYOUT_UNDEFINED)
|
||||
t.newLayout = VK_IMAGE_LAYOUT_GENERAL;
|
||||
if(state.newLayout == VK_IMAGE_LAYOUT_UNDEFINED)
|
||||
state.newLayout = VK_IMAGE_LAYOUT_GENERAL;
|
||||
t.subresourceRange = state.subresourceRange;
|
||||
barriers.push_back(t);
|
||||
vec.push_back(std::make_pair(liveid, state));
|
||||
|
||||
Reference in New Issue
Block a user