mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 13:20:54 +00:00
Make sure to mark programs bound to pipelines as frame referenced
This commit is contained in:
@@ -105,6 +105,12 @@ struct ResourceRecord
|
||||
mgr->MarkDirtyResource((*it)->GetResourceID());
|
||||
}
|
||||
|
||||
void MarkParentsReferenced(ResourceRecordHandler *mgr, FrameRefType refType)
|
||||
{
|
||||
for(auto it = Parents.begin(); it != Parents.end(); ++it)
|
||||
mgr->MarkResourceFrameReferenced((*it)->GetResourceID(), refType);
|
||||
}
|
||||
|
||||
void FreeParents(ResourceRecordHandler *mgr)
|
||||
{
|
||||
for(auto it = Parents.begin(); it != Parents.end(); ++it)
|
||||
|
||||
@@ -347,6 +347,12 @@ void GLRenderState::MarkReferenced(WrappedOpenGL *gl, bool initial) const
|
||||
manager->MarkResourceFrameReferenced(ProgramRes(ctx, Program), initial ? eFrameRef_Unknown : eFrameRef_Read);
|
||||
manager->MarkResourceFrameReferenced(ProgramPipeRes(ctx, Pipeline), initial ? eFrameRef_Unknown : eFrameRef_Read);
|
||||
|
||||
// the pipeline correctly has program parents, but we must also mark the programs as frame referenced so that their
|
||||
// initial contents will be serialised.
|
||||
GLResourceRecord *record = manager->GetResourceRecord(ProgramPipeRes(ctx, Pipeline));
|
||||
if(record)
|
||||
record->MarkParentsReferenced(manager, initial ? eFrameRef_Unknown : eFrameRef_Read);
|
||||
|
||||
for(size_t i=0; i < ARRAY_COUNT(BufferBindings); i++)
|
||||
manager->MarkResourceFrameReferenced(BufferRes(ctx, BufferBindings[i]), initial ? eFrameRef_Unknown : eFrameRef_Read);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user