From e76cf1ff12703964262c7bdef6083e723f0b46ba Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 9 Mar 2018 06:18:55 +1000 Subject: u_vbuf/translate: pass max_index into the set_buffer. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes a memory trashing crash (not the test) seen with dEQP-GLES3.stress.draw.unaligned_data.random.203 on virgl. Reviewed-by: Marek Olšák Signed-off-by: Dave Airlie --- src/gallium/auxiliary/util/u_vbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/util/u_vbuf.c b/src/gallium/auxiliary/util/u_vbuf.c index d30a702210a..95d7990c6ca 100644 --- a/src/gallium/auxiliary/util/u_vbuf.c +++ b/src/gallium/auxiliary/util/u_vbuf.c @@ -448,7 +448,7 @@ u_vbuf_translate_buffers(struct u_vbuf *mgr, struct translate_key *key, map -= (ptrdiff_t)vb->stride * min_index; } - tr->set_buffer(tr, i, map, vb->stride, ~0); + tr->set_buffer(tr, i, map, vb->stride, info->max_index); } /* Translate. */ -- cgit v1.2.3