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 <icenowy@aosc.io>
Reviewed-by: Andreas Baierl <ichgeh@imkreisrum.de>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3620>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3620>
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);