mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-13 01:05:44 +00:00
glUniformBlockBinding should be serialised mid-frame only, not in init
* glUniformBlockBinding can be changed at runtime and previously pushing all instances of it into the resource record means it would be overwritten by any bindings retrieved by the initial contents. That's fine (if redundant) if they aren't changed afterwards, but if they are changed then this will be wrong.
This commit is contained in:
@@ -955,19 +955,15 @@ void WrappedOpenGL::glUniformBlockBinding(GLuint program, GLuint uniformBlockInd
|
||||
{
|
||||
SERIALISE_TIME_CALL(GL.glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding));
|
||||
|
||||
if(IsCaptureMode(m_State))
|
||||
// we should only capture this while active, since the initial states will grab everything at the
|
||||
// start of the frame and we only want to pick up dynamic changes after that.
|
||||
if(IsActiveCapturing(m_State))
|
||||
{
|
||||
GLResourceRecord *record = GetResourceManager()->GetResourceRecord(ProgramRes(GetCtx(), program));
|
||||
RDCASSERTMSG("Couldn't identify object passed to function. Mismatched or bad GLuint?", record,
|
||||
program);
|
||||
if(record)
|
||||
{
|
||||
USE_SCRATCH_SERIALISER();
|
||||
SCOPED_SERIALISE_CHUNK(gl_CurChunk);
|
||||
Serialise_glUniformBlockBinding(ser, program, uniformBlockIndex, uniformBlockBinding);
|
||||
USE_SCRATCH_SERIALISER();
|
||||
SCOPED_SERIALISE_CHUNK(gl_CurChunk);
|
||||
Serialise_glUniformBlockBinding(ser, program, uniformBlockIndex, uniformBlockBinding);
|
||||
|
||||
record->AddChunk(scope.Get());
|
||||
}
|
||||
GetContextRecord()->AddChunk(scope.Get());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user