mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-23 06:56:40 +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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user