nir/linking_helpers: Look at derefs for modes
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 13 Dec 2018 20:31:54 +0000 (14:31 -0600)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 18 Dec 2018 19:13:28 +0000 (13:13 -0600)
commit8cc0f92492152bb315838944f7803e94d2ce33d3
tree280e7494cf054c583bd7bad93cb123ff7d6be7f5
parent8410cf66d776aa832f666bc50dad460dd577bf27
nir/linking_helpers: Look at derefs for modes

This is instead of looking all the way back to the variable which may
not exist for all derefs.  This makes this code properly ignore casts
with modes other than the mode[s] we care about (where casts aren't
allowed).

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/compiler/nir/nir_linking_helpers.c