nir: Fix nir_chase_binding() vecN handling
authorConnor Abbott <cwabbott0@gmail.com>
Fri, 16 Sep 2022 14:00:07 +0000 (16:00 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 18 Nov 2022 11:57:05 +0000 (11:57 +0000)
commite402d2dbe9556eb7b113193b0696386a003206c6
tree486db8da2eb58f08f4618799ef4fbf60dc33d2af
parentbd513059433a6bbda8ce0f95b85dcc76d48f959c
nir: Fix nir_chase_binding() vecN handling

In the comments we claimed to handle vecN instructions, for the case
where an offset is trimmed from the descriptor, but we didn't ignore the
offset itself and in effect only handled identity vecN's (which copy
propagation would normally remove already!), so the handling of vecN was
useless and this relied on copy propagation cleaning things up. Fix it
to ignore everything except the components in the original source.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18703>
src/compiler/nir/nir.c