nir: Allow internal changes to the instr in nir_shader_lower_instructions().
authorEric Anholt <eric@anholt.net>
Tue, 16 Jul 2019 17:52:25 +0000 (10:52 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 18 Jul 2019 18:28:56 +0000 (11:28 -0700)
commit251c64a53dbfe6ed67347e01e54302fbe13e220a
tree70f60840868771d220ac88592aaefc6d6cd844d3
parentc0640035fba89a0d629b0cd297d494ac2a9f8338
nir: Allow internal changes to the instr in nir_shader_lower_instructions().

v3d's NIR txf_ms lowering wants to swizzle around the input coordinates in
NIR, but doesn't generate a new txf_ms instructions as replacement.  It's
pretty easy to allow that in nir_shader_lower_instructions, and it may be
common in lowering passes.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir.c
src/compiler/nir/nir.h