projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2bdf934
)
mesa: add/update comments in _mesa_copy_buffer_subdata()
author
Brian Paul
<brianp@vmware.com>
Sat, 7 Jan 2012 21:16:27 +0000
(14:16 -0700)
committer
Brian Paul
<brianp@vmware.com>
Sat, 7 Jan 2012 21:16:27 +0000
(14:16 -0700)
src/mesa/main/bufferobj.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/bufferobj.c
b/src/mesa/main/bufferobj.c
index 462519895a4b94304aeb7dee21c48dab584eb1df..5f8071f587f6e2f798f4eea95cae3eb500ca8f67 100644
(file)
--- 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);