From 29388362a366d450e513dbbfb5d3254ee2cc03d6 Mon Sep 17 00:00:00 2001 From: baldurk Date: Sun, 30 Oct 2016 13:21:26 +0100 Subject: [PATCH] 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. --- renderdoc/driver/d3d12/d3d12_device.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/renderdoc/driver/d3d12/d3d12_device.cpp b/renderdoc/driver/d3d12/d3d12_device.cpp index ebb80da19..59eee657d 100644 --- a/renderdoc/driver/d3d12/d3d12_device.cpp +++ b/renderdoc/driver/d3d12/d3d12_device.cpp @@ -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)