Fixes for D3D12 structured export

This commit is contained in:
baldurk
2018-02-06 17:41:59 +00:00
parent 9614ee89c2
commit effbed2222
3 changed files with 10 additions and 1 deletions
+7 -1
View File
@@ -284,7 +284,8 @@ WrappedID3D12Device::WrappedID3D12Device(ID3D12Device *realDevice, D3D12InitPara
RDCDEBUG("Couldn't get ID3D12InfoQueue.");
}
m_InitParams = *params;
if(params)
m_InitParams = *params;
}
WrappedID3D12Device::~WrappedID3D12Device()
@@ -2557,6 +2558,11 @@ ReplayStatus WrappedID3D12Device::ReadLogInitialisation(RDCFile *rdc, bool store
// read the remaining data into memory and pass to immediate context
frameDataSize = reader->GetSize() - reader->GetOffset();
if(IsStructuredExporting(m_State))
{
m_Queue = new WrappedID3D12CommandQueue(NULL, this, m_State);
}
m_Queue->SetFrameReader(new StreamReader(reader, frameDataSize));
if(!IsStructuredExporting(m_State))
+1
View File
@@ -416,6 +416,7 @@ public:
m_InitParams = params;
m_SectionVersion = sectionVersion;
}
CaptureState GetState() { return m_State; }
D3D12Replay *GetReplay() { return &m_Replay; }
WrappedID3D12CommandQueue *GetQueue() { return m_Queue; }
ID3D12CommandAllocator *GetAlloc() { return m_Alloc; }
@@ -289,6 +289,8 @@ template <typename SerialiserType>
bool D3D12ResourceManager::Serialise_InitialState(SerialiserType &ser, ResourceId resid,
ID3D12DeviceChild *liveRes)
{
m_State = m_Device->GetState();
D3D12ResourceRecord *record = NULL;
D3D12InitialContents initContents;
if(ser.IsWriting())