Add explicit functions to initialise and shutdown replay. Closes #1685

* It's required for replay applications to call InitialiseReplay() before doing
  any work, and to call ShutdownReplay() once they're finished.
* This lets us do more heavyweight shutdown work before global destructors are
  being invoked and the RenderDoc instance is being destroyed.
* Anything that needs to be shut down during capture still has to happen in
  RenderDoc::~RenderDoc since we obviously can't get the application to call a
  shutdown function in that situation.
This commit is contained in:
baldurk
2020-01-30 13:39:00 +00:00
parent e1fe211f3c
commit b38cbc1b0c
11 changed files with 407 additions and 192 deletions
+3 -1
View File
@@ -378,7 +378,7 @@ int main(int argc, char *argv[])
coreargs.push_back("--crash");
for(const QString &arg : remaining)
coreargs.push_back(arg);
RENDERDOC_InitGlobalEnv(env, coreargs);
RENDERDOC_InitialiseReplay(env, coreargs);
}
if(!crashReportPath.isEmpty())
@@ -490,6 +490,8 @@ int main(int argc, char *argv[])
config.Save();
}
RENDERDOC_ShutdownReplay();
PythonContext::GlobalShutdown();
Formatter::shutdown();