Fix some leaks creating root signature blobs

This commit is contained in:
baldurk
2024-01-22 14:10:43 +00:00
parent f7eccf03ff
commit 86585b685c
2 changed files with 7 additions and 2 deletions
+4 -2
View File
@@ -2206,11 +2206,13 @@ void D3D12Replay::InitPostMSBuffers(uint32_t eventId)
ID3D12RootSignature *annotatedSig = NULL;
{
ID3DBlob *root = m_pDevice->GetShaderCache()->MakeRootSig(modsig);
ID3DBlob *blob = m_pDevice->GetShaderCache()->MakeRootSig(modsig);
HRESULT hr =
m_pDevice->CreateRootSignature(0, root->GetBufferPointer(), root->GetBufferSize(),
m_pDevice->CreateRootSignature(0, blob->GetBufferPointer(), blob->GetBufferSize(),
__uuidof(ID3D12RootSignature), (void **)&annotatedSig);
SAFE_RELEASE(blob);
if(annotatedSig == NULL || FAILED(hr))
{
ret.ampout.status = ret.meshout.status = StringFormat::Fmt(
@@ -1336,9 +1336,12 @@ bool D3D12Replay::FetchShaderFeedback(uint32_t eventId)
if(annotatedSig == NULL || FAILED(hr))
{
SAFE_RELEASE(root);
RDCERR("Couldn't create feedback modified root signature: %s", ToStr(hr).c_str());
return false;
}
SAFE_RELEASE(root);
}
ID3D12PipelineState *annotatedPipe = NULL;