gallium/indices: generalize primitive-restart logic

These blocks are all the same logic, but with a few details changed.
Let's add a parameterized version and add calls to that instead.

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5976>
1 file changed