diff --git a/renderdoc/driver/shaders/dxbc/dxbc_container.cpp b/renderdoc/driver/shaders/dxbc/dxbc_container.cpp index 434c1093e..276b13a74 100644 --- a/renderdoc/driver/shaders/dxbc/dxbc_container.cpp +++ b/renderdoc/driver/shaders/dxbc/dxbc_container.cpp @@ -1731,6 +1731,8 @@ void DXBCContainer::TryFetchSeparateDebugInfo(bytebuf &byteCode, const rdcstr &d } else if(CheckForDebugInfo(found.contents.data(), found.contents.size())) { + if(m_InitialShaderBlob.isEmpty()) + m_InitialShaderBlob = byteCode; byteCode.swap(found.contents); } m_DebugInfoLoadingLog = diff --git a/renderdoc/driver/shaders/dxbc/dxbc_container.h b/renderdoc/driver/shaders/dxbc/dxbc_container.h index 22c9a31bb..1a1e0fd7f 100644 --- a/renderdoc/driver/shaders/dxbc/dxbc_container.h +++ b/renderdoc/driver/shaders/dxbc/dxbc_container.h @@ -203,6 +203,7 @@ public: uint32_t Major = 0, Minor = 0; } m_Version; + const bytebuf &GetInitialShaderBob() const { return m_InitialShaderBlob; } const bytebuf &GetShaderBlob() const { return m_ShaderBlob; } const IDebugInfo *GetDebugInfo() const { return m_DebugInfo; } const Reflection *GetReflection() const { return m_Reflection; } @@ -284,6 +285,8 @@ private: bytebuf m_DebugShaderBlob; bytebuf m_ShaderBlob; + // Only set when separate debug data is found + bytebuf m_InitialShaderBlob; rdcstr m_Disassembly; rdcstr m_DebugInfoLoadingLog;