nir: Add a pass to cut the trailing ends of vectors.
authorEric Anholt <eric@anholt.net>
Wed, 22 Jul 2020 23:57:22 +0000 (16:57 -0700)
committerMarge Bot <eric+marge@anholt.net>
Mon, 3 Aug 2020 21:26:45 +0000 (21:26 +0000)
commit1c9906d5ff22234b4e2c5c1c81a42a8766706b34
tree32b253693bb96febb6e5b55120e10708e781ee4e
parent5afaec3741384da0702d3bf75aebd0af6fd07d8b
nir: Add a pass to cut the trailing ends of vectors.

Ideally we'd also handle unused middles of vectors and reswizzle ALU-only
uses of it so we could write fewer channels, but that's future work/

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6050>
src/compiler/Makefile.sources
src/compiler/nir/meson.build
src/compiler/nir/nir.h
src/compiler/nir/nir_opt_shrink_vectors.c [new file with mode: 0644]