mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
D3D12 placed resources keep a refcount on their heap
This commit is contained in:
@@ -136,6 +136,8 @@ ID3D12DeviceChild *Unwrap(ID3D12DeviceChild *ptr)
|
||||
|
||||
WrappedID3D12Resource::~WrappedID3D12Resource()
|
||||
{
|
||||
SAFE_RELEASE(m_Heap);
|
||||
|
||||
// perform an implicit unmap on release
|
||||
if(GetResourceRecord())
|
||||
{
|
||||
|
||||
@@ -938,7 +938,11 @@ public:
|
||||
return this;
|
||||
}
|
||||
|
||||
void SetHeap(ID3D12Heap *heap) { m_Heap = (WrappedID3D12Heap *)heap; }
|
||||
void SetHeap(ID3D12Heap *heap)
|
||||
{
|
||||
m_Heap = (WrappedID3D12Heap *)heap;
|
||||
SAFE_ADDREF(m_Heap);
|
||||
}
|
||||
static void RefBuffers(D3D12ResourceManager *rm);
|
||||
|
||||
static rdcarray<ID3D12Resource *> AddRefBuffersBeforeCapture(D3D12ResourceManager *rm);
|
||||
|
||||
Reference in New Issue
Block a user