mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Fix a couple of CPU memory leaks in D3D12
This commit is contained in:
@@ -238,6 +238,8 @@ WrappedID3D12CommandQueue::WrappedID3D12CommandQueue(ID3D12CommandQueue *real,
|
||||
|
||||
WrappedID3D12CommandQueue::~WrappedID3D12CommandQueue()
|
||||
{
|
||||
SAFE_DELETE(m_FrameReader);
|
||||
|
||||
if(m_QueueRecord)
|
||||
m_QueueRecord->Delete(m_pDevice->GetResourceManager());
|
||||
m_pDevice->GetResourceManager()->ReleaseCurrentResource(GetResourceID());
|
||||
|
||||
@@ -152,6 +152,7 @@ class WrappedID3D12CommandSignature;
|
||||
|
||||
struct BakedCmdListInfo
|
||||
{
|
||||
~BakedCmdListInfo() { SAFE_DELETE(draw); }
|
||||
void ShiftForRemoved(uint32_t shiftDrawID, uint32_t shiftEID, size_t idx);
|
||||
|
||||
struct ExecuteData
|
||||
@@ -193,10 +194,10 @@ struct BakedCmdListInfo
|
||||
uint32_t beginChunk = 0;
|
||||
uint32_t endChunk = 0;
|
||||
|
||||
D3D12DrawcallTreeNode *draw; // the root draw to copy from when submitting
|
||||
uint32_t eventCount; // how many events are in this cmd list, for quick skipping
|
||||
uint32_t curEventID; // current event ID while reading or executing
|
||||
uint32_t drawCount; // similar to above
|
||||
D3D12DrawcallTreeNode *draw = NULL; // the root draw to copy from when submitting
|
||||
uint32_t eventCount; // how many events are in this cmd list, for quick skipping
|
||||
uint32_t curEventID; // current event ID while reading or executing
|
||||
uint32_t drawCount; // similar to above
|
||||
};
|
||||
|
||||
class WrappedID3D12Device;
|
||||
|
||||
@@ -568,7 +568,8 @@ public:
|
||||
|
||||
static void RegisterD3DDeviceCallback(D3DDeviceCallback callback)
|
||||
{
|
||||
m_D3DCallbacks.push_back(callback);
|
||||
if(std::find(m_D3DCallbacks.begin(), m_D3DCallbacks.end(), callback) == m_D3DCallbacks.end())
|
||||
m_D3DCallbacks.push_back(callback);
|
||||
}
|
||||
|
||||
static ID3DDevice *GetD3DDevice(IUnknown *dev)
|
||||
|
||||
Reference in New Issue
Block a user