Mesa (master): vbo: remove old debug code, add comments

Brian Paul brianp at kemper.freedesktop.org
Mon Feb 21 22:16:21 UTC 2011


Module: Mesa
Branch: master
Commit: bbd756e824c8d37bc7f8e9138466e8cad067afc5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bbd756e824c8d37bc7f8e9138466e8cad067afc5

Author: Brian Paul <brianp at vmware.com>
Date:   Mon Feb 21 15:11:44 2011 -0700

vbo: remove old debug code, add comments

---

 src/mesa/vbo/vbo_exec_api.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
index 7ad8e29..0e1fb3d 100644
--- a/src/mesa/vbo/vbo_exec_api.c
+++ b/src/mesa/vbo/vbo_exec_api.c
@@ -913,16 +913,22 @@ void vbo_exec_vtx_destroy( struct vbo_exec_context *exec )
    _mesa_reference_buffer_object(ctx, &exec->vtx.bufferobj, NULL);
 }
 
+
 void vbo_exec_BeginVertices( struct gl_context *ctx )
 {
    struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
-   if (0) printf("%s\n", __FUNCTION__);
+
    vbo_exec_vtx_map( exec );
 
    assert((exec->ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT) == 0);
    exec->ctx->Driver.NeedFlush |= FLUSH_UPDATE_CURRENT;
 }
 
+
+/**
+ * Flush (draw) vertices.
+ * \param  unmap - leave VBO unmapped after flushing?
+ */
 void vbo_exec_FlushVertices_internal( struct gl_context *ctx, GLboolean unmap )
 {
    struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
@@ -951,10 +957,7 @@ void vbo_exec_FlushVertices( struct gl_context *ctx, GLuint flags )
    assert(exec->flush_call_depth == 1);
 #endif
 
-   if (0) printf("%s\n", __FUNCTION__);
-
    if (exec->ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END) {
-      if (0) printf("%s - inside begin/end\n", __FUNCTION__);
 #ifdef DEBUG
       exec->flush_call_depth--;
       assert(exec->flush_call_depth == 0);
@@ -962,6 +965,7 @@ void vbo_exec_FlushVertices( struct gl_context *ctx, GLuint flags )
       return;
    }
 
+   /* Flush (draw), and make sure VBO is left unmapped when done */
    vbo_exec_FlushVertices_internal( ctx, GL_TRUE );
 
    /* Need to do this to ensure BeginVertices gets called again:




More information about the mesa-commit mailing list