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));