unsigned attrib_count = glsl_count_attribute_slots(var->type, true);
int idx = var->data.location;
- if (idx >= VERT_ATTRIB_GENERIC0 && idx <= VERT_ATTRIB_GENERIC15)
+ if (idx >= VERT_ATTRIB_GENERIC0 && idx < VERT_ATTRIB_GENERIC0 + MAX_VERTEX_ATTRIBS)
info->vs.has_vertex_buffers = true;
for (unsigned i = 0; i < attrib_count; ++i) {