const GLuint mesaAttr = vp->index_to_input[attr];
const struct gl_client_array *array = arrays[mesaAttr];
unsigned src_offset = (unsigned) (array->Ptr - low_addr);
- GLuint element_size = array->_ElementSize;
- assert(element_size == array->Size * _mesa_sizeof_type(array->Type));
+ assert(array->_ElementSize ==
+ _mesa_bytes_per_vertex_attrib(array->Size, array->Type));
velements[attr].src_offset = src_offset;
velements[attr].instance_divisor = array->InstanceDivisor;
struct gl_buffer_object *bufobj = array->BufferObj;
GLsizei stride = array->StrideB;
- assert(array->_ElementSize == array->Size * _mesa_sizeof_type(array->Type));
+ assert(array->_ElementSize ==
+ _mesa_bytes_per_vertex_attrib(array->Size, array->Type));
if (_mesa_is_bufferobj(bufobj)) {
/* Attribute data is in a VBO.