gecko/gfx/angle/angle-line-loop-overflow.patch

27 lines
899 B
Diff

# HG changeset patch
# Parent 308e3cf5ba75fdf8ed3bdd3dc766410b708b98ef
diff --git a/gfx/angle/src/libGLESv2/IndexDataManager.cpp b/gfx/angle/src/libGLESv2/IndexDataManager.cpp
--- a/gfx/angle/src/libGLESv2/IndexDataManager.cpp
+++ b/gfx/angle/src/libGLESv2/IndexDataManager.cpp
@@ -375,17 +375,18 @@ void StreamingIndexBuffer::reserveSpace(
if (FAILED(result))
{
ERR("Out of memory allocating a vertex buffer of size %lu.", mBufferSize);
}
mWritePosition = 0;
}
- else if (mWritePosition + requiredSpace > mBufferSize) // Recycle
+ else if (mWritePosition + requiredSpace > mBufferSize ||
+ mWritePosition + requiredSpace < mWritePosition) // Recycle
{
void *dummy;
mIndexBuffer->Lock(0, 1, &dummy, D3DLOCK_DISCARD);
mIndexBuffer->Unlock();
mWritePosition = 0;
}
}