i965/draw: Use the correct buffer index for interleaved VBO sizes

The buffer_range_* arrays are indexed by buffer index not element index.

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
This commit is contained in:
Jason Ekstrand 2016-05-24 16:57:38 -07:00
parent e58fabc93a
commit 6f89e51c84

View File

@ -529,8 +529,10 @@ brw_prepare_vertices(struct brw_context *brw)
input->buffer = brw->vb.enabled[k]->buffer;
input->offset = glarray->Ptr - other->Ptr;
buffer_range_start[k] = MIN2(buffer_range_start[k], start);
buffer_range_end[k] = MAX2(buffer_range_end[k], start + range);
buffer_range_start[input->buffer] =
MIN2(buffer_range_start[input->buffer], start);
buffer_range_end[input->buffer] =
MAX2(buffer_range_end[input->buffer], start + range);
break;
}
}