projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f027a3
)
when automatically binding vertex attributes, start with attrib 1, not 0
author
Brian
<brian@yutani.localnet.net>
Tue, 16 Jan 2007 21:52:22 +0000
(14:52 -0700)
committer
Brian
<brian@yutani.localnet.net>
Tue, 16 Jan 2007 21:52:22 +0000
(14:52 -0700)
src/mesa/shader/slang/slang_link2.c
patch
|
blob
|
history
diff --git
a/src/mesa/shader/slang/slang_link2.c
b/src/mesa/shader/slang/slang_link2.c
index 3ea795445174536942bca16fdec01359dbc5b699..0a517aecc5f5f741f4d1dd4352300fe4eb89d627 100644
(file)
--- 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;
}