From cd30c4d7197ac11b42aaf707280dd2927b8c11d5 Mon Sep 17 00:00:00 2001 From: Icenowy Zheng Date: Wed, 29 Jan 2020 20:45:22 +0800 Subject: [PATCH] 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: --- src/gallium/drivers/lima/lima_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.30.2