On Desktop GL, "The error INVALID_VALUE is generated if offset + size is greater than the value of BUFFER_SIZE."
On ES 3.0, "Regardless of the size specified with BindBufferRange, the GL will never read or write beyond the end of a bound buffer."
So we will need to emulate the ES behavior on top of Desktop GL.
Both conformance2/buffers/buffer-overflow-test.html
and conformance2/buffers/buffer-type-restrictions.html
test about this.
Both fail on Mac OSX, core profile.
Interestingly, both pass on Linux, AMD and NVIDIA, compatibility profile.
OK, further clarification, On OpenGL 4.1, "The error INVALID_VALUE is generated if offset + size is greater than the value of BUFFER_SIZE."
However, on OpenGL 4.2 or above, the behavior has been changed and is the same as ES3.
That's why we see the tests fail on Mac (4.1 or lower) but pass on Linux (4.2 and above).
Comment 1 by zmo@chromium.org
, Apr 18 2016