mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 21:30:53 +00:00
Don't mark any resource dirty while capturing a frame
This commit is contained in:
@@ -285,7 +285,10 @@ VkResult WrappedVulkan::vkAllocDescriptorSets(
|
||||
record->AddParent(GetResourceManager()->GetResourceRecord(layoutID));
|
||||
|
||||
// just always treat descriptor sets as dirty
|
||||
GetResourceManager()->MarkDirtyResource(id);
|
||||
if(m_State != WRITING_CAPFRAME)
|
||||
GetResourceManager()->MarkDirtyResource(id);
|
||||
else
|
||||
GetResourceManager()->MarkPendingDirty(id);
|
||||
|
||||
record->layout = layoutID;
|
||||
m_CreationInfo.m_DescSetLayout[layoutID].CreateBindingsArray(record->descBindings);
|
||||
|
||||
@@ -387,8 +387,17 @@ VkResult WrappedVulkan::vkQueueSubmit(
|
||||
GetResourceManager()->ApplyTransitions(m_CmdBufferInfo[cmd].imgtransitions, m_ImageInfo);
|
||||
|
||||
VkResourceRecord *record = GetRecord(pCmdBuffers[i]);
|
||||
for(auto it = record->bakedCommands->dirtied.begin(); it != record->bakedCommands->dirtied.end(); ++it)
|
||||
GetResourceManager()->MarkDirtyResource(*it);
|
||||
|
||||
if(m_State == WRITING_CAPFRAME)
|
||||
{
|
||||
for(auto it = record->bakedCommands->dirtied.begin(); it != record->bakedCommands->dirtied.end(); ++it)
|
||||
GetResourceManager()->MarkPendingDirty(*it);
|
||||
}
|
||||
else
|
||||
{
|
||||
for(auto it = record->bakedCommands->dirtied.begin(); it != record->bakedCommands->dirtied.end(); ++it)
|
||||
GetResourceManager()->MarkDirtyResource(*it);
|
||||
}
|
||||
|
||||
if(m_State == WRITING_CAPFRAME)
|
||||
{
|
||||
|
||||
@@ -94,7 +94,10 @@ VkResult WrappedVulkan::vkAllocMemory(
|
||||
|
||||
// VKTODOMED always treat memory as dirty for now, so its initial state
|
||||
// is guaranteed to be prepared
|
||||
GetResourceManager()->MarkDirtyResource(id);
|
||||
if(m_State != WRITING_CAPFRAME)
|
||||
GetResourceManager()->MarkDirtyResource(id);
|
||||
else
|
||||
GetResourceManager()->MarkPendingDirty(id);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -157,10 +160,6 @@ VkResult WrappedVulkan::vkMapMemory(
|
||||
it->second.refData = NULL;
|
||||
}
|
||||
}
|
||||
else if(m_State >= WRITING)
|
||||
{
|
||||
GetResourceManager()->MarkDirtyResource(id);
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -958,6 +958,8 @@ VkResult WrappedVulkan::vkQueuePresentWSI(
|
||||
GetResourceManager()->MarkUnwrittenResources();
|
||||
|
||||
GetResourceManager()->ClearReferencedResources();
|
||||
|
||||
GetResourceManager()->FlushPendingDirty();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user