From: Brian Date: Tue, 31 Jul 2007 15:31:41 +0000 (-0600) Subject: glGetAttribLocation always returned 1 (bug 11774) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=59b1233e7075ff54a2cd183234f2a092eef5cc75;p=mesa.git glGetAttribLocation always returned 1 (bug 11774) --- 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 */