From 8db71c95e1439cfff95ff92b1916c1d93926b763 Mon Sep 17 00:00:00 2001 From: Jianxun Zhang Date: Sun, 20 Oct 2024 14:19:39 -0700 Subject: [PATCH] isl: Move a CCS restriction in GFX 12.x 3D+MSAA is not supported and depth-stencil formats are all 32bpp or less. Move this restriction into single-sample case. Suggested-by: Nanley Chery Signed-off-by: Jianxun Zhang Reviewed-by: Nanley Chery Part-of: --- src/intel/isl/isl.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c index 182a22dcacb..bf7744a3512 100644 --- a/src/intel/isl/isl.c +++ b/src/intel/isl/isl.c @@ -3204,23 +3204,23 @@ isl_surf_supports_ccs(const struct isl_device *dev, if (surf->row_pitch_B % 512 != 0) return false; } - } - /* BSpec 44930: (Gfx12, Gfx12.5) - * - * "Compression of 3D Ys surfaces with 64 or 128 bpp is not supported - * in Gen12. Moreover, "Render Target Fast-clear Enable" command is - * not supported for any 3D Ys surfaces. except when Surface is a - * Procdural Texture." - * - * Since the note applies to MTL, we apply this to TILE64 too. - */ - uint32_t format_bpb = isl_format_get_layout(surf->format)->bpb; - if (surf->dim == ISL_SURF_DIM_3D && - (surf->tiling == ISL_TILING_ICL_Ys || - isl_tiling_is_64(surf->tiling)) && - (format_bpb == 64 || format_bpb == 128)) - return false; + /* BSpec 44930: (Gfx12, Gfx12.5) + * + * "Compression of 3D Ys surfaces with 64 or 128 bpp is not supported + * in Gen12. Moreover, "Render Target Fast-clear Enable" command is + * not supported for any 3D Ys surfaces. except when Surface is a + * Procdural Texture." + * + * Since the note applies to MTL, we apply this to TILE64 too. + */ + uint32_t format_bpb = isl_format_get_layout(surf->format)->bpb; + if (surf->dim == ISL_SURF_DIM_3D && + (surf->tiling == ISL_TILING_ICL_Ys || + isl_tiling_is_64(surf->tiling)) && + (format_bpb == 64 || format_bpb == 128)) + return false; + } } else if (ISL_GFX_VER(dev) < 12) { if (surf->samples > 1) return false;