From b2872ea353efd117fcc4d22f0ca66a26f95a14c4 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 25 Aug 2010 16:38:37 -0700 Subject: Revert "mesa: Don't add 1 to GL_ACTIVE_UNIFORM_MAX_LENGTH." This reverts commit 001a7bfdfc8b3c8930d5ced21982dbdfb8cd35b3. I hadn't found the section of the spec clarifying that the old behavior was right. Reverting fixes the new version of the testcase, and the Humus demos that could no longer find their uniforms. Bug #29782 Bug #29783 --- src/mesa/main/shaderapi.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 1335f0f4111..cc350c93b97 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -644,6 +644,8 @@ get_programiv(GLcontext *ctx, GLuint program, GLenum pname, GLint *params) break; case GL_ACTIVE_UNIFORM_MAX_LENGTH: *params = _mesa_longest_uniform_name(shProg->Uniforms); + if (*params > 0) + (*params)++; /* add one for terminating zero */ break; case GL_PROGRAM_BINARY_LENGTH_OES: *params = 0; -- cgit v1.2.3