st/mesa: don't compute index buffer bounds for per-instance data
authorMarek Olšák <maraeo@gmail.com>
Sun, 25 Sep 2011 12:19:46 +0000 (14:19 +0200)
committerMarek Olšák <maraeo@gmail.com>
Wed, 28 Sep 2011 23:03:36 +0000 (01:03 +0200)
src/mesa/state_tracker/st_draw.c

index 39a947d..5748020 100644 (file)
@@ -267,8 +267,8 @@ st_pipe_vertex_format(GLenum type, GLuint size, GLenum format,
 
 
 /**
- * This is very similar to vbo_all_varyings_in_vbos() but we test
- * the stride.  See bug 38626.
+ * This is very similar to vbo_all_varyings_in_vbos() but we are
+ * only interested in per-vertex data.  See bug 38626.
  */
 static GLboolean
 all_varyings_in_vbos(const struct gl_client_array *arrays[])
@@ -276,7 +276,9 @@ all_varyings_in_vbos(const struct gl_client_array *arrays[])
    GLuint i;
    
    for (i = 0; i < VERT_ATTRIB_MAX; i++)
-      if (arrays[i]->StrideB && !_mesa_is_bufferobj(arrays[i]->BufferObj))
+      if (arrays[i]->StrideB &&
+          !arrays[i]->InstanceDivisor &&
+          !_mesa_is_bufferobj(arrays[i]->BufferObj))
         return GL_FALSE;
 
    return GL_TRUE;