Fix implementation of D3D12ResourceManager::SerialisableResource

* When referencing all resources we use this function to determine what
  should be excluded, and in this case we want to make sure that e.g.
  the device record and any swapchain records are included, but the
  queue/list records or frame capture record should be omitted as they
  will be included specially.
This commit is contained in:
baldurk
2017-06-28 10:50:01 +01:00
parent 68523abad9
commit 29726388f6
2 changed files with 5 additions and 1 deletions
+1
View File
@@ -366,6 +366,7 @@ public:
FrameRecord &GetFrameRecord() { return m_FrameRecord; }
const DrawcallDescription *GetDrawcall(uint32_t eventID);
ResourceId GetFrameCaptureResourceId() { return m_FrameCaptureRecord->GetResourceID(); }
void AddDebugMessage(MessageCategory c, MessageSeverity sv, MessageSource src, std::string d);
void AddDebugMessage(const DebugMessage &msg) { m_DebugMessages.push_back(msg); }
vector<DebugMessage> GetDebugMessages();
+4 -1
View File
@@ -618,7 +618,10 @@ void D3D12ResourceManager::SerialiseResourceStates(vector<D3D12_RESOURCE_BARRIER
bool D3D12ResourceManager::SerialisableResource(ResourceId id, D3D12ResourceRecord *record)
{
if(record->SpecialResource)
if(record->type == Resource_GraphicsCommandList || record->type == Resource_CommandQueue)
return false;
if(m_Device->GetFrameCaptureResourceId() == id)
return false;
return true;