mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 01:20:42 +00:00
Fix some resource descriptor cases around deferred contexts
This commit is contained in:
@@ -621,8 +621,7 @@ bool WrappedID3D11DeviceContext::IsFL11_1()
|
||||
|
||||
bool WrappedID3D11DeviceContext::ProcessChunk(ReadSerialiser &ser, D3D11Chunk chunk)
|
||||
{
|
||||
ResourceId ctxId;
|
||||
SERIALISE_ELEMENT(ctxId).Named("Context ID");
|
||||
SERIALISE_ELEMENT(m_CurContextId).Named("Context ID");
|
||||
|
||||
SERIALISE_CHECK_READ_ERRORS();
|
||||
|
||||
|
||||
@@ -151,6 +151,8 @@ private:
|
||||
WriteSerialiser m_ScratchSerialiser;
|
||||
std::set<std::string> m_StringDB;
|
||||
|
||||
ResourceId m_CurContextId;
|
||||
|
||||
StreamReader *m_FrameReader = NULL;
|
||||
|
||||
map<ResourceId, int> m_MapResourceRecordAllocs;
|
||||
|
||||
@@ -4960,6 +4960,15 @@ bool WrappedID3D11DeviceContext::Serialise_FinishCommandList(SerialiserType &ser
|
||||
draw.flags |= DrawFlags::CmdList;
|
||||
|
||||
AddDrawcall(draw, true);
|
||||
|
||||
m_pDevice->AddResource(pCommandList, ResourceType::CommandBuffer, "Command List");
|
||||
|
||||
// add the current deferred context ID as a parent
|
||||
m_pDevice->GetReplay()->GetResourceDesc(m_CurContextId).derivedResources.push_back(pCommandList);
|
||||
m_pDevice->GetReplay()->GetResourceDesc(pCommandList).parentResources.push_back(m_CurContextId);
|
||||
|
||||
// don't include this as an 'initialisation chunk'
|
||||
m_pDevice->GetReplay()->GetResourceDesc(pCommandList).initialisationChunks.clear();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -2126,7 +2126,8 @@ void WrappedID3D11Device::AddResourceCurChunk(ResourceDescription &descr)
|
||||
|
||||
void WrappedID3D11Device::AddResourceCurChunk(ResourceId id)
|
||||
{
|
||||
AddResourceCurChunk(GetReplay()->GetResourceDesc(id));
|
||||
if(GetResourceManager()->HasLiveResource(id))
|
||||
AddResourceCurChunk(GetReplay()->GetResourceDesc(id));
|
||||
}
|
||||
|
||||
void WrappedID3D11Device::DerivedResource(ID3D11DeviceChild *parent, ResourceId child)
|
||||
|
||||
@@ -398,11 +398,6 @@ private:
|
||||
SDFile *m_StructuredFile = NULL;
|
||||
SDFile m_StoredStructuredData;
|
||||
|
||||
void AddResource(ResourceId id, ResourceType type, const char *defaultNamePrefix);
|
||||
void DerivedResource(ID3D11DeviceChild *parent, ResourceId child);
|
||||
void AddResourceCurChunk(ResourceDescription &descr);
|
||||
void AddResourceCurChunk(ResourceId id);
|
||||
|
||||
vector<DebugMessage> m_DebugMessages;
|
||||
|
||||
vector<FrameDescription> m_CapturedFrames;
|
||||
@@ -428,6 +423,11 @@ public:
|
||||
|
||||
APIProperties APIProps;
|
||||
|
||||
void AddResource(ResourceId id, ResourceType type, const char *defaultNamePrefix);
|
||||
void DerivedResource(ID3D11DeviceChild *parent, ResourceId child);
|
||||
void AddResourceCurChunk(ResourceDescription &descr);
|
||||
void AddResourceCurChunk(ResourceId id);
|
||||
|
||||
ID3D11Device *GetReal() { return m_pDevice; }
|
||||
static std::string GetChunkName(uint32_t idx);
|
||||
D3D11DebugManager *GetDebugManager() { return m_DebugManager; }
|
||||
|
||||
Reference in New Issue
Block a user