mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
mesa: Remove unused gl_shader_program::Attributes
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
84d71a07bb
commit
a339ee8d85
3 changed files with 2 additions and 14 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue