afe3929618
When determining the maximum number of layers we also need to take into account GL_MAX_VERTEX_ATTRIBS on GLES2. Cogl needs one vertex attrib for each texture unit plus two for the position and color.