assert((~vao_enabled & vao->_Enabled) == 0);
/* Bind the buffer object */
+ const GLuint stride = exec->vtx.vertex_size*sizeof(GLfloat);
+ assert(stride <= ctx->Const.MaxVertexAttribStride);
_mesa_bind_vertex_buffer(ctx, vao, 0, exec->vtx.bufferobj, buffer_offset,
- exec->vtx.vertex_size*sizeof(GLfloat), false);
+ stride, false);
/* Retrieve the mapping from VBO_ATTRIB to VERT_ATTRIB space
* Note that the position/generic0 aliasing is done in the VAO.
const GLenum16 type = exec->vtx.attrtype[vbo_attr];
const GLuint offset = (GLuint)((GLbyte *)exec->vtx.attrptr[vbo_attr] -
(GLbyte *)exec->vtx.vertex);
+ assert(offset <= ctx->Const.MaxVertexAttribRelativeOffset);
/* Set and enable */
_vbo_set_attrib_format(ctx, vao, vao_attr, buffer_offset,
*vao = _mesa_new_vao(ctx, ~((GLuint)0));
/* Bind the buffer object at binding point 0 */
+ assert(stride <= ctx->Const.MaxVertexAttribStride);
_mesa_bind_vertex_buffer(ctx, *vao, 0, bo, buffer_offset, stride, false);
/* Retrieve the mapping from VBO_ATTRIB to VERT_ATTRIB space
while (mask) {
const int vao_attr = u_bit_scan(&mask);
const GLubyte vbo_attr = vao_to_vbo_map[vao_attr];
+ assert(offset[vbo_attr] <= ctx->Const.MaxVertexAttribRelativeOffset);
_vbo_set_attrib_format(ctx, *vao, vao_attr, buffer_offset,
size[vbo_attr], type[vbo_attr], offset[vbo_attr]);