static void
u_vbuf_upload_buffers(struct u_vbuf_priv *mgr,
int min_index, int max_index,
- unsigned instance_count)
+ unsigned start_instance, unsigned instance_count)
{
unsigned i;
unsigned count = max_index + 1 - min_index;
} else if (instance_div) {
/* Per-instance attrib. */
unsigned count = (instance_count + instance_div - 1) / instance_div;
+ first += vb->stride * start_instance;
size = vb->stride * (count - 1) + mgr->ve->src_format_size[i];
} else {
/* Per-vertex attrib. */
/* Upload user buffers. */
if (mgr->any_user_vbs) {
- u_vbuf_upload_buffers(mgr, min_index, max_index, info->instance_count);
+ u_vbuf_upload_buffers(mgr, min_index, max_index,
+ info->start_instance, info->instance_count);
}
return U_VBUF_BUFFERS_UPDATED;
}