Truncate Buffer/Texture on GL_OOM.

This commit is contained in:
wolfbeast 2019-07-19 19:08:25 +02:00 committed by Roy Tam
commit 537197dfdc
5 changed files with 25 additions and 3 deletions

View file

@ -134,6 +134,7 @@ WebGLBuffer::BufferData(GLenum target, size_t size, const void* data, GLenum usa
if (error) {
MOZ_ASSERT(error == LOCAL_GL_OUT_OF_MEMORY);
mContext->ErrorOutOfMemory("%s: Error from driver: 0x%04x", funcName, error);
mByteLength = 0;
return;
}
} else {