Fix the off-by-one errors in the indexed binding functions BindBufferBase and BindBufferRange.

TRAC #22958 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2300 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent a26aeaf1
...@@ -8653,7 +8653,7 @@ void __stdcall glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLi ...@@ -8653,7 +8653,7 @@ void __stdcall glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLi
switch (target) switch (target)
{ {
case GL_TRANSFORM_FEEDBACK_BUFFER: case GL_TRANSFORM_FEEDBACK_BUFFER:
if (index > context->getMaxTransformFeedbackBufferBindings()) if (index >= context->getMaxTransformFeedbackBufferBindings())
{ {
return gl::error(GL_INVALID_VALUE); return gl::error(GL_INVALID_VALUE);
} }
...@@ -8731,14 +8731,14 @@ void __stdcall glBindBufferBase(GLenum target, GLuint index, GLuint buffer) ...@@ -8731,14 +8731,14 @@ void __stdcall glBindBufferBase(GLenum target, GLuint index, GLuint buffer)
switch (target) switch (target)
{ {
case GL_TRANSFORM_FEEDBACK_BUFFER: case GL_TRANSFORM_FEEDBACK_BUFFER:
if (index > context->getMaxTransformFeedbackBufferBindings()) if (index >= context->getMaxTransformFeedbackBufferBindings())
{ {
return gl::error(GL_INVALID_VALUE); return gl::error(GL_INVALID_VALUE);
} }
break; break;
case GL_UNIFORM_BUFFER: case GL_UNIFORM_BUFFER:
if (index > context->getMaximumCombinedUniformBufferBindings()) if (index >= context->getMaximumCombinedUniformBufferBindings())
{ {
return gl::error(GL_INVALID_VALUE); return gl::error(GL_INVALID_VALUE);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment