intel/fs: Don't emit a des copy for image ops with has_dest == false
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 27 Mar 2018 23:27:20 +0000 (16:27 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 28 Mar 2018 01:18:21 +0000 (18:18 -0700)
commit7e38f49a8f6a1ee765613e581844f8e9af414b10
tree8ea83d501186e45ce7445bf7e638e12e3935913e
parent776e6af879318050cdf8245cd409ada7b843e358
intel/fs: Don't emit a des copy for image ops with has_dest == false

This was causing us to walk dest_components times over a thing with no
destination.  This happened to work because all of the image intrinsics
without a destination also happened to have dest_components == 0.  We
shouldn't be reading dest_components if has_dest == false.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/intel/compiler/brw_fs_nir.cpp