diff options
author | Keith Whitwell <[email protected]> | 2008-11-15 16:53:24 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2008-11-15 16:53:24 +0000 |
commit | 7468765b18be202a64d58b83f6267b6973ea4897 (patch) | |
tree | 6e9fa6dd4a2ff79787bcae247377d07c00a036cf /src/mesa/shader/slang/slang_builtin.c | |
parent | 5e1454a036be6da2c48e2e20bf6f8047ee1a94d3 (diff) | |
parent | 80d6379722a1249ce13db79a898d340644936f67 (diff) |
Merge commit 'origin/master' into gallium-0.2
Conflicts:
src/mesa/shader/prog_print.c
Diffstat (limited to 'src/mesa/shader/slang/slang_builtin.c')
-rw-r--r-- | src/mesa/shader/slang/slang_builtin.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/shader/slang/slang_builtin.c b/src/mesa/shader/slang/slang_builtin.c index ed6de40d4b6..db00c54b8a2 100644 --- a/src/mesa/shader/slang/slang_builtin.c +++ b/src/mesa/shader/slang/slang_builtin.c @@ -80,9 +80,7 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field, { "gl_TextureMatrixTranspose", STATE_TEXTURE_MATRIX, 0 }, { "gl_TextureMatrixInverseTranspose", STATE_TEXTURE_MATRIX, STATE_MATRIX_INVERSE }, - /* XXX verify these!!! */ { "gl_NormalMatrix", STATE_MODELVIEW_MATRIX, STATE_MATRIX_TRANSPOSE }, - { "__NormalMatrixTranspose", STATE_MODELVIEW_MATRIX, 0 }, { NULL, 0, 0 } }; @@ -109,10 +107,14 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field, if (isMatrix) { if (tokens[0] == STATE_TEXTURE_MATRIX) { if (index1 >= 0) { - tokens[1] = index1; + tokens[1] = index1; /* which texture matrix */ index1 = 0; /* prevent extra addition at end of function */ } } + if (index1 < 0) { + /* index1 is unused: prevent extra addition at end of function */ + index1 = 0; + } } else if (strcmp(var, "gl_DepthRange") == 0) { tokens[0] = STATE_DEPTH_RANGE; |