mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-10 20:10:33 +00:00
Force evaluation of any lazy structured data on fatal error
This commit is contained in:
@@ -1043,6 +1043,13 @@ protected:
|
||||
}
|
||||
}
|
||||
|
||||
void Detach()
|
||||
{
|
||||
PopulateAllChildren();
|
||||
for(size_t i = 0; i < data.children.size(); i++)
|
||||
data.children[i]->Detach();
|
||||
}
|
||||
|
||||
void PopulateAllChildren() const
|
||||
{
|
||||
if(m_Lazy)
|
||||
@@ -1087,6 +1094,9 @@ private:
|
||||
template <class SerialiserType>
|
||||
friend void DoSerialise(SerialiserType &ser, SDObject &el, StructuredObjectList &children);
|
||||
|
||||
// SDFile should be a friend so it can detach
|
||||
friend struct SDFile;
|
||||
|
||||
void DeleteLazyGenerator() const
|
||||
{
|
||||
if(m_Lazy)
|
||||
@@ -1653,6 +1663,15 @@ public:
|
||||
std::swap(version, other.version);
|
||||
}
|
||||
|
||||
DOCUMENT(R"(Prepares the SDFile to remove any possible dependencies on what
|
||||
created it.
|
||||
)");
|
||||
void Detach()
|
||||
{
|
||||
for(SDChunk *c : chunks)
|
||||
c->Detach();
|
||||
}
|
||||
|
||||
protected:
|
||||
SDFile(const SDFile &) = delete;
|
||||
SDFile &operator=(const SDFile &) = delete;
|
||||
|
||||
@@ -44,6 +44,8 @@ DummyDriver::DummyDriver(IReplayDriver *original, const rdcarray<const ShaderRef
|
||||
m_WindowSystems = original->GetSupportedWindowSystems();
|
||||
m_CustomEncodings = original->GetCustomShaderEncodings();
|
||||
m_CustomPrefixes = original->GetCustomShaderSourcePrefixes();
|
||||
|
||||
sdfile->Detach();
|
||||
}
|
||||
|
||||
DummyDriver::~DummyDriver()
|
||||
|
||||
Reference in New Issue
Block a user