From 9b5dc1358a82949aaf9a25abb18c5df64d5f01a1 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 16 Jan 2007 14:52:22 -0700 Subject: [PATCH] when automatically binding vertex attributes, start with attrib 1, not 0 --- src/mesa/shader/slang/slang_link2.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mesa/shader/slang/slang_link2.c b/src/mesa/shader/slang/slang_link2.c index 3ea79544517..0a517aecc5f 100644 --- a/src/mesa/shader/slang/slang_link2.c +++ b/src/mesa/shader/slang/slang_link2.c @@ -363,8 +363,11 @@ _slang_resolve_attributes(struct gl_shader_program *shProg, attr = shProg->Attributes->Parameters[index].StateIndexes[0]; } else { - /* not found, choose our own attribute number */ - for (attr = 0; attr < MAX_VERTEX_ATTRIBS; attr++) { + /* Not found, choose our own attribute number. + * Start at 1 since generic attribute 0 always aliases + * glVertex/position. + */ + for (attr = 1; attr < MAX_VERTEX_ATTRIBS; attr++) { if (((1 << attr) & usedAttributes) == 0) break; } -- 2.30.2