Mesa (master): mesa: Remove unused function _mesa_append_uniform

Ian Romanick idr at kemper.freedesktop.org
Fri Oct 7 16:41:06 PDT 2011


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

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Fri Aug 26 22:58:51 2011 -0700

mesa: Remove unused function _mesa_append_uniform

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Brian Paul <brianp at vmware.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/program/prog_uniform.c |   74 ---------------------------------------
 src/mesa/program/prog_uniform.h |    4 --
 2 files changed, 0 insertions(+), 78 deletions(-)

diff --git a/src/mesa/program/prog_uniform.c b/src/mesa/program/prog_uniform.c
index 28acb88..d0b25e5 100644
--- a/src/mesa/program/prog_uniform.c
+++ b/src/mesa/program/prog_uniform.c
@@ -56,80 +56,6 @@ _mesa_free_uniform_list(struct gl_uniform_list *list)
 }
 
 
-struct gl_uniform *
-_mesa_append_uniform(struct gl_uniform_list *list,
-                     const char *name, GLenum target, GLuint progPos)
-{
-   const GLuint oldNum = list->NumUniforms;
-   struct gl_uniform *uniform;
-   GLint index;
-
-   assert(target == GL_VERTEX_PROGRAM_ARB ||
-          target == GL_FRAGMENT_PROGRAM_ARB ||
-          target == MESA_GEOMETRY_PROGRAM);
-
-   index = _mesa_lookup_uniform(list, name);
-   if (index < 0) {
-      /* not found - append to list */
-
-      if (oldNum + 1 > list->Size) {
-         /* Need to grow the list array (alloc some extra) */
-         list->Size += 4;
-
-         /* realloc arrays */
-         list->Uniforms = (struct gl_uniform *)
-            _mesa_realloc(list->Uniforms,
-                          oldNum * sizeof(struct gl_uniform),
-                          list->Size * sizeof(struct gl_uniform));
-      }
-
-      if (!list->Uniforms) {
-         /* out of memory */
-         list->NumUniforms = 0;
-         list->Size = 0;
-         return GL_FALSE;
-      }
-
-      uniform = list->Uniforms + oldNum;
-
-      uniform->Name = _mesa_strdup(name);
-      uniform->VertPos = -1;
-      uniform->FragPos = -1;
-      uniform->GeomPos = -1;
-      uniform->Initialized = GL_FALSE;
-
-      list->NumUniforms++;
-   }
-   else {
-      /* found */
-      uniform = list->Uniforms + index;
-   }
-
-   /* update position for the vertex or fragment program */
-   if (target == GL_VERTEX_PROGRAM_ARB) {
-      if (uniform->VertPos != -1) {
-         /* this uniform is already in the list - that shouldn't happen */
-         return GL_FALSE;
-      }
-      uniform->VertPos = progPos;
-   } else if (target == GL_FRAGMENT_PROGRAM_ARB) {
-      if (uniform->FragPos != -1) {
-         /* this uniform is already in the list - that shouldn't happen */
-         return GL_FALSE;
-      }
-      uniform->FragPos = progPos;
-   } else {
-      if (uniform->GeomPos != -1) {
-         /* this uniform is already in the list - that shouldn't happen */
-         return GL_FALSE;
-      }
-      uniform->GeomPos = progPos;
-   }
-
-   return uniform;
-}
-
-
 /**
  * Return the location/index of the named uniform in the uniform list,
  * or -1 if not found.
diff --git a/src/mesa/program/prog_uniform.h b/src/mesa/program/prog_uniform.h
index 67f7800..83cd307 100644
--- a/src/mesa/program/prog_uniform.h
+++ b/src/mesa/program/prog_uniform.h
@@ -72,10 +72,6 @@ _mesa_new_uniform_list(void);
 extern void
 _mesa_free_uniform_list(struct gl_uniform_list *list);
 
-extern struct gl_uniform *
-_mesa_append_uniform(struct gl_uniform_list *list,
-                     const char *name, GLenum target, GLuint progPos);
-
 extern GLint
 _mesa_lookup_uniform(const struct gl_uniform_list *list, const char *name);
 



More information about the mesa-commit mailing list