nir/copy_prop_vars: Get modes directly from derefs
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 13 Dec 2018 22:28:23 +0000 (16:28 -0600)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 18 Dec 2018 19:13:28 +0000 (13:13 -0600)
commitfa40a58fd9c0faeead561fd1dbaaaefc6eb61633
tree97979863f3eedda56f83dc203f611e4372890cc0
parentcf7fb3980596f46c8376f1121043b98332eab62c
nir/copy_prop_vars: Get modes directly from derefs

Instead of going all the way back to the variable, just look at the
deref.  The modes are guaranteed to be the same by nir_validate whenever
the variable can be found.  This fixes apply_barrier_for_modes for
derefs that don't have an accessible variable.

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