mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 21:30:53 +00:00
Make sure deferred dirty marks don't get lost while not capturing
This commit is contained in:
@@ -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.",
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user