Ensure non-zero transform feedback buffers must only be bound with an offset and…

Ensure non-zero transform feedback buffers must only be bound with an offset and size of a multiple of four. 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@2299 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent e6e00792
......@@ -8678,6 +8678,13 @@ void __stdcall glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLi
switch (target)
{
case GL_TRANSFORM_FEEDBACK_BUFFER:
// size and offset must be a multiple of 4
if (buffer != 0 && ((offset % 4) != 0 || (size % 4) != 0))
{
return gl::error(GL_INVALID_VALUE);
}
context->bindIndexedTransformFeedbackBuffer(buffer, index, offset, size);
context->bindGenericTransformFeedbackBuffer(buffer);
break;
......
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