Bug 790879 - work around Mac bufferData bug - r=jgilbert

This commit is contained in:
Benoit Jacob 2012-09-28 07:41:44 -04:00
parent c18aa589cb
commit 5cdc4fdb18

View File

@ -303,6 +303,15 @@ GLenum WebGLContext::CheckedBufferData(GLenum target,
const GLvoid *data,
GLenum usage)
{
#ifdef XP_MACOSX
// bug 790879
if (gl->WorkAroundDriverBugs() &&
int64_t(size) > INT32_MAX) // the cast avoids a potential always-true warning on 32bit
{
GenerateWarning("Rejecting valid bufferData call with size %lu to avoid a Mac bug", size);
return LOCAL_GL_INVALID_VALUE;
}
#endif
WebGLBuffer *boundBuffer = NULL;
if (target == LOCAL_GL_ARRAY_BUFFER) {
boundBuffer = mBoundArrayBuffer;