svga: fix incorrect memcpy src in svga_buffer_upload_piecewise()

As we march over the source buffer we're uploading in pieces, we
need to memcpy from the current offset, not the start of the buffer.
Fixes graphical corruption when drawing very large vertex buffers.

Cc: "9.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Matthew McClure <mcclurem@vmware.com>
This commit is contained in:
Brian Paul
2013-10-03 11:51:14 -06:00
parent d164d50a85
commit a50c5f8d24
@@ -502,7 +502,7 @@ svga_buffer_upload_piecewise(struct svga_screen *ss,
PIPE_TRANSFER_DISCARD_RANGE);
assert(map);
if (map) {
memcpy(map, sbuf->swbuf, size);
memcpy(map, (const char *) sbuf->swbuf + offset, size);
sws->buffer_unmap(sws, hwbuf);
}