From 24409ba1968cc49cbde6a111464c91271babc68a Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 18 Aug 2011 15:27:18 -0700 Subject: mesa: Determine GL_ACTIVE_ATTRIBUTE_MAX_LENGTH by walking the GLSL IR. Signed-off-by: Ian Romanick Reviewed-by: Kenneth Graunke --- src/mesa/main/shaderapi.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/mesa/main/shaderapi.c') diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 657de66e9a1..9e0ed9c6977 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -538,7 +538,6 @@ get_handle(struct gl_context *ctx, GLenum pname) static void get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, GLint *params) { - const struct gl_program_parameter_list *attribs; struct gl_shader_program *shProg = _mesa_lookup_shader_program(ctx, program); @@ -547,11 +546,6 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, GLint *param return; } - if (shProg->VertexProgram) - attribs = shProg->VertexProgram->Base.Attributes; - else - attribs = NULL; - switch (pname) { case GL_DELETE_STATUS: *params = shProg->DeletePending; @@ -572,7 +566,7 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, GLint *param *params = _mesa_count_active_attribs(shProg); break; case GL_ACTIVE_ATTRIBUTE_MAX_LENGTH: - *params = _mesa_longest_parameter_name(attribs, PROGRAM_INPUT) + 1; + *params = _mesa_longest_attribute_name_length(shProg); break; case GL_ACTIVE_UNIFORMS: *params = shProg->Uniforms ? shProg->Uniforms->NumUniforms : 0; -- cgit v1.2.3