mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-22 22:46:41 +00:00
Duplicate chunk if glBufferData creates a buffer mid-frame. Closes #1307
This commit is contained in:
@@ -827,6 +827,15 @@ void WrappedOpenGL::glBufferData(GLenum target, GLsizeiptr size, const void *dat
|
||||
record->Length = size;
|
||||
record->usage = usage;
|
||||
record->DataInSerialiser = true;
|
||||
|
||||
// if we're active capturing then we need to add a duplicate call in so that the data is
|
||||
// uploaded mid-frame, even if this is *also* the creation-type call.
|
||||
if(IsActiveCapturing(m_State))
|
||||
{
|
||||
GetContextRecord()->AddChunk(chunk->Duplicate());
|
||||
GetResourceManager()->MarkResourceFrameReferenced(record->GetResourceID(),
|
||||
eFrameRef_PartialWrite);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user