From: pepp Date: Mon, 11 Apr 2011 15:16:45 +0000 (+0200) Subject: u_vbuf_mgr: fixed vbo max_index calculation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=45920d2ecb38b14fdda5253fecce996570c22863;p=mesa.git u_vbuf_mgr: fixed vbo max_index calculation Signed-off-by: Marek Olšák --- diff --git a/src/gallium/auxiliary/util/u_vbuf_mgr.c b/src/gallium/auxiliary/util/u_vbuf_mgr.c index b2eaff851ac..dea2928f950 100644 --- a/src/gallium/auxiliary/util/u_vbuf_mgr.c +++ b/src/gallium/auxiliary/util/u_vbuf_mgr.c @@ -499,7 +499,7 @@ void u_vbuf_mgr_set_vertex_buffers(struct u_vbuf_mgr *mgrb, /* Update the maximum index. */ mgr->b.max_index = MIN2(mgr->b.max_index, - (vb->buffer->width0 - vb->buffer_offset) / vb->stride); + (vb->buffer->width0 - vb->buffer_offset) / vb->stride - 1); } for (; i < mgr->b.nr_real_vertex_buffers; i++) {