Make sure deferred dirty marks don't get lost while not capturing

This commit is contained in:
baldurk
2016-09-13 13:28:21 +02:00
parent c10c487a02
commit 8213a992c9
2 changed files with 12 additions and 1 deletions
@@ -4852,6 +4852,9 @@ void WrappedID3D11DeviceContext::ExecuteCommandList(ID3D11CommandList *pCommandL
cmdListRecord->AddResourceReferences(m_pDevice->GetResourceManager());
}
// still update dirty resources for subsequent captures
wrapped->MarkDirtyResources(m_MissingTracks);
if(RestoreContextState)
{
// insert a chunk to let us know on replay that we finished the command list's
@@ -5164,6 +5167,9 @@ HRESULT WrappedID3D11DeviceContext::FinishCommandList(BOOL RestoreDeferredContex
// we pick up on that.
m_EmptyCommandList = true;
// still need to propagate up dirty resources to the immediate context
wrapped->SetDirtyResources(m_DeferredDirty);
RDCDEBUG(
"Deferred Context %llu not capturing at the moment, Produced unsuccessful command list "
"%llu.",
+6 -1
View File
@@ -1262,12 +1262,17 @@ public:
WrappedID3D11DeviceContext *GetContext() { return m_pContext; }
bool IsCaptured() { return m_Successful; }
void SetDirtyResources(set<ResourceId> dirty) { m_Dirty.swap(dirty); }
void SetDirtyResources(set<ResourceId> &dirty) { m_Dirty.swap(dirty); }
void MarkDirtyResources(D3D11ResourceManager *manager)
{
for(auto it = m_Dirty.begin(); it != m_Dirty.end(); ++it)
manager->MarkDirtyResource(*it);
}
void MarkDirtyResources(set<ResourceId> &missingTracks)
{
for(auto it = m_Dirty.begin(); it != m_Dirty.end(); ++it)
missingTracks.insert(*it);
}
//////////////////////////////
// implement ID3D11CommandList