mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-13 01:05:44 +00:00
If a program is linked mid-capture, inject new initial contents chunk
* This is only intended to handle the case where a new program is created mid frame and linked for the first time, and we need the initial contents chunk to get location translation among other things. We don't yet handle programs being re-linked multiple times mid-frame.
This commit is contained in:
@@ -887,6 +887,15 @@ void WrappedOpenGL::glLinkProgram(GLuint program)
|
||||
|
||||
record->AddChunk(scope.Get());
|
||||
}
|
||||
|
||||
// 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-link data setting
|
||||
// will be replayed as expected.
|
||||
if(IsActiveCapturing(m_State))
|
||||
{
|
||||
GetResourceManager()->ContextPrepare_InitialState(ProgramRes(GetCtx(), program));
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user