mesa: fix accidental regression in GLSL built-in texture matrix lookup
authorBrian Paul <brian.paul@tungstengraphics.com>
Thu, 13 Nov 2008 15:47:36 +0000 (08:47 -0700)
committerBrian Paul <brian.paul@tungstengraphics.com>
Fri, 14 Nov 2008 01:19:12 +0000 (18:19 -0700)
Was broken by commit 9aca9a4b72b2a7b378e50bd88f9c3324d07375ec.

src/mesa/shader/slang/slang_builtin.c

index 20fafee4b9e59f86f0e708e2f48dea96c9415f48..db00c54b8a25c30829ebf49d504dd5fc840857c5 100644 (file)
@@ -108,6 +108,7 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field,
       if (tokens[0] == STATE_TEXTURE_MATRIX) {
          if (index1 >= 0) {
             tokens[1] = index1; /* which texture matrix */
+            index1 = 0; /* prevent extra addition at end of function */
          }
       }
       if (index1 < 0) {