mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Add fatal error checks to avoid crashes on load in AS init state apply
This commit is contained in:
@@ -2087,6 +2087,9 @@ void D3D12ResourceManager::Apply_InitialState(ID3D12DeviceChild *live, D3D12Init
|
||||
RDCMAX(4 * 1024 * 1024ULL, prebuild.ScratchDataSizeInBytes));
|
||||
}
|
||||
|
||||
if(m_Device->HasFatalError() || GetRTManager()->ASSerialiseBuffer == NULL)
|
||||
return;
|
||||
|
||||
desc.ScratchAccelerationStructureData = GetRTManager()->ASSerialiseBuffer->Address();
|
||||
}
|
||||
|
||||
@@ -2155,6 +2158,9 @@ void D3D12ResourceManager::Apply_InitialState(ID3D12DeviceChild *live, D3D12Init
|
||||
D3D12GpuBufferHeapMemoryFlag::Default,
|
||||
prebuild.ResultDataMaxSizeInBytes, 256, &data.cachedBuiltAS);
|
||||
|
||||
if(!data.cachedBuiltAS)
|
||||
return;
|
||||
|
||||
ResourceId origId = GetOriginalID(as->GetResourceID());
|
||||
|
||||
UINT numPostBuilds = 0;
|
||||
|
||||
Reference in New Issue
Block a user