glGetAttribLocation always returned 1 (bug 11774)
authorBrian <brian.paul@tungstengraphics.com>
Tue, 31 Jul 2007 15:31:41 +0000 (09:31 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Tue, 31 Jul 2007 15:32:28 +0000 (09:32 -0600)
src/mesa/shader/slang/slang_link.c

index eaa29ba094e6463ac16042789c0e6e59348d9d36..c8457fc483d9785f35be037a6c05ac213be26ece 100644 (file)
@@ -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 */