GLint i = _mesa_lookup_parameter_index(paramList, -1, name);
if (i >= 0) {
/* replace */
- ASSERT(paramList->Parameters[i].StateIndexes[0] == STATE_USER_ATTRIB);
if (attrib < 0)
attrib = i;
- paramList->Parameters[i].StateIndexes[1] = attrib;
+ paramList->Parameters[i].StateIndexes[0] = attrib;
}
else {
/* add */
gl_state_index state[STATE_LENGTH];
- state[0] = STATE_USER_ATTRIB;
- state[1] = attrib;
+ state[0] = attrib;
i = _mesa_add_parameter(paramList, PROGRAM_INPUT, name,
size, NULL, state);
}
STATE_NORMAL_SCALE,
STATE_TEXRECT_SCALE,
STATE_POSITION_NORMALIZED, /* normalized light position */
- STATE_USER_ATTRIB, /** shader vertex attrib: user-specified */
- STATE_AUTO_ATTRIB, /** shader vertex attrib: linker-specified */
STATE_INTERNAL_DRIVER /* first available state index for drivers (must be last) */
} gl_state_index;
if (shProg->Attributes) {
GLint i = _mesa_lookup_parameter_index(shProg->Attributes, -1, name);
if (i >= 0) {
- return shProg->Attributes->Parameters[i].StateIndexes[1];
+ return shProg->Attributes->Parameters[i].StateIndexes[0];
}
}
return -1;
*/
usedAttributes = 0x0;
for (i = 0; i < shProg->Attributes->NumParameters; i++) {
- GLint attr = shProg->Attributes->Parameters[i].StateIndexes[1];
+ GLint attr = shProg->Attributes->Parameters[i].StateIndexes[0];
usedAttributes |= attr;
}
GLint attr;
if (index >= 0) {
/* found, user must have specified a binding */
- attr = shProg->Attributes->Parameters[index].StateIndexes[1];
+ attr = shProg->Attributes->Parameters[index].StateIndexes[0];
}
else {
/* not found, choose our own attribute number */
_slang_resolve_samplers(shProg, &shProg->VertexProgram->Base);
_slang_resolve_samplers(shProg, &shProg->FragmentProgram->Base);
- _slang_resolve_attributes(shProg, &shProg->VertexProgram->Base);
+ if (!_slang_resolve_attributes(shProg, &shProg->VertexProgram->Base)) {
+ /*goto cleanup;*/
+ }
_slang_update_inputs_outputs(&shProg->VertexProgram->Base);
_slang_update_inputs_outputs(&shProg->FragmentProgram->Base);