gallium/indices: don't expand prim-type for 8-bit indices
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 22 Jun 2020 13:56:45 +0000 (15:56 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 18 Aug 2020 12:12:27 +0000 (12:12 +0000)
commit2122b902b8003719c739db718a97463bbf99ebb3
treec668505a2f162ca2e0f9c90c01b930ff83fe0617
parent0c85d6c523f137571768ab3bb190a201ae294421
gallium/indices: don't expand prim-type for 8-bit indices

Expanding the primitive-type has two undesirable effects:

1. It breaks primitive-restart. This is possible to fix by explicitly
   handling primitive-restart in more conversion routines. But
   u_indices_gen.py is kind of a mess, so it's not trivial as-is.
2. It changes the reported gl_VertexID.

While it might be possible to work around this in each driver, it seems
better to avoid this when we can.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5976>
src/gallium/auxiliary/indices/u_indices.c