mesa: Remove unused gl_shader_program::Attributes
authorIan Romanick <ian.d.romanick@intel.com>
Thu, 18 Aug 2011 22:08:51 +0000 (15:08 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 4 Oct 2011 20:17:47 +0000 (13:17 -0700)
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/main/mtypes.h
src/mesa/main/shader_query.cpp
src/mesa/main/shaderobj.c

index d68a589ab4a3dd8274970f61b2fbd706caf420b7..bd9de8a36917406eec4aa7ae8a4d4172854fb203 100644 (file)
@@ -2155,7 +2155,6 @@ struct gl_shader_program
     *
     * \sa gl_program::Attributes
     */
-   struct gl_program_parameter_list *Attributes;
    struct string_to_uint_map *AttributeBindings;
 
    /** Transform feedback varyings */
index 3a40a243ffba65fd0336a99c50a0f90a48491d14..636ab0f8d0b35e42fb33b7f04cefd93f8da54d4b 100644 (file)
@@ -68,16 +68,11 @@ _mesa_BindAttribLocationARB(GLhandleARB program, GLuint index,
       return;
    }
 
-   /* this will replace the current value if it's already in the list */
-   /* Add VERT_ATTRIB_GENERIC0 because that's how the linker differentiates
+   /* Replace the current value if it's already in the list.  Add
+    * VERT_ATTRIB_GENERIC0 because that's how the linker differentiates
     * between built-in attributes and user-defined attributes.
     */
    shProg->AttributeBindings->put(index + VERT_ATTRIB_GENERIC0, name);
-   i = _mesa_add_attribute(shProg->Attributes, name, size, datatype, index);
-   if (i < 0) {
-      _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBindAttribLocation");
-      return;
-   }
 
    /*
     * Note that this attribute binding won't go into effect until
index 322f4290656dcc5c40eb6db7d6cfca5c56f358b8..1eba75697f7070c1ad42d592a27a4c102b240044 100644 (file)
@@ -239,7 +239,6 @@ _mesa_init_shader_program(struct gl_context *ctx, struct gl_shader_program *prog
 {
    prog->Type = GL_SHADER_PROGRAM_MESA;
    prog->RefCount = 1;
-   prog->Attributes = _mesa_new_parameter_list();
 
    prog->AttributeBindings = string_to_uint_map_ctor();
 
@@ -311,11 +310,6 @@ _mesa_free_shader_program_data(struct gl_context *ctx,
 
    _mesa_clear_shader_program_data(ctx, shProg);
 
-   if (shProg->Attributes) {
-      _mesa_free_parameter_list(shProg->Attributes);
-      shProg->Attributes = NULL;
-   }
-
    if (shProg->AttributeBindings) {
       string_to_uint_map_dtor(shProg->AttributeBindings);
       shProg->AttributeBindings = NULL;