Fix zero-sized buffer copies to complete successfully in BufferCopySubData.

TRAC #22878 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2150 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 6f273e3a
...@@ -8858,7 +8858,11 @@ void __stdcall glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintp ...@@ -8858,7 +8858,11 @@ void __stdcall glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintp
// TODO: Verify that readBuffer and writeBuffer are not currently mapped (GL_INVALID_OPERATION) // TODO: Verify that readBuffer and writeBuffer are not currently mapped (GL_INVALID_OPERATION)
writeBuffer->copyBufferSubData(readBuffer, readOffset, writeOffset, size); // if size is zero, the copy is a successful no-op
if (size > 0)
{
writeBuffer->copyBufferSubData(readBuffer, readOffset, writeOffset, size);
}
} }
} }
catch(std::bad_alloc&) catch(std::bad_alloc&)
......
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