From: Icenowy Zheng Date: Wed, 29 Jan 2020 12:45:22 +0000 (+0800) Subject: lima: fix lima_set_vertex_buffers() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cd30c4d7197ac11b42aaf707280dd2927b8c11d5;p=mesa.git lima: fix lima_set_vertex_buffers() When setting the vertex buffers, lima calls util_set_vertex_buffers_mask() to reference and copy buffers. That function function adds dst with start_slot internally, so lima should not offset the destination address again. This is discovered when comparing with other drivers, and fixed by removing the extra offset in lima_set_vertex_buffers(). This fixes draws that get translated in u_vbuf, because u_vbuf adds extra vertex buffers when translating. Signed-off-by: Icenowy Zheng Reviewed-by: Andreas Baierl Reviewed-by: Vasily Khoruzhick Tested-by: Marge Bot Part-of: --- diff --git a/src/gallium/drivers/lima/lima_state.c b/src/gallium/drivers/lima/lima_state.c index cd910fbf3de..2e759654612 100644 --- a/src/gallium/drivers/lima/lima_state.c +++ b/src/gallium/drivers/lima/lima_state.c @@ -226,7 +226,7 @@ lima_set_vertex_buffers(struct pipe_context *pctx, struct lima_context *ctx = lima_context(pctx); struct lima_context_vertex_buffer *so = &ctx->vertex_buffers; - util_set_vertex_buffers_mask(so->vb + start_slot, &so->enabled_mask, + util_set_vertex_buffers_mask(so->vb, &so->enabled_mask, vb, start_slot, count); so->count = util_last_bit(so->enabled_mask);