summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-01-07 14:16:27 -0700
committerBrian Paul <[email protected]>2012-01-07 14:16:27 -0700
commit4c502e05e803dc45bb01510683fb86cf7f30e431 (patch)
tree557210e9cd318da5d3dce767fd3323dfdfc2c8e5 /src/mesa
parent2bdf93449a0b00145fabdd3f7866acbafa18e734 (diff)
mesa: add/update comments in _mesa_copy_buffer_subdata()
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/bufferobj.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 462519895a4..5f8071f587f 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -504,7 +504,7 @@ _mesa_copy_buffer_subdata(struct gl_context *ctx,
{
void *srcPtr, *dstPtr;
- /* buffer should not already be mapped */
+ /* the buffers should not be mapped */
assert(!_mesa_bufferobj_mapped(src));
assert(!_mesa_bufferobj_mapped(dst));
@@ -514,6 +514,9 @@ _mesa_copy_buffer_subdata(struct gl_context *ctx,
(GL_MAP_WRITE_BIT |
GL_MAP_INVALIDATE_RANGE_BIT), dst);
+ /* Note: the src and dst regions will never overlap. Trying to do so
+ * would generate GL_INVALID_VALUE earlier.
+ */
if (srcPtr && dstPtr)
memcpy(dstPtr, srcPtr, size);