}
static const struct gl_vertex_array *
-get_client_array(const struct st_vertex_program *vp,
- const struct gl_vertex_array **arrays,
- int attr)
+get_client_array(const struct gl_vertex_array **arrays,
+ unsigned mesaAttr)
{
- const GLuint mesaAttr = vp->index_to_input[attr];
/* st_program uses 0xffffffff to denote a double placeholder attribute */
if (mesaAttr == ST_DOUBLE_ATTRIB_PLACEHOLDER)
return NULL;
const struct gl_buffer_object *bufObj;
GLsizei stride;
- array = get_client_array(vp, arrays, attr);
+ array = get_client_array(arrays, vp->index_to_input[attr]);
if (!array)
continue;
if (num_inputs) {
const struct gl_vertex_array *array;
- array = get_client_array(vp, arrays, 0);
+ array = get_client_array(arrays, vp->index_to_input[0]);
assert(array);
/* Since we're doing interleaved arrays, we know there'll be at most
for (attr = 1; attr < num_inputs; attr++) {
const GLubyte *start;
- array = get_client_array(vp, arrays, attr);
+ array = get_client_array(arrays, vp->index_to_input[attr]);
if (!array)
continue;
start = array->Ptr;
unsigned src_offset;
unsigned src_format;
- array = get_client_array(vp, arrays, attr);
+ array = get_client_array(arrays, vp->index_to_input[attr]);
assert(array);
src_offset = (unsigned) (array->Ptr - low_addr);
GLuint attr;
for (attr = 0; attr < num_inputs;) {
- const GLuint mesaAttr = vp->index_to_input[attr];
+ const unsigned mesaAttr = vp->index_to_input[attr];
const struct gl_vertex_array *array;
struct gl_buffer_object *bufobj;
GLsizei stride;
unsigned src_format;
unsigned bufidx;
- array = get_client_array(vp, arrays, attr);
+ array = get_client_array(arrays, mesaAttr);
assert(array);
bufidx = num_vbuffers++;