Update image states after frame references to handle postponed resources

* We may fetch initial states for postponed resources when updating references,
  so don't update image states until after as the fetch is performed *before*
  the application's commands
This commit is contained in:
baldurk
2023-12-08 13:34:54 +00:00
parent 73945ee56e
commit f3a3d0ac58
@@ -1102,6 +1102,10 @@ void WrappedVulkan::CaptureQueueSubmit(VkQueue queue,
{
(*it)->AddResourceReferences(GetResourceManager());
GetResourceManager()->MergeReferencedMemory((*it)->cmdInfo->memFrameRefs);
}
for(auto it = cmdsWithReferences.begin(); it != cmdsWithReferences.end(); ++it)
{
UpdateImageStates((*it)->cmdInfo->imageStates);
}