vbo: add basevertex when looking up elements for vbo splitting
authorIlia Mirkin <imirkin@alum.mit.edu>
Wed, 17 Aug 2016 21:12:09 +0000 (17:12 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Fri, 19 Aug 2016 00:26:22 +0000 (20:26 -0400)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97351
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/vbo/vbo_split_copy.c

index daa09c211a1cc08795293bca700e1033fd0c73c3..ac4fe9e8127a4845cb3e39432d9b7b0c5e2140bf 100644 (file)
@@ -243,7 +243,7 @@ begin( struct copy_context *copy, GLenum mode, GLboolean begin_flag )
 static GLuint
 elt(struct copy_context *copy, GLuint elt_idx)
 {
-   GLuint elt = copy->srcelt[elt_idx];
+   GLuint elt = copy->srcelt[elt_idx] + copy->prim->basevertex;
    GLuint slot = elt & (ELT_TABLE_SIZE-1);
 
 /*    printf("elt %d\n", elt); */