From fa85978b5864e2ef59aba0fef380f2e36469dfb3 Mon Sep 17 00:00:00 2001 From: Nanley Chery Date: Wed, 29 Oct 2025 13:34:07 -0400 Subject: [PATCH] intel/isl: Set TileAddressMappingMode for CMS/UMS This bit seems to affect whether the SKL or ICL swizzles are used for multisampled surfaces. Prevents the following test case from failing when Yf is force-enabled: dEQP-VK.pipeline.monolithic.multisample.misc.dynamic_rendering.multi_renderpass.r8g8b8a8_unorm_r16g16b16a16_sfloat_r16g16b16a16_sint_d32_sfloat_s8_uint.random_203 Reviewed-by: Rohan Garg Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/isl/isl_surface_state.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c index ad847f0e08a..933ed0b0c5e 100644 --- a/src/intel/isl/isl_surface_state.c +++ b/src/intel/isl/isl_surface_state.c @@ -534,8 +534,31 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state, assert(isl_tiling_is_any_y(info->surf->tiling)); s.TileMode = isl_encode_tiling[info->surf->tiling]; - if (isl_tiling_is_std_y(info->surf->tiling)) + if (isl_tiling_is_std_y(info->surf->tiling)) { s.TiledResourceMode = isl_tiling_encode_trmode[info->surf->tiling]; +#if GFX_VER >= 11 + /* Use the ICL swizzles for CMS and UMS surfaces. Although the + * RENDER_SURFACE_STATE field of the ICL+ PRMs command us to leave this + * bit cleared (and thus use the SKL swizzles), the TGL and DG1 PRMs + * seem to explain that the command was based on the lack of driver + * support. ISL has support for these swizzles however. From the TGL + * PRM: + * + * This field should always be programmed to 0h. Tiling mode is the + * standard tile layout for 3D. + * + * This field should NOT be programmed to 1h as the Tiling (for + * Standard Tiling) Address Mapping mode is not supported by SW. + * + * Additionally, the multisampled SKL swizzles for Yf are not explicitly + * defined as being applicable for ICL+ in the ICL PRM, Volume 5, + * "Tiling for CMS and UMS Surfaces" section. Compare this to the SKL + * PRM which provides the same table for multisampled Yf/Ys. + */ + s.TileAddressMappingMode = + info->surf->msaa_layout == ISL_MSAA_LAYOUT_ARRAY; +#endif + } #elif GFX_VER >= 8 assert(isl_format_get_layout(info->view->format)->txc != ISL_TXC_ASTC); assert(!isl_tiling_is_std_y(info->surf->tiling));