mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-07 06:24:57 +00:00
If we're retyping in BindBuffer(), remove any redundant BindBuffer()s
This commit is contained in:
1 parent
3cec05c3d9
commit
aec7af04e4
1 file changed
+18
@@ -174,6 +174,24 @@ void WrappedOpenGL::glBindBuffer(GLenum target, GLuint buffer)
|
||||
if(r->datatype != target)
|
||||
{
|
||||
Chunk *chunk = NULL;
|
||||
|
||||
r->LockChunks();
|
||||
while(true)
|
||||
{
|
||||
Chunk *end = r->GetLastChunk();
|
||||
|
||||
if(end->GetChunkType() == BIND_BUFFER)
|
||||
{
|
||||
SAFE_DELETE(end);
|
||||
|
||||
r->PopChunk();
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
r->UnlockChunks();
|
||||
|
||||
{
|
||||
SCOPED_SERIALISE_CONTEXT(BIND_BUFFER);
|
||||
|
||||
Reference in new issue
Block a user