vbo: s/[0]/[VERT_ATTRIB_POS]/ in recalculate_input_bindings()
authorBrian Paul <brianp@vmware.com>
Wed, 24 Jan 2018 20:31:11 +0000 (13:31 -0700)
committerBrian Paul <brianp@vmware.com>
Mon, 29 Jan 2018 15:35:14 +0000 (08:35 -0700)
Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
src/mesa/vbo/vbo_exec_array.c

index b11da09dd1cbcb9912383d9c761b08ad2959ec82..43362db2c7c0bb62b9d100d12e85b909d14e042b 100644 (file)
@@ -369,11 +369,11 @@ recalculate_input_bindings(struct gl_context *ctx)
        */
       if (ctx->API == API_OPENGL_COMPAT) {
          if (array[VERT_ATTRIB_GENERIC0].Enabled)
-            inputs[0] = &vertexAttrib[VERT_ATTRIB_GENERIC0];
+            inputs[VERT_ATTRIB_POS] = &vertexAttrib[VERT_ATTRIB_GENERIC0];
          else if (array[VERT_ATTRIB_POS].Enabled)
-            inputs[0] = &vertexAttrib[VERT_ATTRIB_POS];
+            inputs[VERT_ATTRIB_POS] = &vertexAttrib[VERT_ATTRIB_POS];
          else {
-            inputs[0] = &vbo->currval[VBO_ATTRIB_GENERIC0];
+            inputs[VERT_ATTRIB_POS] = &vbo->currval[VBO_ATTRIB_GENERIC0];
             const_inputs |= VERT_BIT_POS;
          }