mesa: inline bind_vertex_array() helper
authorTimothy Arceri <tarceri@itsqueeze.com>
Sat, 22 Apr 2017 07:10:09 +0000 (17:10 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Wed, 26 Apr 2017 00:03:06 +0000 (10:03 +1000)
The previous commit removed the only other user of this function.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mesa/main/arrayobj.c

index 1050201..c52a07b 100644 (file)
@@ -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.