mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Init copyheap after checking for errors
* This doesn't actually fix any problems, but a couple of crash reports exposed the fact that we try to use the result of CreateDescriptorHeap before checking for errors - this leads to a crash and hides the real problem.
This commit is contained in:
@@ -957,14 +957,14 @@ bool D3D12ResourceManager::Serialise_InitialState(ResourceId resid, ID3D12Device
|
||||
HRESULT hr = m_Device->GetReal()->CreateDescriptorHeap(&desc, __uuidof(ID3D12DescriptorHeap),
|
||||
(void **)©heap);
|
||||
|
||||
copyheap = new WrappedID3D12DescriptorHeap(copyheap, m_Device, desc);
|
||||
|
||||
if(FAILED(hr))
|
||||
{
|
||||
RDCERR("Failed to create CPU descriptor heap for initial state: 0x%08x", hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
copyheap = new WrappedID3D12DescriptorHeap(copyheap, m_Device, desc);
|
||||
|
||||
D3D12_CPU_DESCRIPTOR_HANDLE handle = copyheap->GetCPUDescriptorHandleForHeapStart();
|
||||
|
||||
UINT increment = m_Device->GetDescriptorHandleIncrementSize(desc.Type);
|
||||
|
||||
Reference in New Issue
Block a user