mesa: Set correct array element in vbo_exec_vtx_init.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 15 Sep 2014 06:45:38 +0000 (23:45 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 25 Sep 2014 06:14:23 +0000 (23:14 -0700)
I'm not familiar with this code, but this sure appears to be a typo.
It looks like the intent is to set each array element, not arrays[0]
each time.  Notably, the loop just below uses "array", not "arrays".

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Cc: mesa-stable@lists.freedesktop.org
src/mesa/vbo/vbo_exec_api.c

index 74aec127c5ccc8edda0bc2e5386feffd0a567fa2..2871100aeabf2fc6b12ce6ac9fe0ea0d4b99b694 100644 (file)
@@ -1067,7 +1067,7 @@ void vbo_exec_vtx_init( struct vbo_exec_context *exec )
          struct gl_client_array *array;
          array = &arrays[VERT_ATTRIB_FF(i)];
          array->BufferObj = NULL;
-         _mesa_reference_buffer_object(ctx, &arrays->BufferObj,
+         _mesa_reference_buffer_object(ctx, &array->BufferObj,
                                  vbo->currval[VBO_ATTRIB_POS+i].BufferObj);
       }