mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-30 06:10:39 +02:00
mesa: fix bug in GLSL built-in matrix state lookup
This commit is contained in:
parent
557fde9531
commit
47b883e42b
1 changed files with 5 additions and 2 deletions
|
|
@ -109,10 +109,13 @@ 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;
|
||||
index1 = 0; /* prevent extra addition at end of function */
|
||||
tokens[1] = index1; /* which texture matrix */
|
||||
}
|
||||
}
|
||||
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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue