gallium/u_threaded: fix uploading user indices with start != 0

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3990>
This commit is contained in:
Marek Olšák 2020-02-14 15:28:28 -05:00 committed by Marge Bot
parent c9e4dc8d5e
commit 28d75fc286

View file

@ -2097,7 +2097,8 @@ tc_draw_vbo(struct pipe_context *_pipe, const struct pipe_draw_info *info)
* e.g. transfer_unmap and flush partially-uninitialized draw_vbo
* to the driver if it was done afterwards.
*/
u_upload_data(tc->base.stream_uploader, 0, size, 4, info->index.user,
u_upload_data(tc->base.stream_uploader, 0, size, 4,
(uint8_t*)info->index.user + info->start * index_size,
&offset, &buffer);
if (unlikely(!buffer))
return;