diff options
| -rw-r--r-- | src/mesa/tnl/t_array_import.c | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/src/mesa/tnl/t_array_import.c b/src/mesa/tnl/t_array_import.c index 0677a1fd3b..13c5689ceb 100644 --- a/src/mesa/tnl/t_array_import.c +++ b/src/mesa/tnl/t_array_import.c @@ -327,9 +327,10 @@ void _tnl_vb_bind_arrays( GLcontext *ctx, GLint start, GLint end)        }        else if (index >= VERT_ATTRIB_GENERIC1 &&                 index <= VERT_ATTRIB_GENERIC15) { -         if (program && !program->IsNVProgram) { +         const GLuint arrayIndex = index - VERT_ATTRIB_GENERIC0; +         if (program && !program->IsNVProgram && +	     ctx->Array.ArrayObj->VertexAttrib[arrayIndex].Enabled) {              /* GL_ARB_vertex_program: bind a generic attribute array */ -            const GLuint arrayIndex = index - VERT_ATTRIB_GENERIC0;              _tnl_import_attrib(ctx, arrayIndex, GL_FALSE, GL_TRUE);              VB->AttribPtr[index] = &tmp->Attribs[arrayIndex];           } | 
