Add m_InitialShaderBlob to DXBCContainer

Only set when separate debug data is found and replaces the original bytecode
This commit is contained in:
Jake Turner
2026-02-06 11:24:40 +13:00
parent 0773f48ce1
commit beba5213ff
2 changed files with 5 additions and 0 deletions
@@ -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 =
@@ -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;