nir/spirv: Use instr_rewrite_src for updating phi sources
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 29 Dec 2015 23:44:37 +0000 (15:44 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 29 Dec 2015 23:44:39 +0000 (15:44 -0800)
commit2a58cb03d04b8cff632e6be70f1bef0ec12d9f0b
tree2d8f3710906b7d5181368885f5d59f6c29accc30
parent69d5838aee2fe80548517eaccbd3a9a6555ae99e
nir/spirv: Use instr_rewrite_src for updating phi sources

You can't just add a new source to a phi because use/def information won't
get updated properly.  Instead, you have to use one of the core helpers.
Some day, we may want to add a nir_phi_instr_add_src helper.
src/glsl/nir/spirv/spirv_to_nir.c