i965/wm: Don't sample lossless compressed as multisampled
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Mon, 18 Apr 2016 18:47:23 +0000 (21:47 +0300)
committerTopi Pohjolainen <topi.pohjolainen@intel.com>
Thu, 12 May 2016 16:49:37 +0000 (19:49 +0300)
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
src/mesa/drivers/dri/i965/brw_wm.c

index dbc626c0933d41c3b4daf15fbd2875265fb38b7c..ced97089fac2f96ebe7a277d4f506c792d1fe307 100644 (file)
@@ -361,8 +361,12 @@ brw_populate_sampler_prog_key_data(struct gl_context *ctx,
          struct intel_texture_object *intel_tex =
             intel_texture_object((struct gl_texture_object *)t);
 
+         /* From gen9 onwards some single sampled buffers can also be
+          * compressed. These don't need ld2dms sampling along with mcs fetch.
+          */
          if (brw->gen >= 7 &&
-             intel_tex->mt->msaa_layout == INTEL_MSAA_LAYOUT_CMS) {
+             intel_tex->mt->msaa_layout == INTEL_MSAA_LAYOUT_CMS &&
+             intel_tex->mt->num_samples > 1) {
             key->compressed_multisample_layout_mask |= 1 << s;
 
             if (intel_tex->mt->num_samples >= 16) {