From 6d1f28d6c045f768da2eee779006535acf382cce Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 22 Feb 2011 14:31:15 -0700 Subject: vbo: added vbo_check_buffers_are_unmapped() debug function --- src/mesa/vbo/vbo_exec_array.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/mesa/vbo/vbo_exec_array.c') diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index 25de140ecc8..457343a1a5c 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -58,6 +58,23 @@ check_buffers_are_unmapped(const struct gl_client_array **inputs) } +/** + * A debug function that may be called from other parts of Mesa as + * needed during debugging. + */ +void +vbo_check_buffers_are_unmapped(struct gl_context *ctx) +{ + struct vbo_context *vbo = vbo_context(ctx); + struct vbo_exec_context *exec = &vbo->exec; + /* check the current vertex arrays */ + check_buffers_are_unmapped(exec->array.inputs); + /* check the current glBegin/glVertex/glEnd-style VBO */ + assert(!_mesa_bufferobj_mapped(exec->vtx.bufferobj)); +} + + + /** * Compute min and max elements by scanning the index buffer for * glDraw[Range]Elements() calls. -- cgit v1.2.3