*
* - MCS buffer for non-MSRT is supported only for RT formats 32bpp,
* 64bpp, and 128bpp.
+ *
+ * From the Skylake documentation, it is made clear that X-tiling is no longer
+ * supported:
+ *
+ * - MCS and Lossless compression is supported for TiledY/TileYs/TileYf
+ * non-MSRTs only.
*/
static bool
intel_miptree_supports_non_msrt_fast_clear(struct brw_context *brw,
width0 = ALIGN(width0, 2) * 4;
height0 = ALIGN(height0, 2) * 2;
break;
+ case 16:
+ width0 = ALIGN(width0, 2) * 4;
+ height0 = ALIGN(height0, 2) * 4;
+ break;
default:
- /* num_samples should already have been quantized to 0, 1, 2, 4, or
- * 8.
+ /* num_samples should already have been quantized to 0, 1, 2, 4, 8
+ * or 16.
*/
unreachable("not reached");
}
*/
format = MESA_FORMAT_R_UINT32;
break;
+ case 16:
+ /* 64 bits/pixel are required for MCS data when using 16x MSAA (4 bits
+ * for each sample).
+ */
+ format = MESA_FORMAT_RG_UINT32;
+ break;
default:
unreachable("Unrecognized sample count in intel_miptree_alloc_mcs");
};
intel_get_non_msrt_mcs_alignment(mt, &block_width_px, &block_height);
unsigned width_divisor = block_width_px * 4;
unsigned height_divisor = block_height * 8;
+
+ /* The Skylake MCS is twice as tall as the Broadwell MCS.
+ *
+ * In pre-Skylake, each bit in the MCS contained the state of 2 cachelines
+ * in the main surface. In Skylake, it's two bits. The extra bit
+ * doubles the MCS height, not width, because in Skylake the MCS is always
+ * Y-tiled.
+ */
+ if (brw->gen >= 9)
+ height_divisor /= 2;
+
unsigned mcs_width =
ALIGN(mt->logical_width0, width_divisor) / width_divisor;
unsigned mcs_height =