mesa: Fix off-by-one error in transform feedback size check.
In _mesa_BindBufferRange(), we need to verify that the offset and size specified by the client do not exceed the size of the underlying buffer. We were accidentally doing this check using ">=" rather than ">", so we were generating a bogus error if the client specified an offset and size that fit exactly in the underlying buffer. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
942d452047
commit
38b118d49d
|
@ -473,7 +473,7 @@ _mesa_BindBufferRange(GLenum target, GLuint index,
|
|||
return;
|
||||
}
|
||||
|
||||
if (offset + size >= bufObj->Size) {
|
||||
if (offset + size > bufObj->Size) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE,
|
||||
"glBindBufferRange(offset + size %d > buffer size %d)",
|
||||
(int) (offset + size), (int) (bufObj->Size));
|
||||
|
|
Loading…
Reference in New Issue