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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user