mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Add a system for backends to handle device lost/OOM errors and report it
* The UI will become non-functional and the backend will be replaced with a do- nothing one that keeps things alive without needing error bulletproofing everywhere in the real backend.
This commit is contained in:
@@ -48,6 +48,8 @@ void ReplayManager::OpenCapture(const QString &capturefile, const ReplayOptions
|
||||
if(m_Running)
|
||||
return;
|
||||
|
||||
m_FatalError = ReplayStatus::Succeeded;
|
||||
|
||||
// TODO maybe we could expose this choice to the user?
|
||||
int proxyRenderer = -1;
|
||||
|
||||
@@ -296,6 +298,7 @@ void ReplayManager::CancelReplayLoop()
|
||||
void ReplayManager::CloseThread()
|
||||
{
|
||||
m_Running = false;
|
||||
m_FatalError = ReplayStatus::Succeeded;
|
||||
|
||||
m_RenderCondition.wakeAll();
|
||||
|
||||
@@ -492,6 +495,13 @@ void ReplayManager::run(int proxyRenderer, const QString &capturefile, const Rep
|
||||
|
||||
cmd->method(m_Renderer);
|
||||
|
||||
ReplayStatus err = m_Renderer->GetFatalErrorStatus();
|
||||
if(m_FatalError == ReplayStatus::Succeeded && err != ReplayStatus::Succeeded)
|
||||
{
|
||||
m_FatalError = err;
|
||||
m_FatalErrorCallback();
|
||||
}
|
||||
|
||||
{
|
||||
QMutexLocker lock(&m_TimerLock);
|
||||
m_CommandTimer.invalidate();
|
||||
|
||||
Reference in New Issue
Block a user