mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-17 20:16:31 +00:00
Perform copies on wrapped descriptors so internal tracking is updated
This commit is contained in:
@@ -1356,10 +1356,18 @@ bool WrappedID3D12Device::Serialise_DynamicDescriptorCopies(
|
||||
|
||||
if(m_State <= EXECUTING)
|
||||
{
|
||||
D3D12_CPU_DESCRIPTOR_HANDLE dsthandle = CPUHandleFromPortableHandle(GetResourceManager(), dst);
|
||||
D3D12_CPU_DESCRIPTOR_HANDLE srchandle = CPUHandleFromPortableHandle(GetResourceManager(), src);
|
||||
// do a wrapped copy so that internal tracking is also updated
|
||||
WrappedID3D12DescriptorHeap *srcHeap =
|
||||
GetResourceManager()->GetLiveAs<WrappedID3D12DescriptorHeap>(src.heap);
|
||||
WrappedID3D12DescriptorHeap *dstHeap =
|
||||
GetResourceManager()->GetLiveAs<WrappedID3D12DescriptorHeap>(dst.heap);
|
||||
|
||||
m_pDevice->CopyDescriptorsSimple(1, dsthandle, srchandle, type);
|
||||
D3D12_CPU_DESCRIPTOR_HANDLE srchandle = srcHeap->GetCPUDescriptorHandleForHeapStart();
|
||||
srchandle.ptr += src.index * sizeof(D3D12Descriptor);
|
||||
D3D12_CPU_DESCRIPTOR_HANDLE dsthandle = dstHeap->GetCPUDescriptorHandleForHeapStart();
|
||||
dsthandle.ptr += dst.index * sizeof(D3D12Descriptor);
|
||||
|
||||
CopyDescriptorsSimple(1, dsthandle, srchandle, type);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user