aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/vbo/vbo_exec_array.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-02-23 07:34:10 +0000
committermarha <marha@users.sourceforge.net>2011-02-23 07:34:10 +0000
commite8d899178e9ebe174e6b4a53297d3dfced8003f0 (patch)
tree407c4e3c78b0cc28e95e7f607d02975e2155a46f /mesalib/src/mesa/vbo/vbo_exec_array.c
parentaa5b2e956fcc17b27d0f20ba7af65c52b34ef135 (diff)
parentfbb8c9a149047ccb27e749053c83acf94dedcbf9 (diff)
downloadvcxsrv-e8d899178e9ebe174e6b4a53297d3dfced8003f0.tar.gz
vcxsrv-e8d899178e9ebe174e6b4a53297d3dfced8003f0.tar.bz2
vcxsrv-e8d899178e9ebe174e6b4a53297d3dfced8003f0.zip
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/vbo/vbo_exec_array.c')
-rw-r--r--mesalib/src/mesa/vbo/vbo_exec_array.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/mesalib/src/mesa/vbo/vbo_exec_array.c b/mesalib/src/mesa/vbo/vbo_exec_array.c
index 65a0642f1..1d7fe4d3f 100644
--- a/mesalib/src/mesa/vbo/vbo_exec_array.c
+++ b/mesalib/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