From: Brian Date: Tue, 16 Jan 2007 21:52:22 +0000 (-0700) Subject: when automatically binding vertex attributes, start with attrib 1, not 0 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9b5dc1358a82949aaf9a25abb18c5df64d5f01a1;p=mesa.git when automatically binding vertex attributes, start with attrib 1, not 0 --- 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; }