diff --git a/renderdoc/driver/d3d12/d3d12_device_wrap.cpp b/renderdoc/driver/d3d12/d3d12_device_wrap.cpp index 94f2ab8cf..0cbe19188 100644 --- a/renderdoc/driver/d3d12/d3d12_device_wrap.cpp +++ b/renderdoc/driver/d3d12/d3d12_device_wrap.cpp @@ -940,21 +940,20 @@ bool WrappedID3D12Device::Serialise_CreateRootSignature(SerialiserType &ser, UIN { ret = new WrappedID3D12RootSignature(ret, this); - WrappedID3D12RootSignature *wrapped = (WrappedID3D12RootSignature *)ret; - - wrapped->sig = - GetShaderCache()->GetRootSig(pBlobWithRootSignature, (size_t)blobLengthInBytes); - - { - StructuredSerialiser structuriser(ser.GetStructuredFile().chunks.back(), &GetChunkName); - structuriser.SetUserData(GetResourceManager()); - - structuriser.Serialise("UnpackedSignature"_lit, wrapped->sig); - } - GetResourceManager()->AddLiveResource(pRootSignature, ret); } + WrappedID3D12RootSignature *wrapped = (WrappedID3D12RootSignature *)ret; + + wrapped->sig = GetShaderCache()->GetRootSig(pBlobWithRootSignature, (size_t)blobLengthInBytes); + + { + StructuredSerialiser structuriser(ser.GetStructuredFile().chunks.back(), &GetChunkName); + structuriser.SetUserData(GetResourceManager()); + + structuriser.Serialise("UnpackedSignature"_lit, wrapped->sig); + } + AddResource(pRootSignature, ResourceType::ShaderBinding, "Root Signature"); } }