From 45920d2ecb38b14fdda5253fecce996570c22863 Mon Sep 17 00:00:00 2001 From: pepp Date: Mon, 11 Apr 2011 17:16:45 +0200 Subject: [PATCH] u_vbuf_mgr: fixed vbo max_index calculation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Marek Olšák --- src/gallium/auxiliary/util/u_vbuf_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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++) { -- 2.30.2