From: Brian Paul Date: Mon, 21 Feb 2011 22:11:44 +0000 (-0700) Subject: vbo: make vbo_exec_FlushVertices_internal() static X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6f027ba20d6bb642f1d05cc3ad63169e4f3196e1;p=mesa.git vbo: make vbo_exec_FlushVertices_internal() static --- diff --git a/src/mesa/vbo/vbo_exec.h b/src/mesa/vbo/vbo_exec.h index d56c91cd094..ca100e428d2 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 0e1fb3df46d..19bcd0b307d 100644 --- a/src/mesa/vbo/vbo_exec_api.c +++ b/src/mesa/vbo/vbo_exec_api.c @@ -532,6 +532,24 @@ static void GLAPIENTRY vbo_exec_EvalPoint2( GLint i, GLint j ) #endif /* FEATURE_evaluators */ +/** + * 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. */ @@ -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; @@ -925,25 +943,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 */ @@ -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: */