mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-08 05:11:32 +00:00
Use serialised program initial states to translate uniform locations
* If you're capturing and replaying on the same driver it's insanely unlikely that this translation will be anything other than the identity map, although it wouldn't be illegal to renumber locations. However this should allow moving captures between vendors/driver versions/platforms, which in the past wasn't possible because locations would change (quite validly) when the programs were recompiled. There might be other issues, but at least this one is fixed.
This commit is contained in:
1 parent
c4f73c2b58
commit
9748813eb1
6 files changed
+82
-49
No files matched your search
@@ -156,7 +156,7 @@ bool GLResourceManager::Prepare_InitialState(GLResource res)
|
||||
|
||||
m_pSerialiser->Serialise("Id", Id);
|
||||
|
||||
SerialiseProgramUniforms(gl, m_pSerialiser, res.name, true);
|
||||
SerialiseProgramUniforms(gl, m_pSerialiser, res.name, NULL, true);
|
||||
|
||||
SetInitialChunk(Id, scope.Get());
|
||||
}
|
||||
@@ -356,7 +356,7 @@ bool GLResourceManager::Serialise_InitialState(GLResource res)
|
||||
|
||||
gl.glLinkProgram(initProg);
|
||||
|
||||
SerialiseProgramUniforms(gl, m_pSerialiser, initProg, false);
|
||||
SerialiseProgramUniforms(gl, m_pSerialiser, initProg, &details.locationTranslate, false);
|
||||
|
||||
SetInitialContents(Id, InitialContentData(ProgramRes(m_GL->GetCtx(), initProg), 0, NULL));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user