mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
when automatically binding vertex attributes, start with attrib 1, not 0
This commit is contained in:
parent
4f027a33b9
commit
9b5dc1358a
1 changed files with 5 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue