mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
27 lines
899 B
Diff
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;
|
||
|
}
|
||
|
}
|