turnip: refactor CmdDraw* functions (and a few fixes)
authorJonathan Marek <jonathan@marek.ca>
Mon, 22 Jun 2020 16:47:47 +0000 (12:47 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 23 Jun 2020 10:44:19 +0000 (10:44 +0000)
commit52da27aedee7a7874502eba8f80a44a1bafcf9e0
treecaf58bc42e34fd36afa6a5b5e873098d0ae94637
parent98b0d900474e1f3abdc3f465cbe659bf1caf95c6
turnip: refactor CmdDraw* functions (and a few fixes)

This cleans up the CmdDraw* functions to be more straightforward. And a few
fixes applied while going through it:
* Fix indirect draw commands not adding the buffer->bo_offset, and ignoring
 drawCount/stride parameters (deqp tests not testing indirect draws very
 much apparently).
* Fixed a potential issue with RESTART_INDEX + secondary command bufs.
* Add missing logic for 8-bit indices

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
# Conflicts:
# src/freedreno/vulkan/tu_cmd_buffer.c

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5579>
src/freedreno/vulkan/tu_cmd_buffer.c
src/freedreno/vulkan/tu_private.h
src/freedreno/vulkan/tu_util.h