Mesa (master): vbo: make vbo_exec_FlushVertices_internal() static

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


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

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

vbo: make vbo_exec_FlushVertices_internal() static

---

 src/mesa/vbo/vbo_exec.h     |    1 -
 src/mesa/vbo/vbo_exec_api.c |   41 ++++++++++++++++++++---------------------
 2 files changed, 20 insertions(+), 22 deletions(-)

diff --git a/src/mesa/vbo/vbo_exec.h b/src/mesa/vbo/vbo_exec.h
index d56c91c..ca100e4 100644
--- a/src/mesa/vbo/vbo_exec.h
+++ b/src/mesa/vbo/vbo_exec.h
@@ -152,7 +152,6 @@ struct vbo_exec_context
 void vbo_exec_init( struct gl_context *ctx );
 void vbo_exec_destroy( struct gl_context *ctx );
 void vbo_exec_invalidate_state( struct gl_context *ctx, GLuint new_state );
-void vbo_exec_FlushVertices_internal( struct gl_context *ctx, GLboolean unmap );
 
 void vbo_exec_BeginVertices( struct gl_context *ctx );
 void vbo_exec_FlushVertices( struct gl_context *ctx, GLuint flags );
diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
index 0e1fb3d..19bcd0b 100644
--- a/src/mesa/vbo/vbo_exec_api.c
+++ b/src/mesa/vbo/vbo_exec_api.c
@@ -533,6 +533,24 @@ static void GLAPIENTRY vbo_exec_EvalPoint2( GLint i, GLint j )
 
 
 /**
+ * Flush (draw) vertices.
+ * \param  unmap - leave VBO unmapped after flushing?
+ */
+static void
+vbo_exec_FlushVertices_internal(struct vbo_exec_context *exec, GLboolean unmap)
+{
+   if (exec->vtx.vert_count || unmap) {
+      vbo_exec_vtx_flush( exec, unmap );
+   }
+
+   if (exec->vtx.vertex_size) {
+      vbo_exec_copy_to_current( exec );
+      reset_attrfv( exec );
+   }
+}
+
+
+/**
  * Called via glBegin.
  */
 static void GLAPIENTRY vbo_exec_Begin( GLenum mode )
@@ -558,7 +576,7 @@ static void GLAPIENTRY vbo_exec_Begin( GLenum mode )
        * begin/end pairs.
        */
       if (exec->vtx.vertex_size && !exec->vtx.attrsz[0]) 
-	 vbo_exec_FlushVertices_internal( ctx, GL_FALSE );
+	 vbo_exec_FlushVertices_internal(exec, GL_FALSE);
 
       i = exec->vtx.prim_count++;
       exec->vtx.prim[i].mode = mode;
@@ -926,25 +944,6 @@ void vbo_exec_BeginVertices( struct gl_context *ctx )
 
 
 /**
- * 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;
-
-   if (exec->vtx.vert_count || unmap) {
-      vbo_exec_vtx_flush( exec, unmap );
-   }
-
-   if (exec->vtx.vertex_size) {
-      vbo_exec_copy_to_current( exec );
-      reset_attrfv( exec );
-   }
-}
-
-
-/**
  * \param flags  bitmask of FLUSH_STORED_VERTICES, FLUSH_UPDATE_CURRENT
  */
 void vbo_exec_FlushVertices( struct gl_context *ctx, GLuint flags )
@@ -966,7 +965,7 @@ void vbo_exec_FlushVertices( struct gl_context *ctx, GLuint flags )
    }
 
    /* Flush (draw), and make sure VBO is left unmapped when done */
-   vbo_exec_FlushVertices_internal( ctx, GL_TRUE );
+   vbo_exec_FlushVertices_internal(exec, GL_TRUE);
 
    /* Need to do this to ensure BeginVertices gets called again:
     */




More information about the mesa-commit mailing list