summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/slang/slang_link2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/shader/slang/slang_link2.c')
-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;
}