Make sure to delete records when resources are destroyed.

* If we're capturing, the frame references will keep the resource alive
  and the application has to at least keep resources alive until after
  GPU execution is finished.
This commit is contained in:
baldurk
2016-10-30 13:21:26 +01:00
parent 7903c78f6c
commit 29388362a3
+5
View File
@@ -1556,6 +1556,11 @@ void WrappedID3D12Device::ReleaseResource(ID3D12DeviceChild *res)
m_ResourceStates.erase(id);
}
D3D12ResourceRecord *record = GetRecord(res);
if(record)
record->Delete(GetResourceManager());
// wrapped resources get released all the time, we don't want to
// try and slerp in a resource release. Just the explicit ones
if(m_State < WRITING)