util/prim_restart: fix util_translate_prim_restart_ib
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 18 May 2021 23:55:01 +0000 (19:55 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 21 May 2021 10:58:26 +0000 (10:58 +0000)
commit1272c2e05246cad647324ffdccf56435b97dec1c
tree180f74f72967132aae3fc4cfc5de4875136cc701
parent77fcf700826d6637e4e407c73c209f3b1718a26e
util/prim_restart: fix util_translate_prim_restart_ib

this was broken for the indirect case if the indirect draw count or
firstIndex was nonzero and also would rewrite the index buffer onto the
wrong offset of the dst buffer

Fixes: 0c85d6c523f ("gallium/util: factor out primitive-restart rewriting logic")
Fixes: 330d0607ed6 ("gallium: remove pipe_index_buffer and set_index_buffer")

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10909>
src/gallium/auxiliary/util/u_prim_restart.c