diff options
author | Icenowy Zheng <[email protected]> | 2020-01-29 20:45:22 +0800 |
---|---|---|
committer | Icenowy Zheng <[email protected]> | 2020-01-30 07:51:35 +0800 |
commit | cd30c4d7197ac11b42aaf707280dd2927b8c11d5 (patch) | |
tree | 0e21762ebe38e095725e4e1427555b578c466645 | |
parent | 1c5d84fcae71b40f77891386ac53c8addee4f554 (diff) |
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 <[email protected]>
Reviewed-by: Andreas Baierl <[email protected]>
Reviewed-by: Vasily Khoruzhick <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3620>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3620>
-rw-r--r-- | src/gallium/drivers/lima/lima_state.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |