gallium/auxiliary/indices: consistently apply start only to input
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 17 Jul 2019 08:21:08 +0000 (10:21 +0200)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Sat, 31 Aug 2019 19:45:52 +0000 (19:45 +0000)
commit52af1427c6d248829130ce25b86cd27a31d34633
treefc64f6a57c13ffdee97fbb8e8895454dbd71e616
parent029b07b2adbde4466e4776e10cf37ec30aee4f1f
gallium/auxiliary/indices: consistently apply start only to input

The majority of these only apply the start argument to the input, but a
few of them also does for the output-array. util_primconvert, the only
user of this argument expects this pass a non-zero start-argument does
not expect this to be applied to the output; if it is, it will write
outside of allocated memory, leading to VRAM corruption.

The reason this doesn't seem to have been noticed before, is that no
driver currently use util_primconvert to convert a primitive-type to
itself, which is the cases where this was broken. But for Zink, this
will no longer be true, because we need to eliminate the use of 8-bit
index-buffers.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: 28f3f8d413f ("gallium/auxiliary/indices: add start param")
Reviewed-by: Rob Clark <robdclark@chromium.org>
src/gallium/auxiliary/indices/u_indices_gen.py