projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b66bc1
)
mesa: fix accidental regression in GLSL built-in texture matrix lookup
author
Brian Paul
<brianp@vmware.com>
Tue, 6 Jan 2009 15:45:53 +0000
(08:45 -0700)
committer
Brian Paul
<brianp@vmware.com>
Tue, 6 Jan 2009 15:45:53 +0000
(08:45 -0700)
Was broken by commit
9aca9a4b72b2a7b378e50bd88f9c3324d07375ec
.
(cherry picked from commit
fe984aed5a9ee7c6e000d48a0a584b964fefa848
)
Conflicts:
src/mesa/shader/slang/slang_builtin.c
src/mesa/shader/slang/slang_builtin.c
patch
|
blob
|
history
diff --git
a/src/mesa/shader/slang/slang_builtin.c
b/src/mesa/shader/slang/slang_builtin.c
index cde44c0b9970553b318d095685a3dd942a4e1047..db00c54b8a25c30829ebf49d504dd5fc840857c5 100644
(file)
--- a/
src/mesa/shader/slang/slang_builtin.c
+++ b/
src/mesa/shader/slang/slang_builtin.c
@@
-107,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;