static void reset_attrfv( struct vbo_exec_context *exec );
-/* Close off the last primitive, execute the buffer, restart the
+/**
+ * Close off the last primitive, execute the buffer, restart the
* primitive.
*/
static void vbo_exec_wrap_buffers( struct vbo_exec_context *exec )
}
-/* Deal with buffer wrapping where provoked by the vertex buffer
+/**
+ * Deal with buffer wrapping where provoked by the vertex buffer
* filling up, as opposed to upgrade_vertex().
*/
void vbo_exec_vtx_wrap( struct vbo_exec_context *exec )
}
-/*
+/**
* Copy the active vertex's values to the ctx->Current fields.
*/
static void vbo_exec_copy_to_current( struct vbo_exec_context *exec )
}
-/* Flush existing data, set new attrib size, replay copied vertices.
+/**
+ * Flush existing data, set new attrib size, replay copied vertices.
*/
static void vbo_exec_wrap_upgrade_vertex( struct vbo_exec_context *exec,
GLuint attr,
#if FEATURE_evaluators
-/* Eval
- */
+
static void GLAPIENTRY vbo_exec_EvalCoord1f( GLfloat u )
{
GET_CURRENT_CONTEXT( ctx );
#endif /* FEATURE_evaluators */
-/* Build a list of primitives on the fly. Keep
- * ctx->Driver.CurrentExecPrimitive uptodate as well.
+/**
+ * Called via glBegin.
*/
static void GLAPIENTRY vbo_exec_Begin( GLenum mode )
{
}
+
+/**
+ * Called via glEnd.
+ */
static void GLAPIENTRY vbo_exec_End( void )
{
GET_CURRENT_CONTEXT( ctx );
_mesa_install_exec_vtxfmt( exec->ctx, &exec->vtxfmt );
for (i = 0 ; i < VBO_ATTRIB_MAX ; i++) {
+ ASSERT(i < Elements(exec->vtx.attrsz));
exec->vtx.attrsz[i] = 0;
+ ASSERT(i < Elements(exec->vtx.active_sz));
exec->vtx.active_sz[i] = 0;
+ }
+ for (i = 0 ; i < VERT_ATTRIB_MAX; i++) {
+ ASSERT(i < Elements(exec->vtx.inputs));
+ ASSERT(i < Elements(exec->vtx.arrays));
exec->vtx.inputs[i] = &exec->vtx.arrays[i];
}