mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-24 07:26:34 +00:00
Fix some leaks creating root signature blobs
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user