From 59b1233e7075ff54a2cd183234f2a092eef5cc75 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 31 Jul 2007 09:31:41 -0600 Subject: glGetAttribLocation always returned 1 (bug 11774) --- src/mesa/shader/slang/slang_link.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c index eaa29ba094e..c8457fc483d 100644 --- a/src/mesa/shader/slang/slang_link.c +++ b/src/mesa/shader/slang/slang_link.c @@ -329,8 +329,10 @@ _slang_resolve_attributes(struct gl_shader_program *shProg, * glVertex/position. */ for (attr = 1; attr < MAX_VERTEX_ATTRIBS; attr++) { - if (((1 << attr) & usedAttributes) == 0) + if (((1 << attr) & usedAttributes) == 0) { + usedAttributes |= (1 << attr); break; + } } if (attr == MAX_VERTEX_ATTRIBS) { /* too many! XXX record error log */ -- cgit v1.2.3