summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_compiler.h
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2015-09-15 16:34:35 +0100
committerNeil Roberts <neil@linux.intel.com>2015-11-05 10:33:16 +0100
commit1a97cac767425b22e56fe698127795bc287bb773 (patch)
treea0a5d6c198c8ac0ece2700012815bfb7c86f2cad /src/mesa/drivers/dri/i965/brw_compiler.h
parent4ef27745c8ed5153464db22950a90d74d2ef4435 (diff)
downloadexternal_mesa3d-1a97cac767425b22e56fe698127795bc287bb773.zip
external_mesa3d-1a97cac767425b22e56fe698127795bc287bb773.tar.gz
external_mesa3d-1a97cac767425b22e56fe698127795bc287bb773.tar.bz2
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>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_compiler.h')
-rw-r--r--src/mesa/drivers/dri/i965/brw_compiler.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_compiler.h b/src/mesa/drivers/dri/i965/brw_compiler.h
index 91eabaf..f022f38 100644
--- a/src/mesa/drivers/dri/i965/brw_compiler.h
+++ b/src/mesa/drivers/dri/i965/brw_compiler.h
@@ -143,6 +143,13 @@ struct brw_sampler_prog_key_data {
uint32_t compressed_multisample_layout_mask;
/**
+ * Whether this sampler is using 16x multisampling. If so fetching from
+ * this sampler will be handled with a different instruction, ld2dms_w
+ * instead of ld2dms.
+ */
+ uint32_t msaa_16;
+
+ /**
* For Sandybridge, which shader w/a we need for gather quirks.
*/
enum gen6_gather_sampler_wa gen6_gather_wa[MAX_SAMPLERS];