summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-09-17 09:05:04 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-09-17 09:13:28 -0600
commit6290d7fd29869cf12402da6d8565ff38eb9b8e0e (patch)
treed6c8214f33d94ab78789443730eeb11ee403cc25
parent84ad182ab898d09d408ec8c1f767336ccb88d707 (diff)
mesa: fix bug in previous changes to _slang_resolve_attributes()
-rw-r--r--src/mesa/shader/slang/slang_link.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c
index 30035b4fee..a6390846b2 100644
--- a/src/mesa/shader/slang/slang_link.c
+++ b/src/mesa/shader/slang/slang_link.c
@@ -275,7 +275,7 @@ _slang_resolve_attributes(struct gl_shader_program *shProg,
const char *name = origProg->Attributes->Parameters[k].Name;
const GLint size = origProg->Attributes->Parameters[k].Size;
const GLenum type =origProg->Attributes->Parameters[k].DataType;
- GLint index, attr;
+ GLint index;
/* See if there's a user-defined attribute binding for
* this name.
@@ -313,6 +313,8 @@ _slang_resolve_attributes(struct gl_shader_program *shProg,
size, type, attr);
}
+ assert(attr >= 0);
+
/* update the instruction's src reg */
inst->SrcReg[j].Index = VERT_ATTRIB_GENERIC0 + attr;
}