summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-11-19 15:17:56 -0700
committerBrian Paul <[email protected]>2009-11-19 15:17:56 -0700
commit2198497203ec427f836978098028abf3350e5e57 (patch)
treeb57f6d1af24f2b5e5816126db2d6216fc16130f2 /src/mesa/vbo
parentdc41d62250ce51f28e94f1d365836ac9f2ff8907 (diff)
vbo: added recursion check in vbo_exec_FlushVertices()
Diffstat (limited to 'src/mesa/vbo')
-rw-r--r--src/mesa/vbo/vbo_exec_api.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
index f72d2d84f38..c90565eae8c 100644
--- a/src/mesa/vbo/vbo_exec_api.c
+++ b/src/mesa/vbo/vbo_exec_api.c
@@ -867,15 +867,27 @@ void vbo_exec_FlushVertices_internal( GLcontext *ctx, GLboolean unmap )
}
-
+/**
+ * \param flags bitmask of FLUSH_STORED_VERTICES, FLUSH_UPDATE_CURRENT
+ */
void vbo_exec_FlushVertices( GLcontext *ctx, GLuint flags )
{
struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
+#ifdef DEBUG
+ /* debug check: make sure we don't get called recursively */
+ static GLuint callDepth = 0;
+ callDepth++;
+ assert(callDepth == 1);
+#endif
+
if (0) _mesa_printf("%s\n", __FUNCTION__);
if (exec->ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END) {
if (0) _mesa_printf("%s - inside begin/end\n", __FUNCTION__);
+#ifdef DEBUG
+ callDepth--;
+#endif
return;
}
@@ -889,6 +901,10 @@ void vbo_exec_FlushVertices( GLcontext *ctx, GLuint flags )
}
exec->ctx->Driver.NeedFlush &= ~flags;
+
+#ifdef DEBUG
+ callDepth--;
+#endif
}