mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-11 14:51:33 +00:00
Ensure reserved descriptors are properly initialised
* We just want to change the number reported as 'real' descriptors for external replay/state queries
This commit is contained in:
4 files changed
+11
-10
No files matched your search
@@ -864,7 +864,7 @@ bool WrappedID3D12Device::Serialise_CreateDescriptorHeap(
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = new WrappedID3D12DescriptorHeap(ret, this, Descriptor);
|
||||
ret = new WrappedID3D12DescriptorHeap(ret, this, PatchedDesc, Descriptor.NumDescriptors);
|
||||
|
||||
GetResourceManager()->AddLiveResource(pHeap, ret);
|
||||
|
||||
@@ -891,8 +891,8 @@ HRESULT WrappedID3D12Device::CreateDescriptorHeap(const D3D12_DESCRIPTOR_HEAP_DE
|
||||
|
||||
if(SUCCEEDED(ret))
|
||||
{
|
||||
WrappedID3D12DescriptorHeap *wrapped =
|
||||
new WrappedID3D12DescriptorHeap(real, this, *pDescriptorHeapDesc);
|
||||
WrappedID3D12DescriptorHeap *wrapped = new WrappedID3D12DescriptorHeap(
|
||||
real, this, *pDescriptorHeapDesc, pDescriptorHeapDesc->NumDescriptors);
|
||||
|
||||
if(IsCaptureMode(m_State))
|
||||
{
|
||||
|
||||
@@ -595,7 +595,7 @@ bool D3D12ResourceManager::Serialise_InitialState(SerialiserType &ser, ResourceI
|
||||
return false;
|
||||
}
|
||||
|
||||
copyheap = new WrappedID3D12DescriptorHeap(copyheap, m_Device, desc);
|
||||
copyheap = new WrappedID3D12DescriptorHeap(copyheap, m_Device, desc, heap->GetNumDescriptors());
|
||||
|
||||
D3D12_CPU_DESCRIPTOR_HANDLE handle = copyheap->GetCPUDescriptorHandleForHeapStart();
|
||||
|
||||
|
||||
@@ -347,7 +347,8 @@ rdcarray<ID3D12Resource *> WrappedID3D12Resource::AddRefBuffersBeforeCapture(D3D
|
||||
|
||||
WrappedID3D12DescriptorHeap::WrappedID3D12DescriptorHeap(ID3D12DescriptorHeap *real,
|
||||
WrappedID3D12Device *device,
|
||||
const D3D12_DESCRIPTOR_HEAP_DESC &desc)
|
||||
const D3D12_DESCRIPTOR_HEAP_DESC &desc,
|
||||
UINT UnpatchedNumDescriptors)
|
||||
: WrappedDeviceChild12(real, device)
|
||||
{
|
||||
realCPUBase = real->GetCPUDescriptorHandleForHeapStart();
|
||||
@@ -356,12 +357,12 @@ WrappedID3D12DescriptorHeap::WrappedID3D12DescriptorHeap(ID3D12DescriptorHeap *r
|
||||
SetResident(true);
|
||||
|
||||
increment = device->GetUnwrappedDescriptorIncrement(desc.Type);
|
||||
numDescriptors = desc.NumDescriptors;
|
||||
numDescriptors = UnpatchedNumDescriptors;
|
||||
|
||||
descriptors = new D3D12Descriptor[numDescriptors];
|
||||
descriptors = new D3D12Descriptor[desc.NumDescriptors];
|
||||
|
||||
RDCEraseMem(descriptors, sizeof(D3D12Descriptor) * numDescriptors);
|
||||
for(UINT i = 0; i < numDescriptors; i++)
|
||||
RDCEraseMem(descriptors, sizeof(D3D12Descriptor) * desc.NumDescriptors);
|
||||
for(UINT i = 0; i < desc.NumDescriptors; i++)
|
||||
descriptors[i].Setup(this, i);
|
||||
}
|
||||
|
||||
|
||||
@@ -402,7 +402,7 @@ public:
|
||||
};
|
||||
|
||||
WrappedID3D12DescriptorHeap(ID3D12DescriptorHeap *real, WrappedID3D12Device *device,
|
||||
const D3D12_DESCRIPTOR_HEAP_DESC &desc);
|
||||
const D3D12_DESCRIPTOR_HEAP_DESC &desc, UINT UnpatchedNumDescriptors);
|
||||
virtual ~WrappedID3D12DescriptorHeap();
|
||||
|
||||
D3D12Descriptor *GetDescriptors() { return descriptors; }
|
||||
|
||||
Reference in new issue
Block a user