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

Author: Samuel Pitoiset <[email protected]>
Date:   Thu Jul 20 11:53:00 2017 +0200

mesa: inline save_array_object()

No need to check if ID is not 0 because _mesa_HashFindFreeKeyBlock()
can't generate this value.

Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>

---

 src/mesa/main/arrayobj.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c
index 5f6450a042..6e231156fa 100644
--- a/src/mesa/main/arrayobj.c
+++ b/src/mesa/main/arrayobj.c
@@ -298,19 +298,6 @@ _mesa_initialize_vao(struct gl_context *ctx,
 
 
 /**
- * Add the given array object to the array object pool.
- */
-static void
-save_array_object(struct gl_context *ctx, struct gl_vertex_array_object *vao)
-{
-   if (vao->Name > 0) {
-      /* insert into hash table */
-      _mesa_HashInsertLocked(ctx->Array.Objects, vao->Name, vao);
-   }
-}
-
-
-/**
  * Updates the derived gl_vertex_arrays when a gl_vertex_attrib_array
  * or a gl_vertex_buffer_binding has changed.
  */
@@ -546,7 +533,7 @@ gen_vertex_arrays(struct gl_context *ctx, GLsizei n, GLuint 
*arrays,
          return;
       }
       obj->EverBound = create;
-      save_array_object(ctx, obj);
+      _mesa_HashInsertLocked(ctx->Array.Objects, obj->Name, obj);
       arrays[i] = first + i;
    }
 }

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to