aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/bufferobj.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-01-09 16:34:28 +0100
committermarha <marha@users.sourceforge.net>2012-01-09 16:34:28 +0100
commita1e97828c89278770cb249039ec92d959440c640 (patch)
treef3d4ed7e3f3d589c606f01b3c9e6de03d638e2d3 /mesalib/src/mesa/main/bufferobj.c
parent7e9f4ea970e8f7008c212d7d3918a974eb0066da (diff)
downloadvcxsrv-a1e97828c89278770cb249039ec92d959440c640.tar.gz
vcxsrv-a1e97828c89278770cb249039ec92d959440c640.tar.bz2
vcxsrv-a1e97828c89278770cb249039ec92d959440c640.zip
xwininfo libX11 mesa mkfontscale xkeyboard-config git update 9 jan 2011
Diffstat (limited to 'mesalib/src/mesa/main/bufferobj.c')
-rw-r--r--mesalib/src/mesa/main/bufferobj.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mesalib/src/mesa/main/bufferobj.c b/mesalib/src/mesa/main/bufferobj.c
index 462519895..5f8071f58 100644
--- a/mesalib/src/mesa/main/bufferobj.c
+++ b/mesalib/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);