summaryrefslogtreecommitdiff
path: root/src/mesa/vbo/vbo_exec_array.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2011-02-22 14:31:15 -0700
committerBrian Paul <brianp@vmware.com>2011-02-22 14:32:37 -0700
commit6d1f28d6c045f768da2eee779006535acf382cce (patch)
tree43aefa0e776d28563ab9aecd0786eada416d448f /src/mesa/vbo/vbo_exec_array.c
parentbcd017f16fd00723a00a212775e22c55fac2af27 (diff)
vbo: added vbo_check_buffers_are_unmapped() debug function
Diffstat (limited to 'src/mesa/vbo/vbo_exec_array.c')
-rw-r--r--src/mesa/vbo/vbo_exec_array.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index 25de140ecc..457343a1a5 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -59,6 +59,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.
* If primitive restart is enabled, we need to ignore restart