intel_batchbuffer_save_state(brw);
if (brw->num_instances != prims[i].num_instances ||
- brw->basevertex != prims[i].basevertex) {
+ brw->basevertex != prims[i].basevertex ||
+ brw->baseinstance != prims[i].base_instance) {
brw->num_instances = prims[i].num_instances;
brw->basevertex = prims[i].basevertex;
+ brw->baseinstance = prims[i].base_instance;
if (i > 0) { /* For i == 0 we just did this before the loop */
brw->ctx.NewDriverState |= BRW_NEW_VERTICES;
brw_merge_inputs(brw, arrays);
uint32_t range = intel_buffer->Base.Size;
if (glarray->InstanceDivisor) {
if (brw->num_instances) {
- start = offset;
+ start = offset + glarray->StrideB * brw->baseinstance;
range = (glarray->StrideB * ((brw->num_instances /
glarray->InstanceDivisor) - 1) +
glarray->_ElementSize);