mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-24 15:36:33 +00:00
Fix crash if duplicate root signature pointer is returned
* If we make internal replay root signatures live resources they could clash with a replayed resource and end up with two entries in the live resource list, which will double delete on shutdown.
This commit is contained in:
@@ -850,6 +850,7 @@ bool WrappedID3D12Device::Serialise_CreateRootSignature(SerialiserType &ser, UIN
|
||||
{
|
||||
if(GetResourceManager()->HasWrapper(ret))
|
||||
{
|
||||
ret->Release();
|
||||
ret = (ID3D12RootSignature *)GetResourceManager()->GetWrapper(ret);
|
||||
ret->AddRef();
|
||||
|
||||
@@ -937,8 +938,6 @@ HRESULT WrappedID3D12Device::CreateRootSignature(UINT nodeMask, const void *pBlo
|
||||
else
|
||||
{
|
||||
wrapped->sig = GetShaderCache()->GetRootSig(pBlobWithRootSignature, blobLengthInBytes);
|
||||
|
||||
GetResourceManager()->AddLiveResource(wrapped->GetResourceID(), wrapped);
|
||||
}
|
||||
|
||||
*ppvRootSignature = (ID3D12RootSignature *)wrapped;
|
||||
|
||||
Reference in New Issue
Block a user