lima: fix lima_set_vertex_buffers()
authorIcenowy Zheng <icenowy@aosc.io>
Wed, 29 Jan 2020 12:45:22 +0000 (20:45 +0800)
committerIcenowy Zheng <icenowy@aosc.io>
Wed, 29 Jan 2020 23:51:35 +0000 (07:51 +0800)
commitcd30c4d7197ac11b42aaf707280dd2927b8c11d5
tree0e21762ebe38e095725e4e1427555b578c466645
parent1c5d84fcae71b40f77891386ac53c8addee4f554
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 <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>
src/gallium/drivers/lima/lima_state.c