From 7ee41c162d3cef18243cf873de572d4576d08f95 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Wed, 28 Jun 2023 14:29:30 +0300 Subject: [PATCH] isl: add Gfx12/12.5 restriction on 3D surfaces & compression Signed-off-by: Lionel Landwerlin Reviewed-by: Nanley Chery Part-of: --- src/intel/isl/isl.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c index 8e7b3ed..06bd98d 100644 --- a/src/intel/isl/isl.c +++ b/src/intel/isl/isl.c @@ -2875,6 +2875,23 @@ isl_surf_supports_ccs(const struct isl_device *dev, if (surf->dim == ISL_SURF_DIM_3D) 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 (ISL_GFX_VER(dev) == 12 && + surf->dim == ISL_SURF_DIM_3D && + (surf->tiling == ISL_TILING_ICL_Ys || + surf->tiling == ISL_TILING_64) && + (format_bpb == 64 || format_bpb == 128)) + return false; + /* TODO: Handle the other tiling formats */ if (surf->tiling != ISL_TILING_Y0 && surf->tiling != ISL_TILING_4 && surf->tiling != ISL_TILING_64) -- 2.7.4