summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2013-10-03 11:51:14 -0600
committerBrian Paul <[email protected]>2013-10-04 10:25:37 -0600
commita50c5f8d24e860baa15dd75b44b9a20af60cebf8 (patch)
tree1f82d3fed72521a5074fbcf66d807b1cdf4d9721 /src/gallium/drivers
parentd164d50a85e5c42a8ed0c5082564f69e13aa09e0 (diff)
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" <[email protected]> Reviewed-by: Matthew McClure <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/svga/svga_resource_buffer_upload.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_resource_buffer_upload.c b/src/gallium/drivers/svga/svga_resource_buffer_upload.c
index 55e66134f60..e6bbc007788 100644
--- a/src/gallium/drivers/svga/svga_resource_buffer_upload.c
+++ b/src/gallium/drivers/svga/svga_resource_buffer_upload.c
@@ -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);
}