summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shaderapi.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2011-08-18 15:27:18 -0700
committerIan Romanick <[email protected]>2011-10-04 13:17:48 -0700
commit24409ba1968cc49cbde6a111464c91271babc68a (patch)
tree00859ebec7bf3a7d117c98674135e879029b1874 /src/mesa/main/shaderapi.c
parentc097c63aa880e2b84e6b1d78a8808d42864f72fc (diff)
mesa: Determine GL_ACTIVE_ATTRIBUTE_MAX_LENGTH by walking the GLSL IR.
Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/shaderapi.c')
-rw-r--r--src/mesa/main/shaderapi.c8
1 files changed, 1 insertions, 7 deletions
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;