Fix initialisation errors and resource leaks

This commit is contained in:
baldurk
2024-03-02 00:03:25 +00:00
parent cab4928b34
commit 9500ebd94b
3 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -3117,7 +3117,7 @@ void WrappedID3D12Device::UploadBLASBufferAddresses()
addressBufferResDesc.MipLevels = 1;
addressBufferResDesc.SampleDesc.Count = 1;
addressBufferResDesc.SampleDesc.Quality = 0;
addressBufferResDesc.Width = requiredSize;
addressBufferResDesc.Width = RDCMAX(8ULL, requiredSize);
D3D12_HEAP_PROPERTIES heapProps;
heapProps.Type = D3D12_HEAP_TYPE_UPLOAD;
+2
View File
@@ -835,6 +835,8 @@ void D3D12RaytracingResourceAndUtilHandler::InitReplayBlasPatchingResources()
if(!SUCCEEDED(result))
RDCERR("Unable to create pipeline for patching the BLAS");
}
SAFE_RELEASE(rootSig);
}
}
else
+2
View File
@@ -1053,6 +1053,8 @@ public:
SAFE_RELEASE(m_cmdAlloc);
SAFE_RELEASE(m_cmdQueue);
SAFE_RELEASE(m_gpuFence);
SAFE_RELEASE(m_accStructPatchInfo.m_rootSignature);
SAFE_RELEASE(m_accStructPatchInfo.m_pipeline);
}
void InitInternalResources();