i965/fs: Move sampler unit lookup into rescale_texcoord
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 1 Oct 2015 23:38:59 +0000 (16:38 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 2 Oct 2015 21:22:53 +0000 (14:22 -0700)
commitb62e36d18fac4a9c9977ddfa4bc2c2dbbcdad1b4
tree2334c2779395ca08ae7b6bd348d5a1e016ea15a7
parent7b974c5f902b3f652776471aa35306195247a8a7
i965/fs: Move sampler unit lookup into rescale_texcoord

The texunit variable we create and assign in nir_emit_texture gets passed
through two more layers of function calls before it gets to its sole use in
rescale_texcoord.  The best part is that we already pass the sampler into
rescale_texcoord so we can just look it up there.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_fs_nir.cpp
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp