svga: fix draw elements with 8-bits indices
authorCharmaine Lee <charmainel@vmware.com>
Thu, 20 Aug 2020 22:45:47 +0000 (15:45 -0700)
committerMarge Bot <eric+marge@anholt.net>
Fri, 21 Aug 2020 18:14:06 +0000 (18:14 +0000)
commitfd7e1ed86d856cc4bb12bf550ef43e1cb81d0c0c
tree7d07c88b6e0ef1a553e7eaa1e7ea75a2058acb32
parentf41848a9df3c6eb81059edfd63347584790e0a3a
svga: fix draw elements with 8-bits indices

With commit 2122b902b80, u_index_translator can return U_TRANSLATE_MEMCPY
for 8-bits indices, and in this case we need to call the translation function
instead of a simple passthrough to the device.

Fixes piglit spec@nv_primitive_restart tests.

Fixes: 2122b902b8 "gallium/indices: don't expand prim-type for 8-bit indices"
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6414>
src/gallium/drivers/svga/svga_draw_elements.c