From a1ed41dec77367530d72d2c44992b4c5cc0160b4 Mon Sep 17 00:00:00 2001 From: Nanley Chery Date: Wed, 10 May 2023 12:25:18 -0700 Subject: [PATCH] intel/isl: Bump the MCS halign value for BDW+ Select a horizontal alignment value that matches the main MSAA surface. We need a valid horizontal alignment to perform MCS ambiguates. The halign value doesn't actually affect test behavior, but it is validated by isl_surf_fill_state. We currently have an invalid halign for gfx125. This patch fixes that. Reviewed-by: Ivan Briano Part-of: --- src/intel/isl/isl.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c index 0a3dfcc442a..9ddaa698fb6 100644 --- a/src/intel/isl/isl.c +++ b/src/intel/isl/isl.c @@ -899,10 +899,18 @@ isl_choose_image_alignment_el(const struct isl_device *dev, * Height, width, and layout of MCS buffer in this case must match with * Render Target height, width, and layout. MCS buffer is tiledY. * - * To avoid wasting memory, choose the smallest alignment possible: - * HALIGN_4 and VALIGN_4. + * Pick a vertical and horizontal alignment that matches the main render + * target. Vertical alignment is important for properly spacing an array + * of MCS images. Horizontal alignment is not expected to matter because + * MCS is not mipmapped. Regardless, we pick a valid value here. */ - *image_align_el = isl_extent3d(4, 4, 1); + if (ISL_GFX_VERX10(dev) >= 125) { + *image_align_el = isl_extent3d(128 * 8 / fmtl->bpb, 4, 1); + } else if (ISL_GFX_VER(dev) >= 8) { + *image_align_el = isl_extent3d(16, 4, 1); + } else { + *image_align_el = isl_extent3d(4, 4, 1); + } return; } else if (fmtl->txc == ISL_TXC_HIZ) { assert(ISL_GFX_VER(dev) >= 6);