summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-01-16 14:52:22 -0700
committerBrian <[email protected]>2007-01-16 14:52:22 -0700
commit9b5dc1358a82949aaf9a25abb18c5df64d5f01a1 (patch)
tree8363bcf314143883711ca49923795976d44a8703
parent4f027a33b90fc855de324ac07328a7df0568c6af (diff)
when automatically binding vertex attributes, start with attrib 1, not 0
-rw-r--r--src/mesa/shader/slang/slang_link2.c7
1 files 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;
}