diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index 1ab3cd6..7ca384e 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -264,6 +264,7 @@ is_interleaved_arrays(const struct st_vertex_program *vp, GLuint attr; const struct gl_buffer_object *firstBufObj = NULL; GLint firstStride = -1; + GLint firstAddr = -1; GLuint num_client_arrays = 0; const GLubyte *client_addr = NULL; @@ -274,8 +275,9 @@ is_interleaved_arrays(const struct st_vertex_program *vp, if (firstStride < 0) { firstStride = stride; + firstAddr = arrays[mesaAttr]->Ptr; } - else if (firstStride != stride) { + else if (firstStride != stride || abs(arrays[mesaAttr]->Ptr - firstAddr) > firstStride) { return GL_FALSE; }