Module: Mesa
Branch: master
Commit: cd30c4d7197ac11b42aaf707280dd2927b8c11d5
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=cd30c4d7197ac11b42aaf707280dd2927b8c11d5

Author: Icenowy Zheng <[email protected]>
Date:   Wed Jan 29 20:45:22 2020 +0800

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>

---

 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);
 

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to