util/primconvert: take ib offset into account
authorIlia Mirkin <imirkin@alum.mit.edu>
Thu, 4 Dec 2014 23:56:36 +0000 (18:56 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Fri, 5 Dec 2014 12:23:48 +0000 (07:23 -0500)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.4 10.3" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
src/gallium/auxiliary/indices/u_primconvert.c

index 539ca538cc13d33e336190c8a7691518060677ea..4632781900687d3ccf1525a6532017935d3bbfe1 100644 (file)
@@ -137,7 +137,7 @@ util_primconvert_draw_vbo(struct primconvert_context *pc,
       src = ib->user_buffer;
       if (!src) {
          src = pipe_buffer_map(pc->pipe, ib->buffer,
-                               PIPE_TRANSFER_READ, &src_transfer);
+                               PIPE_TRANSFER_READ, &src_transfer) + ib->offset;
       }
    }
    else {