Silently drop waits on non-existant syncs (from previous frames)

This commit is contained in:
Baldur Karlsson
2014-06-24 15:48:15 +01:00
parent f53f79c2ad
commit 2357921180
@@ -87,8 +87,11 @@ bool WrappedOpenGL::Serialise_glClientWaitSync(GLsync sync, GLbitfield flags, GL
if(m_State < WRITING)
{
GLResource res = GetResourceManager()->GetLiveResource(id);
glClientWaitSync(GetResourceManager()->GetSync(res.name), Flags, Timeout);
if(GetResourceManager()->HasLiveResource(id))
{
GLResource res = GetResourceManager()->GetLiveResource(id);
glClientWaitSync(GetResourceManager()->GetSync(res.name), Flags, Timeout);
}
}
return true;
@@ -117,8 +120,11 @@ bool WrappedOpenGL::Serialise_glWaitSync(GLsync sync, GLbitfield flags, GLuint64
if(m_State < WRITING)
{
GLResource res = GetResourceManager()->GetLiveResource(id);
glWaitSync(GetResourceManager()->GetSync(res.name), Flags, Timeout);
if(GetResourceManager()->HasLiveResource(id))
{
GLResource res = GetResourceManager()->GetLiveResource(id);
glWaitSync(GetResourceManager()->GetSync(res.name), Flags, Timeout);
}
}
return true;