gallium/indices: translate primitive-restart values
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Thu, 25 Jun 2020 10:26:54 +0000 (12:26 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 18 Aug 2020 12:12:27 +0000 (12:12 +0000)
commitf5cce8929ad61449ec0e43046a9699e19a2df0ce
tree5a4297b3320cf556f15765fd87640e89107829f1
parent21952f1400aff00f3a04e95e9f960318e1853cb8
gallium/indices: translate primitive-restart values

This adds a config-option to u_primconvert that translates primitive
restart values to the max-values for the index size. This allows us to
support arbitrary primitive-restart indices on hardware that only
supports fixed restart-indices.

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_primconvert.c
src/gallium/auxiliary/indices/u_primconvert.h