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>
This commit is contained in:
parent
1c5d84fcae
commit
cd30c4d719
|
@ -226,7 +226,7 @@ lima_set_vertex_buffers(struct pipe_context *pctx,
|
||||||
struct lima_context *ctx = lima_context(pctx);
|
struct lima_context *ctx = lima_context(pctx);
|
||||||
struct lima_context_vertex_buffer *so = &ctx->vertex_buffers;
|
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);
|
vb, start_slot, count);
|
||||||
so->count = util_last_bit(so->enabled_mask);
|
so->count = util_last_bit(so->enabled_mask);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue