Mesa (master): mesa: fix accidental regression in GLSL built-in texture matrix lookup

Brian Paul brianp at kemper.freedesktop.org
Fri Nov 14 01:21:24 UTC 2008


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

Author: Brian Paul <brian.paul at tungstengraphics.com>
Date:   Thu Nov 13 08:47:36 2008 -0700

mesa: fix accidental regression in GLSL built-in texture matrix lookup

Was broken by commit 9aca9a4b72b2a7b378e50bd88f9c3324d07375ec.

---

 src/mesa/shader/slang/slang_builtin.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/mesa/shader/slang/slang_builtin.c b/src/mesa/shader/slang/slang_builtin.c
index 20fafee..db00c54 100644
--- a/src/mesa/shader/slang/slang_builtin.c
+++ b/src/mesa/shader/slang/slang_builtin.c
@@ -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) {




More information about the mesa-commit mailing list