mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
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:
parent
d164d50a85
commit
a50c5f8d24
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue