Mesa (master): Revert "mesa: Don't add 1 to GL_ACTIVE_UNIFORM_MAX_LENGTH."

Eric Anholt anholt at kemper.freedesktop.org
Wed Aug 25 23:45:56 UTC 2010


Module: Mesa
Branch: master
Commit: b2872ea353efd117fcc4d22f0ca66a26f95a14c4
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b2872ea353efd117fcc4d22f0ca66a26f95a14c4

Author: Eric Anholt <eric at anholt.net>
Date:   Wed Aug 25 16:38:37 2010 -0700

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 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 1335f0f..cc350c9 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;




More information about the mesa-commit mailing list