*size = elems * vb->stride;
} else if (vb->stride) {
elems = info->max_index - info->min_index + 1;
- *totelems = info->max_index + 1;
- *base = info->min_index * vb->stride;
+ *totelems = (info->max_index + info->index_bias) + 1;
+ *base = (info->min_index + info->index_bias) * vb->stride;
*size = elems * vb->stride;
} else {
*totelems = 1;
uint32_t base;
swr_user_vbuf_range(&info, ctx->velems, vb, i, &elems, &base, &size);
partial_inbounds = 0;
- min_vertex_index = info.min_index;
+ min_vertex_index = info.min_index + info.index_bias;
size = AlignUp(size, 4);
/* If size of client memory copy is too large, don't copy. The