i965/fs: Add a sampler program key for whether the texture is 16x MSAA
authorNeil Roberts <neil@linux.intel.com>
Tue, 15 Sep 2015 15:34:35 +0000 (16:34 +0100)
committerNeil Roberts <neil@linux.intel.com>
Thu, 5 Nov 2015 09:33:16 +0000 (10:33 +0100)
commit1a97cac767425b22e56fe698127795bc287bb773
treea0a5d6c198c8ac0ece2700012815bfb7c86f2cad
parent4ef27745c8ed5153464db22950a90d74d2ef4435
i965/fs: Add a sampler program key for whether the texture is 16x MSAA

When 16x MSAA is used for sampling with texelFetch the compiler needs
to use a different instruction which passes more arguments for the MCS
data. Previously on skl+ it was unconditionally using this new
instruction. However since 16x MSAA is probably going to be pretty
rare, it is probably worthwhile to avoid using this instruction for
the other sample counts. In order to do that this patch adds a new
member to brw_sampler_prog_key_data to track when a sampler refers to
a buffer with 16 samples.

Note that this isn't done for the vec4 backend because it wouldn't
change how many registers it uses.

Acked-by: Ben Widawsky <ben@bwidawsk.net>
src/mesa/drivers/dri/i965/brw_compiler.h
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
src/mesa/drivers/dri/i965/brw_wm.c