summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/arrayobj.c
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-07-20 11:52:59 +0200
committerSamuel Pitoiset <[email protected]>2017-07-20 16:14:26 +0200
commit015c6eba525d57682390bb08cc36977841f59e98 (patch)
treeab04fb803467ff2df949d6b367e8c0a7b9fd52f3 /src/mesa/main/arrayobj.c
parentea13aa853053ffafb0fc13e2df5b66af7b924a7c (diff)
mesa: inline remove_array_object()
No need to check if ID is not 0 because _mesa_lookup_vao() already prevents this to happen. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/main/arrayobj.c')
-rw-r--r--src/mesa/main/arrayobj.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c
index ce0050ace33..5f6450a042a 100644
--- a/src/mesa/main/arrayobj.c
+++ b/src/mesa/main/arrayobj.c
@@ -311,20 +311,6 @@ save_array_object(struct gl_context *ctx, struct gl_vertex_array_object *vao)
/**
- * Remove the given array object from the array object pool.
- * Do not deallocate the array object though.
- */
-static void
-remove_array_object(struct gl_context *ctx, struct gl_vertex_array_object *vao)
-{
- if (vao->Name > 0) {
- /* remove from hash table */
- _mesa_HashRemoveLocked(ctx->Array.Objects, vao->Name);
- }
-}
-
-
-/**
* Updates the derived gl_vertex_arrays when a gl_vertex_attrib_array
* or a gl_vertex_buffer_binding has changed.
*/
@@ -504,7 +490,7 @@ _mesa_DeleteVertexArrays(GLsizei n, const GLuint *ids)
_mesa_BindVertexArray(0);
/* The ID is immediately freed for re-use */
- remove_array_object(ctx, obj);
+ _mesa_HashRemoveLocked(ctx->Array.Objects, obj->Name);
if (ctx->Array.LastLookedUpVAO == obj)
_mesa_reference_vao(ctx, &ctx->Array.LastLookedUpVAO, NULL);