i965/fs: Store a pointer to brw_sampler_prog_key_data in the visitor.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 9 Mar 2015 08:58:51 +0000 (01:58 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 12 Mar 2015 15:29:48 +0000 (08:29 -0700)
commit1d8ef6ba606a88239de633e5abcc19471c9d3cf4
tree222d5e95da45bdd397226dc33c8c03d9cd45fc74
parent48b0a3c1c9d829a9b1d401afb2796b35df94a5d7
i965/fs: Store a pointer to brw_sampler_prog_key_data in the visitor.

The NIR backend hardcodes brw_wm_prog_key at the moment, which won't
work when we support scalar VS.  We could use get_tex(), but it's a
static method.  I was going to promote it to fs_visitor, but then
realized that both parameters (stage and key) are already members.

It then occured to me that we could just set up a pointer in the
constructor, and skip having a function altogether.

This patch also converts all existing users to use key_tex.

v2: Make key_tex a "const brw_sampler_prog_key_data *" instead of
    non-const; word-wrap some lines.  (Review comments from Topi.)

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
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