mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-28 09:26:52 +00:00
End active unbalanced queries/transform feedback after active replay
* Some drivers have issues doing normal work while queries or XFB are active, and there's no reason to keep them active indefinitely since they might not be closed by a subsequent draw replay (if multiple draws are spanned and we select a draw in the middle).
This commit is contained in:
@@ -5144,6 +5144,41 @@ ReplayStatus WrappedOpenGL::ContextReplayLog(CaptureState readType, uint32_t sta
|
||||
}
|
||||
}
|
||||
|
||||
if(IsActiveReplaying(m_State))
|
||||
{
|
||||
for(size_t i = 0; i < 8; i++)
|
||||
{
|
||||
GLenum q = QueryEnum(i);
|
||||
if(q == eGL_NONE)
|
||||
break;
|
||||
|
||||
int indices = IsGLES ? 1 : 8; // GLES does not support indices
|
||||
for(int j = 0; j < indices; j++)
|
||||
{
|
||||
if(m_ActiveQueries[i][j])
|
||||
{
|
||||
if(IsGLES)
|
||||
GL.glEndQuery(q);
|
||||
else
|
||||
GL.glEndQueryIndexed(q, j);
|
||||
m_ActiveQueries[i][j] = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(m_ActiveConditional)
|
||||
{
|
||||
GL.glEndConditionalRender();
|
||||
m_ActiveConditional = false;
|
||||
}
|
||||
|
||||
if(m_ActiveFeedback)
|
||||
{
|
||||
GL.glEndTransformFeedback();
|
||||
m_ActiveFeedback = false;
|
||||
}
|
||||
}
|
||||
|
||||
return ReplayStatus::Succeeded;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user