Mesa (master): mesa: inline bind_vertex_array() helper
Timothy Arceri
tarceri at kemper.freedesktop.org
Wed Apr 26 00:25:19 UTC 2017
Module: Mesa
Branch: master
Commit: f38845b9cbc892e09086c6d1a0d97eb516f1de83
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f38845b9cbc892e09086c6d1a0d97eb516f1de83
Author: Timothy Arceri <tarceri at itsqueeze.com>
Date: Sat Apr 22 17:10:09 2017 +1000
mesa: inline bind_vertex_array() helper
The previous commit removed the only other user of this function.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
---
src/mesa/main/arrayobj.c | 23 ++++++-----------------
1 file changed, 6 insertions(+), 17 deletions(-)
diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c
index 10502015cf..c52a07b306 100644
--- a/src/mesa/main/arrayobj.c
+++ b/src/mesa/main/arrayobj.c
@@ -417,19 +417,19 @@ _mesa_all_buffers_are_unmapped(const struct gl_vertex_array_object *vao)
/**
- * Helper for _mesa_BindVertexArray().
- * \param genRequired specifies behavour when id was not generated with
- * glGenVertexArrays().
+ * ARB version of glBindVertexArray()
*/
-static void
-bind_vertex_array(struct gl_context *ctx, GLuint id)
+void GLAPIENTRY
+_mesa_BindVertexArray( GLuint id )
{
+ GET_CURRENT_CONTEXT(ctx);
+
struct gl_vertex_array_object * const oldObj = ctx->Array.VAO;
struct gl_vertex_array_object *newObj = NULL;
assert(oldObj != NULL);
- if ( oldObj->Name == id )
+ if (oldObj->Name == id)
return; /* rebinding the same array object- no change */
/*
@@ -483,17 +483,6 @@ bind_vertex_array(struct gl_context *ctx, GLuint id)
/**
- * ARB version of glBindVertexArray()
- */
-void GLAPIENTRY
-_mesa_BindVertexArray( GLuint id )
-{
- GET_CURRENT_CONTEXT(ctx);
- bind_vertex_array(ctx, id);
-}
-
-
-/**
* Delete a set of array objects.
*
* \param n Number of array objects to delete.
More information about the mesa-commit
mailing list