From 862223b4cb14419a0e7e25d9a5451de4497abf5d Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 19 Sep 2016 14:29:57 +0200 Subject: [PATCH] Disassemble root signature at replay time too --- renderdoc/driver/d3d12/d3d12_device_wrap.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/renderdoc/driver/d3d12/d3d12_device_wrap.cpp b/renderdoc/driver/d3d12/d3d12_device_wrap.cpp index 09ffc89e5..dff893b8f 100644 --- a/renderdoc/driver/d3d12/d3d12_device_wrap.cpp +++ b/renderdoc/driver/d3d12/d3d12_device_wrap.cpp @@ -488,8 +488,8 @@ bool WrappedID3D12Device::Serialise_CreateRootSignature(UINT nodeMask, void **ppvRootSignature) { SERIALISE_ELEMENT(UINT, mask, nodeMask); - SERIALISE_ELEMENT(uint32_t, BytecodeLen, (uint32_t)blobLengthInBytes); - SERIALISE_ELEMENT_BUF(byte *, ShaderBytecode, pBlobWithRootSignature, BytecodeLen); + SERIALISE_ELEMENT(uint32_t, blobLen, (uint32_t)blobLengthInBytes); + SERIALISE_ELEMENT_BUF(byte *, blobBytes, pBlobWithRootSignature, blobLen); SERIALISE_ELEMENT(IID, guid, riid); SERIALISE_ELEMENT(ResourceId, Sig, ((WrappedID3D12RootSignature *)*ppvRootSignature)->GetResourceID()); @@ -497,8 +497,7 @@ bool WrappedID3D12Device::Serialise_CreateRootSignature(UINT nodeMask, if(m_State == READING) { ID3D12RootSignature *ret = NULL; - HRESULT hr = - m_pDevice->CreateRootSignature(mask, ShaderBytecode, BytecodeLen, guid, (void **)&ret); + HRESULT hr = m_pDevice->CreateRootSignature(mask, blobBytes, blobLen, guid, (void **)&ret); if(FAILED(hr)) { @@ -508,6 +507,10 @@ bool WrappedID3D12Device::Serialise_CreateRootSignature(UINT nodeMask, { ret = new WrappedID3D12RootSignature(ret, this); + WrappedID3D12RootSignature *wrapped = (WrappedID3D12RootSignature *)ret; + + wrapped->sig = D3D12DebugManager::GetRootSig(blobBytes, blobLen); + GetResourceManager()->AddLiveResource(Sig, ret); } }