Ensure we prepare initial states for late-created programs. Closes #1606

* The initial states for GL programs contain a uniform mapping table, which is
  required for correct replay. We already do this in glLinkProgram we were just
  missing the call in glCreateShaderProgramv.
This commit is contained in:
baldurk
2019-11-21 11:02:53 +00:00
parent 3b48de6b2d
commit cb216441fe
@@ -730,6 +730,15 @@ GLuint WrappedOpenGL::glCreateShaderProgramv(GLenum type, GLsizei count, const G
GetResourceManager()->MarkDirtyResource(id);
record->AddChunk(chunk);
// we need initial contents for programs to know any initial bindings potentially if they change
// over the frame, and for uniform location remapping.
// We just inject a call to prepare the initial contents now, any other post-create data setting
// will be replayed as expected.
if(IsActiveCapturing(m_State))
{
GetResourceManager()->ContextPrepare_InitialState(res);
}
}
else
{