Mesa (master): gallium/u_threaded: fix uploading user indices with start != 0

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Feb 28 01:10:26 UTC 2020


Module: Mesa
Branch: master
Commit: 28d75fc286fd761cf1de98aa9c57dd4263d5321a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=28d75fc286fd761cf1de98aa9c57dd4263d5321a

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Fri Feb 14 15:28:28 2020 -0500

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

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3990>

---

 src/gallium/auxiliary/util/u_threaded_context.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c
index daed6c6950b..c1f74e70e32 100644
--- a/src/gallium/auxiliary/util/u_threaded_context.c
+++ b/src/gallium/auxiliary/util/u_threaded_context.c
@@ -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;



More information about the mesa-commit mailing list