Delete replay outputs on replay thread, not on UI thread

* On OpenGL this can cause problems with not being able to make the
  output context current because it's already current on the replay
  thread.
This commit is contained in:
baldurk
2018-04-05 12:34:22 +01:00
parent 4047595811
commit 2974ca8d12
2 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -1330,7 +1330,9 @@ void BufferViewer::stageRowMenu(MeshDataStage stage, QMenu *menu, const QPoint &
BufferViewer::~BufferViewer()
{
if(m_Output)
m_Output->Shutdown();
{
m_Ctx.Replay().BlockInvoke([this](IReplayController *r) { m_Output->Shutdown(); });
}
if(m_ModelVSIn->indices)
m_ModelVSIn->indices->deref();
+3 -1
View File
@@ -659,7 +659,9 @@ TextureViewer::TextureViewer(ICaptureContext &ctx, QWidget *parent)
TextureViewer::~TextureViewer()
{
if(m_Output)
m_Output->Shutdown();
{
m_Ctx.Replay().BlockInvoke([this](IReplayController *r) { m_Output->Shutdown(); });
}
m_Ctx.BuiltinWindowClosed(this);
m_Ctx.RemoveCaptureViewer(this);