u_vbuf/translate: pass max_index into the set_buffer.

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 <marek.olsak@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Dave Airlie
2018-03-09 06:18:55 +10:00
parent 5d4fbc2b54
commit e76cf1ff12
+1 -1
View File
@@ -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. */